summaryrefslogtreecommitdiffstats
path: root/src/widgets/toolbox.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-09-20 17:43:57 +0000
committerJabiertxof <jtx@jtx.marker.es>2013-09-20 17:43:57 +0000
commit0a836d1870bb87d5be3e4d900718f903371c8e56 (patch)
tree7d218dc0e9d81e2f7d3eddcefad9640769dc89b3 /src/widgets/toolbox.cpp
parentCompact of SVG icons whith the help of ~suv and Martin Owens (diff)
parentMerge Google Summer of Code unit improvement. (diff)
downloadinkscape-0a836d1870bb87d5be3e4d900718f903371c8e56.tar.gz
inkscape-0a836d1870bb87d5be3e4d900718f903371c8e56.zip
Update to trunk
(bzr r11950.1.146)
Diffstat (limited to 'src/widgets/toolbox.cpp')
-rw-r--r--src/widgets/toolbox.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index a171ce29b..81566bcf8 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -1012,7 +1012,7 @@ GtkWidget *ToolboxFactory::createSnapToolbox()
return toolboxNewCommon( tb, BAR_SNAP, GTK_POS_LEFT );
}
-static GtkWidget* createCustomSlider( GtkAdjustment *adjustment, gdouble climbRate, guint digits )
+static GtkWidget* createCustomSlider( GtkAdjustment *adjustment, gdouble climbRate, guint digits, Inkscape::UI::Widget::UnitTracker *unit_tracker)
{
#if WITH_GTKMM_3_0
Glib::RefPtr<Gtk::Adjustment> adj = Glib::wrap(adjustment, true);
@@ -1020,6 +1020,7 @@ static GtkWidget* createCustomSlider( GtkAdjustment *adjustment, gdouble climbRa
#else
Inkscape::UI::Widget::SpinButton *inkSpinner = new Inkscape::UI::Widget::SpinButton(*Glib::wrap(adjustment, true), climbRate, digits);
#endif
+ inkSpinner->addUnitTracker(unit_tracker);
inkSpinner = Gtk::manage( inkSpinner );
GtkWidget *widget = GTK_WIDGET( inkSpinner->gobj() );
return widget;
@@ -1034,6 +1035,7 @@ EgeAdjustmentAction * create_adjustment_action( gchar const *name,
gdouble lower, gdouble upper, gdouble step, gdouble page,
gchar const** descrLabels, gdouble const* descrValues, guint descrCount,
void (*callback)(GtkAdjustment *, GObject *),
+ Inkscape::UI::Widget::UnitTracker *unit_tracker,
gdouble climb/* = 0.1*/, guint digits/* = 3*/, double factor/* = 1.0*/ )
{
static bool init = false;
@@ -1048,7 +1050,7 @@ EgeAdjustmentAction * create_adjustment_action( gchar const *name,
g_signal_connect( G_OBJECT(adj), "value-changed", G_CALLBACK(callback), dataKludge );
- EgeAdjustmentAction* act = ege_adjustment_action_new( adj, name, label, tooltip, 0, climb, digits );
+ EgeAdjustmentAction* act = ege_adjustment_action_new( adj, name, label, tooltip, 0, climb, digits, unit_tracker );
if ( shortLabel ) {
g_object_set( act, "short_label", shortLabel, NULL );
}