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

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

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

revision 2151 by persson, Sun Nov 21 12:38:41 2010 UTC revision 2169 by persson, Sun Mar 6 07:51:04 2011 UTC
# Line 1  Line 1 
1  /*  /*
2   * Copyright (C) 2006-2010 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 22  Line 22 
22  #include "paramedit.h"  #include "paramedit.h"
23    
24  #include "global.h"  #include "global.h"
25    #include "compat.h"
26    
27  namespace {  namespace {
28      const char* const controlChangeTexts[] = {      const char* const controlChangeTexts[] = {
# Line 65  LabelWidget::LabelWidget(const char* lab Line 66  LabelWidget::LabelWidget(const char* lab
66      label(Glib::ustring(labelText) + ":"),      label(Glib::ustring(labelText) + ":"),
67      widget(widget)      widget(widget)
68  {  {
69      label.set_alignment(Gtk::ALIGN_LEFT);      label.set_alignment(Gtk::ALIGN_START);
70  }  }
71    
72  void LabelWidget::set_sensitive(bool sensitive)  void LabelWidget::set_sensitive(bool sensitive)
# Line 77  void LabelWidget::set_sensitive(bool sen Line 78  void LabelWidget::set_sensitive(bool sen
78  NumEntry::NumEntry(const char* labelText, double lower, double upper,  NumEntry::NumEntry(const char* labelText, double lower, double upper,
79                     int decimals) :                     int decimals) :
80      LabelWidget(labelText, box),      LabelWidget(labelText, box),
81    #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 90) || GTKMM_MAJOR_VERSION < 2
82      adjust(lower, lower, upper, 1, 10),      adjust(lower, lower, upper, 1, 10),
83    #else
84        adjust(Gtk::Adjustment::create(lower, lower, upper, 1, 10)),
85    #endif
86      scale(adjust),      scale(adjust),
87      spinbutton(adjust)      spinbutton(adjust)
88  {  {
# Line 231  ChoiceEntryLeverageCtrl::ChoiceEntryLeve Line 236  ChoiceEntryLeverageCtrl::ChoiceEntryLeve
236  {  {
237      for (int i = 0 ; i < 99 ; i++) {      for (int i = 0 ; i < 99 ; i++) {
238          if (controlChangeTexts[i]) {          if (controlChangeTexts[i]) {
239    #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 90) || GTKMM_MAJOR_VERSION < 2
240              combobox.append_text(controlChangeTexts[i]);              combobox.append_text(controlChangeTexts[i]);
241    #else
242                combobox.append(controlChangeTexts[i]);
243    #endif
244          }          }
245      }      }
246      combobox.signal_changed().connect(      combobox.signal_changed().connect(

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

  ViewVC Help
Powered by ViewVC