summaryrefslogtreecommitdiffstats
path: root/src/widgets/pencil-toolbar.cpp
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2013-03-29 23:52:42 +0000
committerMarkus Engel <markus.engel@tum.de>2013-03-29 23:52:42 +0000
commita168040d5a452544328a1e6ad35aaac351f94d44 (patch)
treefae1ba829f543a473da281bd5fa6e4deabbf6912 /src/widgets/pencil-toolbar.cpp
parentRemoved function pointers from SPObject and subclasses. (diff)
parentDutch translation update (diff)
downloadinkscape-a168040d5a452544328a1e6ad35aaac351f94d44.tar.gz
inkscape-a168040d5a452544328a1e6ad35aaac351f94d44.zip
merged from trunk
(bzr r11608.1.56)
Diffstat (limited to 'src/widgets/pencil-toolbar.cpp')
-rw-r--r--src/widgets/pencil-toolbar.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/widgets/pencil-toolbar.cpp b/src/widgets/pencil-toolbar.cpp
index 73ab4883c..e0cf67bd0 100644
--- a/src/widgets/pencil-toolbar.cpp
+++ b/src/widgets/pencil-toolbar.cpp
@@ -28,9 +28,8 @@
# include "config.h"
#endif
-#include <glibmm/i18n.h>
-
#include "ui/widget/spinbutton.h"
+#include <glibmm/i18n.h>
#include "toolbox.h"
#include "pencil-toolbar.h"
@@ -91,7 +90,7 @@ using Inkscape::UI::PrefPusher;
/* This is used in generic functions below to share large portions of code between pen and pencil tool */
static Glib::ustring const freehand_tool_name(GObject *dataKludge)
{
- SPDesktop *desktop = (SPDesktop *) g_object_get_data(dataKludge, "desktop");
+ SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data(dataKludge, "desktop"));
return ( tools_isactive(desktop, TOOLS_FREEHAND_PEN)
? "/tools/freehand/pen"
: "/tools/freehand/pencil" );
@@ -104,7 +103,7 @@ static void freehand_mode_changed(EgeSelectOneAction* act, GObject* tbl)
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
prefs->setInt(freehand_tool_name(tbl) + "/freehand-mode", mode);
- SPDesktop *desktop = (SPDesktop *) g_object_get_data(tbl, "desktop");
+ SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data(tbl, "desktop"));
// in pen tool we have more options than in pencil tool; if one of them was chosen, we do any
// preparatory work here
@@ -242,7 +241,7 @@ static void sp_pencil_tb_defaults(GtkWidget * /*widget*/, GObject *obj)
// fixme: make settable
gdouble tolerance = 4;
- adj = (GtkAdjustment*)g_object_get_data(obj, "tolerance");
+ adj = GTK_ADJUSTMENT(g_object_get_data(obj, "tolerance"));
gtk_adjustment_set_value(adj, tolerance);
gtk_adjustment_value_changed(adj);
@@ -282,7 +281,7 @@ public:
}
g_object_set_data( tbl, "freeze", GINT_TO_POINTER(TRUE) );
- GtkAdjustment * adj = (GtkAdjustment*)g_object_get_data(tbl, "tolerance");
+ GtkAdjustment * adj = GTK_ADJUSTMENT(g_object_get_data(tbl, "tolerance"));
double v = val.getDouble(adj->value);
gtk_adjustment_set_value(adj, v);