30 |
#include "compat.h" |
#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) { |
Glib::ustring dimTypeAsString(gig::dimension_t d) { |
34 |
char buf[32]; |
char buf[32]; |
35 |
switch (d) { |
switch (d) { |
36 |
case gig::dimension_none: |
case gig::dimension_none: |
218 |
); |
); |
219 |
|
|
220 |
show_all_children(); |
show_all_children(); |
221 |
|
|
222 |
|
resize(460,300); |
223 |
} |
} |
224 |
|
|
225 |
// update all GUI elements according to current gig::Region informations |
// update all GUI elements according to current gig::Region informations |
229 |
for (int i = 0; i < region->Dimensions; i++) { |
for (int i = 0; i < region->Dimensions; i++) { |
230 |
gig::dimension_def_t* dim = ®ion->pDimensionDefinitions[i]; |
gig::dimension_def_t* dim = ®ion->pDimensionDefinitions[i]; |
231 |
Gtk::TreeModel::Row row = *(refTableModel->append()); |
Gtk::TreeModel::Row row = *(refTableModel->append()); |
232 |
row[tableModel.m_dim_type] = __dimTypeAsString(dim->dimension); |
row[tableModel.m_dim_type] = dimTypeAsString(dim->dimension); |
233 |
row[tableModel.m_bits] = dim->bits; |
row[tableModel.m_bits] = dim->bits; |
234 |
row[tableModel.m_zones] = dim->zones; |
row[tableModel.m_zones] = dim->zones; |
235 |
row[tableModel.m_description] = __dimDescriptionAsString(dim->dimension); |
row[tableModel.m_description] = __dimDescriptionAsString(dim->dimension); |
258 |
Glib::RefPtr<Gtk::ListStore> refComboModel = Gtk::ListStore::create(comboModel); |
Glib::RefPtr<Gtk::ListStore> refComboModel = Gtk::ListStore::create(comboModel); |
259 |
for (int i = 0x01; i < 0xff; i++) { |
for (int i = 0x01; i < 0xff; i++) { |
260 |
Glib::ustring sType = |
Glib::ustring sType = |
261 |
__dimTypeAsString(static_cast<gig::dimension_t>(i)); |
dimTypeAsString(static_cast<gig::dimension_t>(i)); |
262 |
if (sType.find("Unknown") != 0) { |
if (sType.find("Unknown") != 0) { |
263 |
Gtk::TreeModel::Row row = *(refComboModel->append()); |
Gtk::TreeModel::Row row = *(refComboModel->append()); |
264 |
row[comboModel.m_type_id] = i; |
row[comboModel.m_type_id] = i; |