summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/spin-scale.cpp
diff options
context:
space:
mode:
authorMichael Soegtrop <MSoegtrop@yahoo.de>2017-06-05 13:01:17 +0000
committerMichael Soegtrop <MSoegtrop@yahoo.de>2017-06-05 13:01:17 +0000
commite7248b2fa042f42a5c4dd14cd86ab6a5b4524059 (patch)
tree9097520c54e355ded9bd0b4d6618af4e8dacdd91 /src/ui/widget/spin-scale.cpp
parentupdated to latest trunk (diff)
parent[Bug #1695016] Xaml export misses some radialGradients. (diff)
downloadinkscape-e7248b2fa042f42a5c4dd14cd86ab6a5b4524059.tar.gz
inkscape-e7248b2fa042f42a5c4dd14cd86ab6a5b4524059.zip
updated to latest trunk
(bzr r14876.2.4)
Diffstat (limited to 'src/ui/widget/spin-scale.cpp')
-rw-r--r--src/ui/widget/spin-scale.cpp31
1 files changed, 8 insertions, 23 deletions
diff --git a/src/ui/widget/spin-scale.cpp b/src/ui/widget/spin-scale.cpp
index bb08d67df..f74626d9b 100644
--- a/src/ui/widget/spin-scale.cpp
+++ b/src/ui/widget/spin-scale.cpp
@@ -8,11 +8,10 @@
#include "spin-scale.h"
-#include <gtkmm/adjustment.h>
#include <glibmm/i18n.h>
#include <glibmm/stringutils.h>
-#include "ui/widget/gimpspinscale.h"
+#include "widgets/gimp/gimpspinscale.h"
namespace Inkscape {
namespace UI {
@@ -22,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());
@@ -42,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)
@@ -111,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;
}