/[svn]/gigedit/trunk/src/gigedit/dimensionmanager.cpp
ViewVC logotype

Diff of /gigedit/trunk/src/gigedit/dimensionmanager.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2168 by persson, Tue Feb 3 19:38:19 2009 UTC revision 2169 by persson, Sun Mar 6 07:51:04 2011 UTC
# Line 1  Line 1 
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
# Line 27  Line 27 
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) {
# Line 263  void DimensionManager::addDimension() { Line 264  void DimensionManager::addDimension() {
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);
# Line 287  void DimensionManager::addDimension() { Line 288  void DimensionManager::addDimension() {
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 {

Legend:
Removed from v.2168  
changed lines
  Added in v.2169

  ViewVC Help
Powered by ViewVC