From 2b79799fff8ed89c649a934186c176cb2765823c Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Sun, 4 Feb 2018 20:14:50 +0100 Subject: Convert UnitTracker to use ink-select-one-action. Additional code clean up. --- src/widgets/node-toolbar.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/widgets/node-toolbar.cpp') diff --git a/src/widgets/node-toolbar.cpp b/src/widgets/node-toolbar.cpp index b1091ac69..2e80b77d8 100644 --- a/src/widgets/node-toolbar.cpp +++ b/src/widgets/node-toolbar.cpp @@ -47,6 +47,7 @@ #include "ui/tool/control-point-selection.h" #include "ui/tool/multi-path-manipulator.h" #include "ui/tools/node-tool.h" +#include "ui/widget/ink-select-one-action.h" #include "ui/widget/unit-tracker.h" #include "widgets/ege-adjustment-action.h" @@ -586,7 +587,6 @@ void sp_node_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje -1e6, 1e6, SPIN_STEP, SPIN_PAGE_STEP, labels, values, G_N_ELEMENTS(labels), sp_node_path_x_value_changed, tracker ); - tracker->addAdjustment( ege_adjustment_action_get_adjustment(eact) ); g_object_set_data( holder, "nodes_x_action", eact ); gtk_action_set_sensitive( GTK_ACTION(eact), FALSE ); gtk_action_group_add_action( mainActions, GTK_ACTION(eact) ); @@ -604,7 +604,6 @@ void sp_node_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje -1e6, 1e6, SPIN_STEP, SPIN_PAGE_STEP, labels, values, G_N_ELEMENTS(labels), sp_node_path_y_value_changed, tracker ); - tracker->addAdjustment( ege_adjustment_action_get_adjustment(eact) ); g_object_set_data( holder, "nodes_y_action", eact ); gtk_action_set_sensitive( GTK_ACTION(eact), FALSE ); gtk_action_group_add_action( mainActions, GTK_ACTION(eact) ); @@ -612,8 +611,8 @@ void sp_node_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje // add the units menu { - GtkAction* act = tracker->createAction( "NodeUnitsAction", _("Units"), ("") ); - gtk_action_group_add_action( mainActions, act ); + InkSelectOneAction* act = tracker->createAction( "NodeUnitsAction", _("Units"), ("") ); + gtk_action_group_add_action( mainActions, act->gobj() ); } sp_node_toolbox_sel_changed(desktop->getSelection(), holder); -- cgit v1.2.3