From 5f739493fd73a6ae099e3929e8934bb8d3fe87cd Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Thu, 5 Jan 2012 21:22:09 +0100 Subject: add toolbutton menu action type. now the add extremum node buttons are somewhat subbuttons of the insert node button... (bzr r10849) --- src/widgets/toolbox.cpp | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'src/widgets/toolbox.cpp') diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 3960f2349..b6e8df259 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -285,11 +285,14 @@ static gchar const * ui_descr = " " " " - " " - " " - " " - " " - " " + " " + " " + " " + " " + " " + " " + " " + " " " " " " " " @@ -1408,14 +1411,18 @@ static void sp_node_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions Inkscape::IconSize secondarySize = ToolboxFactory::prefToSize("/toolbox/secondary", 1); { - InkAction* inky = ink_action_new( "NodeInsertAction", - _("Insert node"), - _("Insert new nodes into selected segments"), - INKSCAPE_ICON("node-add"), - secondarySize ); - g_object_set( inky, "short_label", _("Insert"), NULL ); + InkToolMenuAction* inky = ink_tool_menu_action_new( "NodeInsertAction", + _("Insert node"), + _("Insert new nodes into selected segments"), + INKSCAPE_ICON("node-add"), + secondarySize ); + g_object_set( INK_ACTION(inky), "short_label", _("Insert"), NULL ); g_signal_connect_after( G_OBJECT(inky), "activate", G_CALLBACK(sp_node_path_edit_add), 0 ); gtk_action_group_add_action( mainActions, GTK_ACTION(inky) ); + GtkToolItem *menu_tool_button = gtk_menu_tool_button_new (NULL, NULL); + gtk_activatable_set_related_action (GTK_ACTIVATABLE (menu_tool_button), GTK_ACTION(inky)); + // also create dummy menu action: + gtk_action_group_add_action( mainActions, gtk_action_new("NodeInsertActionMenu", NULL, NULL, NULL) ); } { -- cgit v1.2.3