From 69aa4c6436321b22525fb11c552ca7d60ac1b096 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Fri, 16 Oct 2015 19:17:47 +0200 Subject: Add convert to guides option (bzr r14393.2.4) --- src/widgets/measure-toolbar.cpp | 17 +++++++++++++++++ src/widgets/toolbox.cpp | 1 + 2 files changed, 18 insertions(+) (limited to 'src/widgets') diff --git a/src/widgets/measure-toolbar.cpp b/src/widgets/measure-toolbar.cpp index 48c781fb3..741d600b4 100644 --- a/src/widgets/measure-toolbar.cpp +++ b/src/widgets/measure-toolbar.cpp @@ -178,6 +178,13 @@ static void sp_to_mark_dimension(void){ } } +static void sp_to_guides(void){ + MeasureTool *mt = get_measure_tool(); + if (mt) { + mt->toGuides(); + } +} + static void sp_to_item(void){ MeasureTool *mt = get_measure_tool(); if (mt) { @@ -280,6 +287,16 @@ void sp_measure_toolbox_prep(SPDesktop * desktop, GtkActionGroup* mainActions, G g_signal_connect_after( G_OBJECT(act), "activate", G_CALLBACK(sp_reverse_knots), 0 ); gtk_action_group_add_action( mainActions, GTK_ACTION(act) ); } + //to guides + { + InkAction* act = ink_action_new( "MeasureToGuides", + _("To guides"), + _("Mark Dimension"), + INKSCAPE_ICON("guides"), + secondarySize ); + g_signal_connect_after( G_OBJECT(act), "activate", G_CALLBACK(sp_to_guides), 0 ); + gtk_action_group_add_action( mainActions, GTK_ACTION(act) ); + } //to mark dimensions { InkAction* act = ink_action_new( "MeasureMarkDimension", diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 665502745..a2bd16978 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -347,6 +347,7 @@ static gchar const * ui_descr = " " " " " " + " " " " " " " " -- cgit v1.2.3 From f0cd7f4d9ca2e7f6f59c8030ee57917254816a59 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Fri, 16 Oct 2015 20:06:31 +0200 Subject: Fix a wrong string (bzr r14393.2.6) --- src/widgets/measure-toolbar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets') diff --git a/src/widgets/measure-toolbar.cpp b/src/widgets/measure-toolbar.cpp index 741d600b4..28f82ba44 100644 --- a/src/widgets/measure-toolbar.cpp +++ b/src/widgets/measure-toolbar.cpp @@ -291,7 +291,7 @@ void sp_measure_toolbox_prep(SPDesktop * desktop, GtkActionGroup* mainActions, G { InkAction* act = ink_action_new( "MeasureToGuides", _("To guides"), - _("Mark Dimension"), + _("To guides"), INKSCAPE_ICON("guides"), secondarySize ); g_signal_connect_after( G_OBJECT(act), "activate", G_CALLBACK(sp_to_guides), 0 ); -- cgit v1.2.3