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 |
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[] = { |
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) |
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 |
{ |
{ |
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( |