summaryrefslogtreecommitdiffstats
path: root/src/widgets/toolbox.cpp
diff options
context:
space:
mode:
authorDenis Declara <declara91@gmail.com>2012-05-05 13:32:42 +0000
committerDenis Declara <declara91@gmail.com>2012-05-05 13:32:42 +0000
commitaeb9c1bde66de096910757abb17dedb94ad74207 (patch)
treec0adf97685b0fa8af1553b14d20601f280492762 /src/widgets/toolbox.cpp
parentFixed some math, so that the objects now line up correctly (diff)
parentAdding checks to prevent null pointer dereferences (diff)
downloadinkscape-aeb9c1bde66de096910757abb17dedb94ad74207.tar.gz
inkscape-aeb9c1bde66de096910757abb17dedb94ad74207.zip
Trunk merge
(bzr r11073.1.29)
Diffstat (limited to 'src/widgets/toolbox.cpp')
-rw-r--r--src/widgets/toolbox.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index 7d73c042b..f29ac581d 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -114,7 +114,7 @@
#include <gtk/gtk.h>
#if !GTK_CHECK_VERSION(2,22,0)
-#define GDK_KEY_VoidSymbol 0xffffff
+#include "compat-key-syms.h"
#endif
//#define DEBUG_TEXT
@@ -1119,7 +1119,12 @@ GtkWidget *ToolboxFactory::createSnapToolbox()
static GtkWidget* createCustomSlider( GtkAdjustment *adjustment, gdouble climbRate, guint digits )
{
+#if WITH_GTKMM_3_0
+ Glib::RefPtr<Gtk::Adjustment> adj = Glib::wrap(adjustment, true);
+ Inkscape::UI::Widget::SpinButton *inkSpinner = new Inkscape::UI::Widget::SpinButton(adj, climbRate, digits);
+#else
Inkscape::UI::Widget::SpinButton *inkSpinner = new Inkscape::UI::Widget::SpinButton(*Glib::wrap(adjustment, true), climbRate, digits);
+#endif
inkSpinner = Gtk::manage( inkSpinner );
GtkWidget *widget = GTK_WIDGET( inkSpinner->gobj() );
return widget;