1 |
/* -*- c++ -*- |
/* |
2 |
* Copyright (C) 2006-2009 Andreas Persson |
* Copyright (C) 2006-2011 Andreas Persson |
3 |
* |
* |
4 |
* This program is free software; you can redistribute it and/or |
* This program is free software; you can redistribute it and/or |
5 |
* modify it under the terms of the GNU General Public License as |
* modify it under the terms of the GNU General Public License as |
27 |
#include <gtkmm/table.h> |
#include <gtkmm/table.h> |
28 |
|
|
29 |
#include "global.h" |
#include "global.h" |
30 |
|
#include "compat.h" |
31 |
|
|
32 |
// returns a human readable name of the given dimension type |
// returns a human readable name of the given dimension type |
33 |
static Glib::ustring __dimTypeAsString(gig::dimension_t d) { |
static Glib::ustring __dimTypeAsString(gig::dimension_t d) { |
264 |
} |
} |
265 |
} |
} |
266 |
Gtk::Table table(2, 2); |
Gtk::Table table(2, 2); |
267 |
Gtk::Label labelDimType(_("Dimension:"), Gtk::ALIGN_LEFT); |
Gtk::Label labelDimType(_("Dimension:"), Gtk::ALIGN_START); |
268 |
Gtk::ComboBox comboDimType; |
Gtk::ComboBox comboDimType; |
269 |
comboDimType.set_model(refComboModel); |
comboDimType.set_model(refComboModel); |
270 |
comboDimType.pack_start(comboModel.m_type_id); |
comboDimType.pack_start(comboModel.m_type_id); |
271 |
comboDimType.pack_start(comboModel.m_type_name); |
comboDimType.pack_start(comboModel.m_type_name); |
272 |
Gtk::Label labelZones(_("Zones:"), Gtk::ALIGN_LEFT); |
Gtk::Label labelZones(_("Zones:"), Gtk::ALIGN_START); |
273 |
table.attach(labelDimType, 0, 1, 0, 1); |
table.attach(labelDimType, 0, 1, 0, 1); |
274 |
table.attach(comboDimType, 1, 2, 0, 1); |
table.attach(comboDimType, 1, 2, 0, 1); |
275 |
table.attach(labelZones, 0, 1, 1, 2); |
table.attach(labelZones, 0, 1, 1, 2); |
288 |
for (int i = 1; i <= 5; i++) { |
for (int i = 1; i <= 5; i++) { |
289 |
char buf[3]; |
char buf[3]; |
290 |
sprintf(buf, "%d", 1 << i); |
sprintf(buf, "%d", 1 << i); |
291 |
|
#if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 90) || GTKMM_MAJOR_VERSION < 2 |
292 |
comboZones.append_text(buf); |
comboZones.append_text(buf); |
293 |
|
#else |
294 |
|
comboZones.append(buf); |
295 |
|
#endif |
296 |
} |
} |
297 |
table.attach(comboZones, 1, 2, 1, 2); |
table.attach(comboZones, 1, 2, 1, 2); |
298 |
} else { |
} else { |