summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-10-16 19:33:15 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-10-16 19:33:15 +0000
commit0d5e3b4fdfd35cd706be077bb8efcd96c24542a2 (patch)
treef466fc0526727a042e5618ea9ebcd72a87f76746 /src/widgets
parentupdate to trunk (diff)
parentupdate to trunk (diff)
downloadinkscape-0d5e3b4fdfd35cd706be077bb8efcd96c24542a2.tar.gz
inkscape-0d5e3b4fdfd35cd706be077bb8efcd96c24542a2.zip
update from work
(bzr r14393.1.22)
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/measure-toolbar.cpp17
-rw-r--r--src/widgets/toolbox.cpp1
2 files changed, 18 insertions, 0 deletions
diff --git a/src/widgets/measure-toolbar.cpp b/src/widgets/measure-toolbar.cpp
index 48c781fb3..28f82ba44 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"),
+ _("To guides"),
+ 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 =
" <toolitem action='MeasureInBettween' />"
" <toolitem action='MeasureAllLayers' />"
" <toolitem action='MeasureReverse' />"
+ " <toolitem action='MeasureToGuides' />"
" <toolitem action='MeasureMarkDimension' />"
" <toolitem action='MeasureToItem' />"
" </toolbar>"