diff options
| author | Adrian Boguszewski <adrbogus1@student.pg.gda.pl> | 2016-08-09 09:33:34 +0000 |
|---|---|---|
| committer | Adrian Boguszewski <adrbogus1@student.pg.gda.pl> | 2016-08-09 09:33:34 +0000 |
| commit | 577a95c2028790cbb856feda6ac6880ddd1aaad2 (patch) | |
| tree | 4ff78f6fa8f0c1b740fd43b0ade2b91dbf9226d0 /src/ui/widget/spin-scale.cpp | |
| parent | Merged trunk (diff) | |
| parent | Remove deprecated Autotools and btool files. Please use CMake instead (diff) | |
| download | inkscape-577a95c2028790cbb856feda6ac6880ddd1aaad2.tar.gz inkscape-577a95c2028790cbb856feda6ac6880ddd1aaad2.zip | |
Merged trunk
(bzr r14954.1.30)
Diffstat (limited to 'src/ui/widget/spin-scale.cpp')
| -rw-r--r-- | src/ui/widget/spin-scale.cpp | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/src/ui/widget/spin-scale.cpp b/src/ui/widget/spin-scale.cpp index d6b34a5b4..f74626d9b 100644 --- a/src/ui/widget/spin-scale.cpp +++ b/src/ui/widget/spin-scale.cpp @@ -11,7 +11,7 @@ #include <glibmm/i18n.h> #include <glibmm/stringutils.h> -#include "ui/widget/gimpspinscale.h" +#include "widgets/gimp/gimpspinscale.h" namespace Inkscape { namespace UI { @@ -21,13 +21,8 @@ SpinScale::SpinScale(const char* label, double value, double lower, double upper double /*climb_rate*/, int digits, const SPAttributeEnum a, const char* tip_text) : AttrWidget(a, value) { -#if WITH_GTKMM_3_0 _adjustment = Gtk::Adjustment::create(value, lower, upper, step_inc); _spinscale = gimp_spin_scale_new (_adjustment->gobj(), label, digits); -#else - _adjustment = new Gtk::Adjustment(value, lower, upper, step_inc); - _spinscale = gimp_spin_scale_new (_adjustment->gobj(), label, digits); -#endif signal_value_changed().connect(signal_attr_changed().make_slot()); @@ -41,12 +36,10 @@ SpinScale::SpinScale(const char* label, double value, double lower, double upper } SpinScale::SpinScale(const char* label, -#if WITH_GTKMM_3_0 - Glib::RefPtr<Gtk::Adjustment> adj, -#else - Gtk::Adjustment *adj, -#endif - int digits, const SPAttributeEnum a, const char* tip_text) + Glib::RefPtr<Gtk::Adjustment> adj, + int digits, + const SPAttributeEnum a, + const char* tip_text) : AttrWidget(a, 0.0), _adjustment(adj) @@ -110,19 +103,12 @@ void SpinScale::set_appearance(const gchar* appearance) gimp_spin_scale_set_appearance(_spinscale, appearance); } -#if WITH_GTKMM_3_0 -const Glib::RefPtr<Gtk::Adjustment> SpinScale::get_adjustment() const -#else -const Gtk::Adjustment *SpinScale::get_adjustment() const -#endif +const decltype(SpinScale::_adjustment) SpinScale::get_adjustment() const { return _adjustment; } -#if WITH_GTKMM_3_0 -Glib::RefPtr<Gtk::Adjustment> SpinScale::get_adjustment() -#else -Gtk::Adjustment *SpinScale::get_adjustment() -#endif + +decltype(SpinScale::_adjustment) SpinScale::get_adjustment() { return _adjustment; } |
