summaryrefslogtreecommitdiffstats
path: root/src/widgets/text-toolbar.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2018-02-04 19:14:50 +0000
committerTavmjong Bah <tavmjong@free.fr>2018-02-04 19:14:50 +0000
commit2b79799fff8ed89c649a934186c176cb2765823c (patch)
tree1e1da695a98ab4f0fbdb7f07fcd37d0e56730e8d /src/widgets/text-toolbar.cpp
parentNew "Simple Blend" custom predefined filter effect (original idea by Ivan Lou... (diff)
downloadinkscape-2b79799fff8ed89c649a934186c176cb2765823c.tar.gz
inkscape-2b79799fff8ed89c649a934186c176cb2765823c.zip
Convert UnitTracker to use ink-select-one-action.
Additional code clean up.
Diffstat (limited to 'src/widgets/text-toolbar.cpp')
-rw-r--r--src/widgets/text-toolbar.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp
index 6288999a6..db3311ab9 100644
--- a/src/widgets/text-toolbar.cpp
+++ b/src/widgets/text-toolbar.cpp
@@ -733,7 +733,7 @@ static void sp_text_lineheight_value_changed( GtkAdjustment *adj, GObject *tbl )
}
-static void sp_text_lineheight_unit_changed( gpointer /* */, GObject *tbl )
+static void sp_text_lineheight_unit_changed( GObject *tbl, int /* Not Used */ )
{
// quit if run by the _changed callbacks
if (g_object_get_data(G_OBJECT(tbl), "freeze")) {
@@ -1778,12 +1778,12 @@ static void sp_text_toolbox_selection_changed(Inkscape::Selection */*selection*/
}
// In Minimum and Adaptive modes, don't allow unit change (must remain unitless).
- GtkAction* textLineHeightUnitsAction =
- static_cast<GtkAction*>(g_object_get_data( tbl, "TextLineHeightUnitsAction") );
+ InkSelectOneAction* textLineHeightUnitsAction =
+ static_cast<InkSelectOneAction*>(g_object_get_data( tbl, "TextLineHeightUnitsAction") );
if (activeButtonLS == 0 || (activeButtonLS == 1 && outer)) {
- gtk_action_set_sensitive (textLineHeightUnitsAction, false);
+ textLineHeightUnitsAction->set_sensitive(false);
} else {
- gtk_action_set_sensitive (textLineHeightUnitsAction, true);
+ textLineHeightUnitsAction->set_sensitive(true);
}
// Word spacing
@@ -2279,7 +2279,7 @@ void sp_text_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje
gtk_action_group_add_action( mainActions, GTK_ACTION( act->gobj() ));
g_object_set_data( holder, "TextDirectionAction", act );
- act->signal_changed().connect(sigc::bind<0>(sigc::ptr_fun(&sp_text_direction_changed), holder));
+ act->signal_changed_after().connect(sigc::bind<0>(sigc::ptr_fun(&sp_text_direction_changed), holder));
}
/* Line height unit tracker */
@@ -2325,9 +2325,9 @@ void sp_text_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje
/* Line height units */
{
- GtkAction* act = tracker->createAction( "TextLineHeightUnitsAction", _("Units"), ("") );
- gtk_action_group_add_action( mainActions, act );
- g_signal_connect_after( G_OBJECT(act), "changed", G_CALLBACK(sp_text_lineheight_unit_changed), holder );
+ InkSelectOneAction* act = tracker->createAction( "TextLineHeightUnitsAction", _("Units"), ("") );
+ gtk_action_group_add_action( mainActions, act->gobj() );
+ act->signal_changed_after().connect(sigc::bind<0>(sigc::ptr_fun(&sp_text_lineheight_unit_changed), holder));
g_object_set_data( holder, "TextLineHeightUnitsAction", act );
}