From f01603aa09a8c49d9835a10ad837ef0c286b9a7e Mon Sep 17 00:00:00 2001 From: John Smith Date: Fri, 11 May 2012 21:56:30 +0900 Subject: Fix for 169759 : HIG compliant Edit menu (bzr r11354) --- src/verbs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index c30146ae8..2c1d178cb 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -2633,7 +2633,7 @@ Verb *Verb::_base_verbs[] = { N_("Zoom to fit selection in window"), INKSCAPE_ICON("zoom-fit-selection")), // Dialogs - new DialogVerb(SP_VERB_DIALOG_DISPLAY, "DialogPreferences", N_("In_kscape Preferences..."), + new DialogVerb(SP_VERB_DIALOG_DISPLAY, "DialogPreferences", N_("P_references..."), N_("Edit global Inkscape preferences"), GTK_STOCK_PREFERENCES ), new DialogVerb(SP_VERB_DIALOG_NAMEDVIEW, "DialogDocumentProperties", N_("_Document Properties..."), N_("Edit properties of this document (to be saved with the document)"), GTK_STOCK_PROPERTIES ), -- cgit v1.2.3 From 0a69f37ffc18750d8657af78513d3491ca66b4f2 Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Mon, 14 May 2012 22:39:48 +0200 Subject: a few UI message fixes (bzr r11363) --- src/verbs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 2c1d178cb..f2ff61293 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -2311,7 +2311,7 @@ Verb *Verb::_base_verbs[] = { new EditVerb(SP_VERB_EDIT_SELECT_SAME_STROKE_COLOR, "EditSelectSameStrokeColor", N_("_Stroke Color"), N_("Select all objects with the same stroke as the selected objects"), GTK_STOCK_SELECT_ALL), new EditVerb(SP_VERB_EDIT_SELECT_SAME_STROKE_STYLE, "EditSelectSameStrokeStyle", N_("Stroke St_yle"), - N_("Select all objects with the same stroke style (width, dsh, markers) as the selected objects"), GTK_STOCK_SELECT_ALL), + N_("Select all objects with the same stroke style (width, dash, markers) as the selected objects"), GTK_STOCK_SELECT_ALL), new EditVerb(SP_VERB_EDIT_INVERT, "EditInvert", N_("In_vert Selection"), N_("Invert selection (unselect what is selected and select everything else)"), INKSCAPE_ICON("edit-select-invert")), new EditVerb(SP_VERB_EDIT_INVERT_IN_ALL_LAYERS, "EditInvertInAllLayers", N_("Invert in All Layers"), -- cgit v1.2.3 From 0ea9b448ee16fe941d46395c2877f4d2e815b9ed Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Wed, 23 May 2012 14:00:49 +0200 Subject: Add Mesh tool (experimental, requires Cario >= 1.11.4, disabled by default). (bzr r11406) --- src/verbs.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index f2ff61293..96a6b76a1 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1509,6 +1509,9 @@ void ContextVerb::perform(SPAction *action, void *data) case SP_VERB_CONTEXT_GRADIENT: tools_switch(dt, TOOLS_GRADIENT); break; + case SP_VERB_CONTEXT_MESH: + tools_switch(dt, TOOLS_MESH); + break; case SP_VERB_CONTEXT_ZOOM: tools_switch(dt, TOOLS_ZOOM); break; @@ -1587,6 +1590,10 @@ void ContextVerb::perform(SPAction *action, void *data) prefs->setInt("/dialogs/preferences/page", PREFS_PAGE_TOOLS_GRADIENT); dt->_dlg_mgr->showDialog("InkscapePreferences"); break; + case SP_VERB_CONTEXT_MESH_PREFS: + prefs->setInt("/dialogs/preferences/page", PREFS_PAGE_TOOLS_GRADIENT); + dt->_dlg_mgr->showDialog("InkscapePreferences"); + break; case SP_VERB_CONTEXT_ZOOM_PREFS: prefs->setInt("/dialogs/preferences/page", PREFS_PAGE_TOOLS_ZOOM); dt->_dlg_mgr->showDialog("InkscapePreferences"); @@ -2512,6 +2519,8 @@ Verb *Verb::_base_verbs[] = { N_("Create and edit text objects"), INKSCAPE_ICON("draw-text")), new ContextVerb(SP_VERB_CONTEXT_GRADIENT, "ToolGradient", N_("Gradient"), N_("Create and edit gradients"), INKSCAPE_ICON("color-gradient")), + new ContextVerb(SP_VERB_CONTEXT_MESH, "ToolMesh", N_("Mesh"), + N_("Create and edit meshes"), INKSCAPE_ICON("mesh-gradient")), new ContextVerb(SP_VERB_CONTEXT_ZOOM, "ToolZoom", N_("Zoom"), N_("Zoom in or out"), INKSCAPE_ICON("zoom")), new ContextVerb(SP_VERB_CONTEXT_MEASURE, "ToolMeasure", NC_("Measurement tool", "Measure"), @@ -2557,6 +2566,8 @@ Verb *Verb::_base_verbs[] = { N_("Open Preferences for the Text tool"), NULL), new ContextVerb(SP_VERB_CONTEXT_GRADIENT_PREFS, "GradientPrefs", N_("Gradient Preferences"), N_("Open Preferences for the Gradient tool"), NULL), + new ContextVerb(SP_VERB_CONTEXT_MESH_PREFS, "Mesh_Prefs", N_("Mesh Preferences"), + N_("Open Preferences for the Mesh tool"), NULL), new ContextVerb(SP_VERB_CONTEXT_ZOOM_PREFS, "ZoomPrefs", N_("Zoom Preferences"), N_("Open Preferences for the Zoom tool"), NULL), new ContextVerb(SP_VERB_CONTEXT_MEASURE_PREFS, "MeasurePrefs", N_("Measure Preferences"), -- cgit v1.2.3 From 445ec64918974f265cab2f13ca090c9e7b17f5c5 Mon Sep 17 00:00:00 2001 From: John Smith Date: Wed, 20 Jun 2012 09:34:24 +0900 Subject: Fix for 1015352 : Vacuum defs : Rename to 'Clean up document' (bzr r11506) --- src/verbs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 96a6b76a1..76d5f2d42 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -2233,7 +2233,7 @@ Verb *Verb::_base_verbs[] = { new FileVerb(SP_VERB_FILE_PRINT, "FilePrint", N_("_Print..."), N_("Print document"), GTK_STOCK_PRINT ), // TRANSLATORS: "Vacuum Defs" means "Clean up defs" (so as to remove unused definitions) - new FileVerb(SP_VERB_FILE_VACUUM, "FileVacuum", N_("Vac_uum Defs"), N_("Remove unused definitions (such as gradients or clipping paths) from the <defs> of the document"), + new FileVerb(SP_VERB_FILE_VACUUM, "FileVacuum", N_("Clean _up document"), N_("Remove unused definitions (such as gradients or clipping paths) from the <defs> of the document"), INKSCAPE_ICON("document-cleanup") ), new FileVerb(SP_VERB_FILE_IMPORT, "FileImport", N_("_Import..."), N_("Import a bitmap or SVG image into this document"), INKSCAPE_ICON("document-import")), -- cgit v1.2.3 From 9abd33133650d77714fccf09d0c9ff27c9b75a78 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Thu, 5 Jul 2012 22:39:08 +0100 Subject: Drop GTK+ 2.20 support. Fixed bugs: - https://launchpad.net/bugs/1020494 (bzr r11529) --- src/verbs.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 76d5f2d42..9de7d6dbf 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -84,10 +84,6 @@ #include -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - using Inkscape::DocumentUndo; //#ifdef WITH_INKBOARD -- cgit v1.2.3 From eef4e4067dbd2997e08ae87990d258f64f335df7 Mon Sep 17 00:00:00 2001 From: John Smith Date: Thu, 12 Jul 2012 18:42:23 +0900 Subject: Fix for 378413 : Show/Hide all layers (bzr r11545) --- src/verbs.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 9de7d6dbf..399e51593 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1332,6 +1332,18 @@ void LayerVerb::perform(SPAction *action, void *data) } break; } + case SP_VERB_LAYER_SHOW_ALL: { + dt->toggleAllLayers( false ); + DocumentUndo::maybeDone(sp_desktop_document(dt), "layer:showall", SP_VERB_LAYER_SHOW_ALL, _("Show all layers")); + break; + } + + case SP_VERB_LAYER_HIDE_ALL: { + dt->toggleAllLayers( true ); + DocumentUndo::maybeDone(sp_desktop_document(dt), "layer:hideall", SP_VERB_LAYER_HIDE_ALL, _("Hide all layers")); + break; + } + case SP_VERB_LAYER_TOGGLE_LOCK: case SP_VERB_LAYER_TOGGLE_HIDE: { if ( dt->currentLayer() == dt->currentRoot() ) { @@ -2443,6 +2455,10 @@ Verb *Verb::_base_verbs[] = { N_("Delete the current layer"), INKSCAPE_ICON("layer-delete")), new LayerVerb(SP_VERB_LAYER_SOLO, "LayerSolo", N_("_Show/hide other layers"), N_("Solo the current layer"), NULL), + new LayerVerb(SP_VERB_LAYER_SHOW_ALL, "LayerShowAll", N_("_Show all layers"), + N_("Show all the layers"), NULL), + new LayerVerb(SP_VERB_LAYER_HIDE_ALL, "LayerHideAll", N_("_Hide all layers"), + N_("Hide all the layers"), NULL), new LayerVerb(SP_VERB_LAYER_TOGGLE_LOCK, "LayerToggleLock", N_("_Lock/Unlock Current Layer"), N_("Toggle lock on current layer"), NULL), new LayerVerb(SP_VERB_LAYER_TOGGLE_HIDE, "LayerToggleHide", N_("_Show/hide Current Layer"), -- cgit v1.2.3 From 7e59062e6023308843910f8997d7c10ad717e543 Mon Sep 17 00:00:00 2001 From: John Smith Date: Sat, 21 Jul 2012 11:19:56 +0900 Subject: Fix for 960240 : Rename Edit:Find to Find Replace (bzr r11560) --- src/verbs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 399e51593..effa49e4e 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -2681,7 +2681,7 @@ Verb *Verb::_base_verbs[] = { N_("View and select font family, font size and other text properties"), INKSCAPE_ICON("dialog-text-and-font")), new DialogVerb(SP_VERB_DIALOG_XML_EDITOR, "DialogXMLEditor", N_("_XML Editor..."), N_("View and edit the XML tree of the document"), INKSCAPE_ICON("dialog-xml-editor")), - new DialogVerb(SP_VERB_DIALOG_FIND, "DialogFind", N_("_Find..."), + new DialogVerb(SP_VERB_DIALOG_FIND, "DialogFind", N_("_Find/Replace..."), N_("Find objects in document"), GTK_STOCK_FIND ), new DialogVerb(SP_VERB_DIALOG_FINDREPLACE, "DialogFindReplace", N_("Find and _Replace Text..."), N_("Find and replace text in document"), GTK_STOCK_FIND_AND_REPLACE ), -- cgit v1.2.3 From d71d34161792bd83064081bda825ef9579825b78 Mon Sep 17 00:00:00 2001 From: John Smith Date: Wed, 25 Jul 2012 11:42:34 +0900 Subject: Fix for 722625 : Select Same by Object Type (bzr r11573) --- src/verbs.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index effa49e4e..ae9e53cbe 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -973,6 +973,9 @@ void EditVerb::perform(SPAction *action, void *data) case SP_VERB_EDIT_SELECT_SAME_STROKE_STYLE: SelectionHelper::selectSameStrokeStyle(dt); break; + case SP_VERB_EDIT_SELECT_SAME_OBJECT_TYPE: + SelectionHelper::selectSameObjectType(dt); + break; case SP_VERB_EDIT_INVERT: SelectionHelper::invert(dt); break; @@ -2327,6 +2330,8 @@ Verb *Verb::_base_verbs[] = { N_("Select all objects with the same stroke as the selected objects"), GTK_STOCK_SELECT_ALL), new EditVerb(SP_VERB_EDIT_SELECT_SAME_STROKE_STYLE, "EditSelectSameStrokeStyle", N_("Stroke St_yle"), N_("Select all objects with the same stroke style (width, dash, markers) as the selected objects"), GTK_STOCK_SELECT_ALL), + new EditVerb(SP_VERB_EDIT_SELECT_SAME_OBJECT_TYPE, "EditSelectSameObjectType", N_("_Object Type"), + N_("Select all objects with the same object type (rect, arc, text, path, bitmap etc) as the selected objects"), GTK_STOCK_SELECT_ALL), new EditVerb(SP_VERB_EDIT_INVERT, "EditInvert", N_("In_vert Selection"), N_("Invert selection (unselect what is selected and select everything else)"), INKSCAPE_ICON("edit-select-invert")), new EditVerb(SP_VERB_EDIT_INVERT_IN_ALL_LAYERS, "EditInvertInAllLayers", N_("Invert in All Layers"), -- cgit v1.2.3 From 9f1b38797e6f17f1abe302bb5cecfc51b6c94529 Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Wed, 15 Aug 2012 21:20:02 +0200 Subject: i18n. Fix for Bug #1034663 (Split msgid "Text" for menu Effects). Translations. inkscape.pot and French translation update. (bzr r11606) --- src/verbs.cpp | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index ae9e53cbe..7769a45f4 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -2508,51 +2508,51 @@ Verb *Verb::_base_verbs[] = { N_("Remove clipping path from selection"), NULL), // Tools - new ContextVerb(SP_VERB_CONTEXT_SELECT, "ToolSelector", N_("Select"), + new ContextVerb(SP_VERB_CONTEXT_SELECT, "ToolSelector", NC_("ContextVerb", "Select"), N_("Select and transform objects"), INKSCAPE_ICON("tool-pointer")), - new ContextVerb(SP_VERB_CONTEXT_NODE, "ToolNode", N_("Node Edit"), + new ContextVerb(SP_VERB_CONTEXT_NODE, "ToolNode", NC_("ContextVerb", "Node Edit"), N_("Edit paths by nodes"), INKSCAPE_ICON("tool-node-editor")), - new ContextVerb(SP_VERB_CONTEXT_TWEAK, "ToolTweak", N_("Tweak"), + new ContextVerb(SP_VERB_CONTEXT_TWEAK, "ToolTweak", NC_("ContextVerb", "Tweak"), N_("Tweak objects by sculpting or painting"), INKSCAPE_ICON("tool-tweak")), - new ContextVerb(SP_VERB_CONTEXT_SPRAY, "ToolSpray", N_("Spray"), + new ContextVerb(SP_VERB_CONTEXT_SPRAY, "ToolSpray", NC_("ContextVerb", "Spray"), N_("Spray objects by sculpting or painting"), INKSCAPE_ICON("tool-spray")), - new ContextVerb(SP_VERB_CONTEXT_RECT, "ToolRect", N_("Rectangle"), + new ContextVerb(SP_VERB_CONTEXT_RECT, "ToolRect", NC_("ContextVerb", "Rectangle"), N_("Create rectangles and squares"), INKSCAPE_ICON("draw-rectangle")), - new ContextVerb(SP_VERB_CONTEXT_3DBOX, "Tool3DBox", N_("3D Box"), + new ContextVerb(SP_VERB_CONTEXT_3DBOX, "Tool3DBox", NC_("ContextVerb", "3D Box"), N_("Create 3D boxes"), INKSCAPE_ICON("draw-cuboid")), - new ContextVerb(SP_VERB_CONTEXT_ARC, "ToolArc", N_("Ellipse"), + new ContextVerb(SP_VERB_CONTEXT_ARC, "ToolArc", NC_("ContextVerb", "Ellipse"), N_("Create circles, ellipses, and arcs"), INKSCAPE_ICON("draw-ellipse")), - new ContextVerb(SP_VERB_CONTEXT_STAR, "ToolStar", N_("Star"), + new ContextVerb(SP_VERB_CONTEXT_STAR, "ToolStar", NC_("ContextVerb", "Star"), N_("Create stars and polygons"), INKSCAPE_ICON("draw-polygon-star")), - new ContextVerb(SP_VERB_CONTEXT_SPIRAL, "ToolSpiral", N_("Spiral"), + new ContextVerb(SP_VERB_CONTEXT_SPIRAL, "ToolSpiral", NC_("ContextVerb", "Spiral"), N_("Create spirals"), INKSCAPE_ICON("draw-spiral")), - new ContextVerb(SP_VERB_CONTEXT_PENCIL, "ToolPencil", N_("Pencil"), + new ContextVerb(SP_VERB_CONTEXT_PENCIL, "ToolPencil", NC_("ContextVerb", "Pencil"), N_("Draw freehand lines"), INKSCAPE_ICON("draw-freehand")), - new ContextVerb(SP_VERB_CONTEXT_PEN, "ToolPen", N_("Pen"), + new ContextVerb(SP_VERB_CONTEXT_PEN, "ToolPen", NC_("ContextVerb", "Pen"), N_("Draw Bezier curves and straight lines"), INKSCAPE_ICON("draw-path")), - new ContextVerb(SP_VERB_CONTEXT_CALLIGRAPHIC, "ToolCalligraphic", N_("Calligraphy"), + new ContextVerb(SP_VERB_CONTEXT_CALLIGRAPHIC, "ToolCalligraphic", NC_("ContextVerb", "Calligraphy"), N_("Draw calligraphic or brush strokes"), INKSCAPE_ICON("draw-calligraphic")), - new ContextVerb(SP_VERB_CONTEXT_TEXT, "ToolText", N_("Text"), + new ContextVerb(SP_VERB_CONTEXT_TEXT, "ToolText", NC_("ContextVerb", "Text"), N_("Create and edit text objects"), INKSCAPE_ICON("draw-text")), - new ContextVerb(SP_VERB_CONTEXT_GRADIENT, "ToolGradient", N_("Gradient"), + new ContextVerb(SP_VERB_CONTEXT_GRADIENT, "ToolGradient", NC_("ContextVerb", "Gradient"), N_("Create and edit gradients"), INKSCAPE_ICON("color-gradient")), - new ContextVerb(SP_VERB_CONTEXT_MESH, "ToolMesh", N_("Mesh"), + new ContextVerb(SP_VERB_CONTEXT_MESH, "ToolMesh", NC_("ContextVerb", "Mesh"), N_("Create and edit meshes"), INKSCAPE_ICON("mesh-gradient")), - new ContextVerb(SP_VERB_CONTEXT_ZOOM, "ToolZoom", N_("Zoom"), + new ContextVerb(SP_VERB_CONTEXT_ZOOM, "ToolZoom", NC_("ContextVerb", "Zoom"), N_("Zoom in or out"), INKSCAPE_ICON("zoom")), - new ContextVerb(SP_VERB_CONTEXT_MEASURE, "ToolMeasure", NC_("Measurement tool", "Measure"), + new ContextVerb(SP_VERB_CONTEXT_MEASURE, "ToolMeasure", NC_("ContextVerb", "Measure"), N_("Measurement tool"), INKSCAPE_ICON("tool-measure")), - new ContextVerb(SP_VERB_CONTEXT_DROPPER, "ToolDropper", N_("Dropper"), + new ContextVerb(SP_VERB_CONTEXT_DROPPER, "ToolDropper", NC_("ContextVerb", "Dropper"), N_("Pick colors from image"), INKSCAPE_ICON("color-picker")), - new ContextVerb(SP_VERB_CONTEXT_CONNECTOR, "ToolConnector", N_("Connector"), + new ContextVerb(SP_VERB_CONTEXT_CONNECTOR, "ToolConnector", NC_("ContextVerb", "Connector"), N_("Create diagram connectors"), INKSCAPE_ICON("draw-connector")), - new ContextVerb(SP_VERB_CONTEXT_PAINTBUCKET, "ToolPaintBucket", N_("Paint Bucket"), + new ContextVerb(SP_VERB_CONTEXT_PAINTBUCKET, "ToolPaintBucket", NC_("ContextVerb", "Paint Bucket"), N_("Fill bounded areas"), INKSCAPE_ICON("color-fill")), - new ContextVerb(SP_VERB_CONTEXT_LPE, "ToolLPE", N_("LPE Edit"), + new ContextVerb(SP_VERB_CONTEXT_LPE, "ToolLPE", NC_("ContextVerb", "LPE Edit"), N_("Edit Path Effect parameters"), NULL), - new ContextVerb(SP_VERB_CONTEXT_ERASER, "ToolEraser", N_("Eraser"), + new ContextVerb(SP_VERB_CONTEXT_ERASER, "ToolEraser", NC_("ContextVerb", "Eraser"), N_("Erase existing paths"), INKSCAPE_ICON("draw-eraser")), - new ContextVerb(SP_VERB_CONTEXT_LPETOOL, "ToolLPETool", N_("LPE Tool"), + new ContextVerb(SP_VERB_CONTEXT_LPETOOL, "ToolLPETool", NC_("ContextVerb", "LPE Tool"), N_("Do geometric constructions"), "draw-geometry"), // Tool prefs new ContextVerb(SP_VERB_CONTEXT_SELECT_PREFS, "SelectPrefs", N_("Selector Preferences"), -- cgit v1.2.3 From a06f7c7fc9eacaf6f90eca8ad7190d2ffb700b85 Mon Sep 17 00:00:00 2001 From: John Smith Date: Sat, 18 Aug 2012 17:30:07 +0900 Subject: Fix for 189535 : align verbs and by keys (bzr r11611) --- src/verbs.cpp | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 7769a45f4..76d06cb3c 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -66,6 +66,7 @@ #include "sp-namedview.h" #include "text-chemistry.h" #include "tools-switch.h" +#include "ui/dialog/align-and-distribute.h" #include "ui/dialog/clonetiler.h" #include "ui/dialog/dialog-manager.h" #include "ui/dialog/document-properties.h" @@ -85,6 +86,7 @@ #include using Inkscape::DocumentUndo; +using Inkscape::UI::Dialog::ActionAlign; //#ifdef WITH_INKBOARD //#include "jabber_whiteboard/session-manager.h" @@ -1634,6 +1636,19 @@ void ContextVerb::perform(SPAction *action, void *data) prefs->setInt("/dialogs/preferences/page", PREFS_PAGE_TOOLS_LPETOOL); dt->_dlg_mgr->showDialog("InkscapePreferences"); break; + case SP_VERB_ALIGN_HORIZONTAL_RIGHT_TO_ANCHOR: + case SP_VERB_ALIGN_HORIZONTAL_LEFT: + case SP_VERB_ALIGN_HORIZONTAL_CENTER: + case SP_VERB_ALIGN_HORIZONTAL_RIGHT: + case SP_VERB_ALIGN_HORIZONTAL_LEFT_TO_ANCHOR: + case SP_VERB_ALIGN_VERTICAL_BOTTOM_TO_ANCHOR: + case SP_VERB_ALIGN_VERTICAL_TOP: + case SP_VERB_ALIGN_VERTICAL_CENTER: + case SP_VERB_ALIGN_VERTICAL_BOTTOM: + case SP_VERB_ALIGN_VERTICAL_TOP_TO_ANCHOR: + case SP_VERB_ALIGN_VERTICAL_HORIZONTAL_CENTER: + ActionAlign::do_verb_action(dt, verb); + break; default: break; @@ -2599,7 +2614,6 @@ Verb *Verb::_base_verbs[] = { N_("Open Preferences for the Eraser tool"), NULL), new ContextVerb(SP_VERB_CONTEXT_LPETOOL_PREFS, "LPEToolPrefs", N_("LPE Tool Preferences"), N_("Open Preferences for the LPETool tool"), NULL), - // Zoom/View new ZoomVerb(SP_VERB_ZOOM_IN, "ZoomIn", N_("Zoom In"), N_("Zoom in"), INKSCAPE_ICON("zoom-in")), new ZoomVerb(SP_VERB_ZOOM_OUT, "ZoomOut", N_("Zoom Out"), N_("Zoom out"), INKSCAPE_ICON("zoom-out")), @@ -2781,6 +2795,32 @@ Verb *Verb::_base_verbs[] = { N_("Link an ICC color profile"), NULL), new EditVerb(SP_VERB_EDIT_REMOVE_COLOR_PROFILE, "RemoveColorProfile", N_("Remove Color Profile"), N_("Remove a linked ICC color profile"), NULL), + + // Align + new ContextVerb(SP_VERB_ALIGN_HORIZONTAL_RIGHT_TO_ANCHOR, "AlignHorizontalRightToAnchor", N_("Align right edges of objects to the left edge of the anchor"), + N_("Align right edges of objects to the left edge of the anchor"), INKSCAPE_ICON("align-horizontal-right-to-anchor")), + new ContextVerb(SP_VERB_ALIGN_HORIZONTAL_LEFT, "AlignHorizontalLeft", N_("Align left edges"), + N_("Align left edges"), INKSCAPE_ICON("align-horizontal-left")), + new ContextVerb(SP_VERB_ALIGN_HORIZONTAL_CENTER, "AlignHorizontalCenter", N_("Center on vertical axis"), + N_("Center on vertical axis"), INKSCAPE_ICON("align-horizontal-center")), + new ContextVerb(SP_VERB_ALIGN_HORIZONTAL_RIGHT, "AlignHorizontalRight", N_("Align right sides"), + N_("Align right sides"), INKSCAPE_ICON("align-horizontal-right")), + new ContextVerb(SP_VERB_ALIGN_HORIZONTAL_LEFT_TO_ANCHOR, "AlignHorizontalLeftToAnchor", N_("Align left edges of objects to the right edge of the anchor"), + N_("Align left edges of objects to the right edge of the anchor"), INKSCAPE_ICON("align-horizontal-left-to-anchor")), + new ContextVerb(SP_VERB_ALIGN_VERTICAL_BOTTOM_TO_ANCHOR, "AlignVerticalBottomToAnchor", N_("Align bottom edges of objects to the top edge of the anchor"), + N_("Align bottom edges of objects to the top edge of the anchor"), INKSCAPE_ICON("align-vertical-bottom-to-anchor")), + new ContextVerb(SP_VERB_ALIGN_VERTICAL_TOP, "AlignVerticalTop", N_("Align top edges"), + N_("Align top edges"), INKSCAPE_ICON("align-vertical-top")), + new ContextVerb(SP_VERB_ALIGN_VERTICAL_CENTER, "AlignVerticalCenter", N_("Center on horizontal axis"), + N_("Center on horizontal axis"), INKSCAPE_ICON("align-vertical-center")), + new ContextVerb(SP_VERB_ALIGN_VERTICAL_BOTTOM, "AlignVerticalBottom", N_("Align bottom edges"), + N_("Align bottom edges"), INKSCAPE_ICON("align-vertical-bottom")), + new ContextVerb(SP_VERB_ALIGN_VERTICAL_TOP_TO_ANCHOR, "AlignVerticalTopToAnchor", N_("Align top edges of objects to the bottom edge of the anchor"), + N_("Align top edges of objects to the bottom edge of the anchor"), INKSCAPE_ICON("align-vertical-top-to-anchor")), + new ContextVerb(SP_VERB_ALIGN_VERTICAL_HORIZONTAL_CENTER, "AlignVerticalHorizontalCenter", N_("Center on horizontal and vertical axis"), + N_("Center on horizontal and vertical axis"), INKSCAPE_ICON("align-vertical-center")), + + // Footer new Verb(SP_VERB_LAST, " '\"invalid id", NULL, NULL, NULL) }; -- cgit v1.2.3 From 2390eade79c214723fec491347c751f781a95981 Mon Sep 17 00:00:00 2001 From: John Smith Date: Mon, 27 Aug 2012 15:52:27 +0900 Subject: Fix for 168446 : rename menu item Export to PNG Image (bzr r11623) --- src/verbs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 76d06cb3c..34379d341 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -2736,8 +2736,8 @@ Verb *Verb::_base_verbs[] = { N_("Edit SVG fonts"), NULL), new DialogVerb(SP_VERB_DIALOG_PRINT_COLORS_PREVIEW, "DialogPrintColorsPreview", N_("Print Colors..."), N_("Select which color separations to render in Print Colors Preview rendermode"), NULL), - new DialogVerb(SP_VERB_DIALOG_EXPORT, "DialogExport", N_("_Export Bitmap..."), - N_("Export this document or a selection as a bitmap image"), INKSCAPE_ICON("document-export")), + new DialogVerb(SP_VERB_DIALOG_EXPORT, "DialogExport", N_("_Export PNG Image..."), + N_("Export this document or a selection as a PNG image"), INKSCAPE_ICON("document-export")), // Help new HelpVerb(SP_VERB_HELP_ABOUT_EXTENSIONS, "HelpAboutExtensions", N_("About E_xtensions"), -- cgit v1.2.3 From 63a39634f03f1547888ef54e31ccd4b8c59ab9ee Mon Sep 17 00:00:00 2001 From: John Smith Date: Tue, 28 Aug 2012 14:46:52 +0900 Subject: Fix for 171915 : Fullscreen mode without toolbars shortcut (bzr r11628) --- src/verbs.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 34379d341..2c24ef36a 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1784,6 +1784,10 @@ void ZoomVerb::perform(SPAction *action, void *data) case SP_VERB_FULLSCREEN: dt->fullscreen(); break; + case SP_VERB_FULLSCREENFOCUS: + dt->fullscreen(); + dt->focusMode(!dt->is_fullscreen()); + break; #endif // HAVE_GTK_WINDOW_FULLSCREEN case SP_VERB_FOCUSTOGGLE: dt->focusMode(!dt->is_focusMode()); @@ -2635,6 +2639,8 @@ Verb *Verb::_base_verbs[] = { #ifdef HAVE_GTK_WINDOW_FULLSCREEN new ZoomVerb(SP_VERB_FULLSCREEN, "FullScreen", N_("_Fullscreen"), N_("Stretch this document window to full screen"), INKSCAPE_ICON("view-fullscreen")), + new ZoomVerb(SP_VERB_FULLSCREENFOCUS, "FullScreenFocus", N_("Fullscreen & Focus Mode"), Glib::ustring::format(N_("Stretch this document window to full screen"), N_(" and "), N_("Remove excess toolbars to focus on drawing")).c_str(), + INKSCAPE_ICON("view-fullscreen")), #endif // HAVE_GTK_WINDOW_FULLSCREEN new ZoomVerb(SP_VERB_FOCUSTOGGLE, "FocusToggle", N_("Toggle _Focus Mode"), N_("Remove excess toolbars to focus on drawing"), NULL), -- cgit v1.2.3 From ba7bc9962c95a891aab90b5665d813867d72a4c4 Mon Sep 17 00:00:00 2001 From: John Smith Date: Thu, 30 Aug 2012 08:27:47 +0900 Subject: Fix for 980520 : Conflicting accelerator keys (bzr r11631) --- src/verbs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 2c24ef36a..d02472383 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -2442,7 +2442,7 @@ Verb *Verb::_base_verbs[] = { // TRANSLATORS: "to trace" means "to convert a bitmap to vector graphics" (to vectorize) new SelectionVerb(SP_VERB_SELECTION_TRACE, "SelectionTrace", N_("_Trace Bitmap..."), N_("Create one or more paths from a bitmap by tracing it"), INKSCAPE_ICON("bitmap-trace")), - new SelectionVerb(SP_VERB_SELECTION_CREATE_BITMAP, "SelectionCreateBitmap", N_("_Make a Bitmap Copy"), + new SelectionVerb(SP_VERB_SELECTION_CREATE_BITMAP, "SelectionCreateBitmap", N_("Make a _Bitmap Copy"), N_("Export selection to a bitmap and insert it into document"), INKSCAPE_ICON("selection-make-bitmap-copy") ), new SelectionVerb(SP_VERB_SELECTION_COMBINE, "SelectionCombine", N_("_Combine"), N_("Combine several paths into one"), INKSCAPE_ICON("path-combine")), -- cgit v1.2.3 From 3f61bc675d5f2f0c92d7906b8552b09df3cd411f Mon Sep 17 00:00:00 2001 From: John Smith Date: Sat, 22 Sep 2012 21:14:14 +0900 Subject: Fix for 172222 : Move direct to specified layer (bzr r11695) --- src/verbs.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index d02472383..edfc45f8e 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1190,6 +1190,10 @@ void LayerVerb::perform(SPAction *action, void *data) sp_selection_to_prev_layer(dt); break; } + case SP_VERB_LAYER_MOVE_TO: { + Inkscape::UI::Dialogs::LayerPropertiesDialog::showMove(dt, dt->currentLayer()); + break; + } case SP_VERB_LAYER_TO_TOP: case SP_VERB_LAYER_TO_BOTTOM: case SP_VERB_LAYER_RAISE: @@ -2465,6 +2469,8 @@ Verb *Verb::_base_verbs[] = { N_("Move selection to the layer above the current"), INKSCAPE_ICON("selection-move-to-layer-above")), new LayerVerb(SP_VERB_LAYER_MOVE_TO_PREV, "LayerMoveToPrev", N_("Move Selection to Layer Bel_ow"), N_("Move selection to the layer below the current"), INKSCAPE_ICON("selection-move-to-layer-below")), + new LayerVerb(SP_VERB_LAYER_MOVE_TO, "LayerMoveTo", N_("Move Selection to Layer..."), + N_("Move selection to layer"), INKSCAPE_ICON("layer-rename")), new LayerVerb(SP_VERB_LAYER_TO_TOP, "LayerToTop", N_("Layer to _Top"), N_("Raise the current layer to the top"), INKSCAPE_ICON("layer-top")), new LayerVerb(SP_VERB_LAYER_TO_BOTTOM, "LayerToBottom", N_("Layer to _Bottom"), -- cgit v1.2.3 From 1208e5f7938731244720438bff526c0b6e07c54f Mon Sep 17 00:00:00 2001 From: John Smith Date: Tue, 9 Oct 2012 15:26:18 +0900 Subject: Fix for 191020 : Lock/Unlock all layers (bzr r11764) --- src/verbs.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index edfc45f8e..591280d47 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1342,17 +1342,27 @@ void LayerVerb::perform(SPAction *action, void *data) break; } case SP_VERB_LAYER_SHOW_ALL: { - dt->toggleAllLayers( false ); + dt->toggleHideAllLayers( false ); DocumentUndo::maybeDone(sp_desktop_document(dt), "layer:showall", SP_VERB_LAYER_SHOW_ALL, _("Show all layers")); break; } - case SP_VERB_LAYER_HIDE_ALL: { - dt->toggleAllLayers( true ); + dt->toggleHideAllLayers( true ); DocumentUndo::maybeDone(sp_desktop_document(dt), "layer:hideall", SP_VERB_LAYER_HIDE_ALL, _("Hide all layers")); break; } + case SP_VERB_LAYER_LOCK_ALL: { + dt->toggleLockAllLayers( true ); + DocumentUndo::maybeDone(sp_desktop_document(dt), "layer:lockall", SP_VERB_LAYER_LOCK_ALL, _("Lock all layers")); + break; + } + + case SP_VERB_LAYER_UNLOCK_ALL: { + dt->toggleLockAllLayers( false ); + DocumentUndo::maybeDone(sp_desktop_document(dt), "layer:unlockall", SP_VERB_LAYER_UNLOCK_ALL, _("Unlock all layers")); + break; + } case SP_VERB_LAYER_TOGGLE_LOCK: case SP_VERB_LAYER_TOGGLE_HIDE: { if ( dt->currentLayer() == dt->currentRoot() ) { @@ -2489,6 +2499,10 @@ Verb *Verb::_base_verbs[] = { N_("Show all the layers"), NULL), new LayerVerb(SP_VERB_LAYER_HIDE_ALL, "LayerHideAll", N_("_Hide all layers"), N_("Hide all the layers"), NULL), + new LayerVerb(SP_VERB_LAYER_LOCK_ALL, "LayerLockAll", N_("_Lock all layers"), + N_("Lock all the layers"), NULL), + new LayerVerb(SP_VERB_LAYER_UNLOCK_ALL, "LayerUnlockAll", N_("_Unlock all layers"), + N_("Unlock all the layers"), NULL), new LayerVerb(SP_VERB_LAYER_TOGGLE_LOCK, "LayerToggleLock", N_("_Lock/Unlock Current Layer"), N_("Toggle lock on current layer"), NULL), new LayerVerb(SP_VERB_LAYER_TOGGLE_HIDE, "LayerToggleHide", N_("_Show/hide Current Layer"), -- cgit v1.2.3 From 3ca2c298a152f092b99d0c9978a47deec787ed8c Mon Sep 17 00:00:00 2001 From: John Smith Date: Thu, 11 Oct 2012 17:03:21 +0900 Subject: Fix for 171904 : toggleToolbox verb (bzr r11778) --- src/verbs.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 591280d47..55d114e9d 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1785,6 +1785,24 @@ void ZoomVerb::perform(SPAction *action, void *data) case SP_VERB_TOGGLE_SCROLLBARS: dt->toggleScrollbars(); break; + case SP_VERB_TOGGLE_COMMANDS_TOOLBAR: + dt->toggleToolbar("commands"); + break; + case SP_VERB_TOGGLE_SNAP_TOOLBAR: + dt->toggleToolbar("snaptoolbox"); + break; + case SP_VERB_TOGGLE_TOOL_TOOLBAR: + dt->toggleToolbar("toppanel"); + break; + case SP_VERB_TOGGLE_TOOLBOX: + dt->toggleToolbar("toolbox"); + break; + case SP_VERB_TOGGLE_PALETTE: + dt->toggleToolbar("panels"); + break; + case SP_VERB_TOGGLE_STATUSBAR: + dt->toggleToolbar("statusbar"); + break; case SP_VERB_TOGGLE_GUIDES: sp_namedview_toggle_guides(doc, repr); break; @@ -1843,6 +1861,7 @@ void ZoomVerb::perform(SPAction *action, void *data) inkscape_dialogs_unhide(); dt->_dlg_mgr->showDialog("IconPreviewPanel"); break; + default: break; } @@ -2646,6 +2665,12 @@ Verb *Verb::_base_verbs[] = { new ZoomVerb(SP_VERB_TOGGLE_GRID, "ToggleGrid", N_("_Grid"), N_("Show or hide the grid"), INKSCAPE_ICON("show-grid")), new ZoomVerb(SP_VERB_TOGGLE_GUIDES, "ToggleGuides", N_("G_uides"), N_("Show or hide guides (drag from a ruler to create a guide)"), INKSCAPE_ICON("show-guides")), new ZoomVerb(SP_VERB_TOGGLE_SNAPPING, "ToggleSnapGlobal", N_("Snap"), N_("Enable snapping"), INKSCAPE_ICON("snap")), + new ZoomVerb(SP_VERB_TOGGLE_COMMANDS_TOOLBAR, "ToggleCommandsToolbar", N_("_Commands Bar"), N_("Show or hide the Commands bar (under the menu)"), NULL), + new ZoomVerb(SP_VERB_TOGGLE_SNAP_TOOLBAR, "ToggleSnapToolbar", N_("Sn_ap Controls Bar"), N_("Show or hide the snapping controls"), NULL), + new ZoomVerb(SP_VERB_TOGGLE_TOOL_TOOLBAR, "ToggleToolToolbar", N_("T_ool Controls Bar"), N_("Show or hide the Tool Controls bar"), NULL), + new ZoomVerb(SP_VERB_TOGGLE_TOOLBOX, "ToggleToolbox", N_("_Toolbox"), N_("Show or hide the main toolbox (on the left)"), NULL), + new ZoomVerb(SP_VERB_TOGGLE_PALETTE, "TogglePalette", N_("_Palette"), N_("Show or hide the color palette"), NULL), + new ZoomVerb(SP_VERB_TOGGLE_STATUSBAR, "ToggleStatusbar", N_("_Statusbar"), N_("Show or hide the statusbar (at the bottom of the window)"), NULL), new ZoomVerb(SP_VERB_ZOOM_NEXT, "ZoomNext", N_("Nex_t Zoom"), N_("Next zoom (from the history of zooms)"), INKSCAPE_ICON("zoom-next")), new ZoomVerb(SP_VERB_ZOOM_PREV, "ZoomPrev", N_("Pre_vious Zoom"), N_("Previous zoom (from the history of zooms)"), -- cgit v1.2.3 From c520388928f8cc85d91f24a2f01fa7549096fe83 Mon Sep 17 00:00:00 2001 From: John Smith Date: Thu, 11 Oct 2012 18:43:21 +0900 Subject: Fix for 191020 : Lock/Unlock all layers - Lock other layers (bzr r11779) --- src/verbs.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 55d114e9d..450b800c1 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1351,13 +1351,20 @@ void LayerVerb::perform(SPAction *action, void *data) DocumentUndo::maybeDone(sp_desktop_document(dt), "layer:hideall", SP_VERB_LAYER_HIDE_ALL, _("Hide all layers")); break; } - case SP_VERB_LAYER_LOCK_ALL: { dt->toggleLockAllLayers( true ); DocumentUndo::maybeDone(sp_desktop_document(dt), "layer:lockall", SP_VERB_LAYER_LOCK_ALL, _("Lock all layers")); break; } - + case SP_VERB_LAYER_LOCK_OTHERS: { + if ( dt->currentLayer() == dt->currentRoot() ) { + dt->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("No current layer.")); + } else { + dt->toggleLockOtherLayers( dt->currentLayer() ); + DocumentUndo::maybeDone(sp_desktop_document(dt), "layer:lockothers", SP_VERB_LAYER_LOCK_OTHERS, _("Lock other layers")); + } + break; + } case SP_VERB_LAYER_UNLOCK_ALL: { dt->toggleLockAllLayers( false ); DocumentUndo::maybeDone(sp_desktop_document(dt), "layer:unlockall", SP_VERB_LAYER_UNLOCK_ALL, _("Unlock all layers")); @@ -2520,6 +2527,8 @@ Verb *Verb::_base_verbs[] = { N_("Hide all the layers"), NULL), new LayerVerb(SP_VERB_LAYER_LOCK_ALL, "LayerLockAll", N_("_Lock all layers"), N_("Lock all the layers"), NULL), + new LayerVerb(SP_VERB_LAYER_LOCK_OTHERS, "LayerLockOthers", N_("Lock/Unlock _other layers"), + N_("Lock all the other layers"), NULL), new LayerVerb(SP_VERB_LAYER_UNLOCK_ALL, "LayerUnlockAll", N_("_Unlock all layers"), N_("Unlock all the layers"), NULL), new LayerVerb(SP_VERB_LAYER_TOGGLE_LOCK, "LayerToggleLock", N_("_Lock/Unlock Current Layer"), -- cgit v1.2.3 From f304ab600788b02cb02a4413f68f466e35cf1539 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Thu, 11 Oct 2012 19:54:14 +0200 Subject: Add symbols dialog. See: http://wiki.inkscape.org/wiki/index.php/SymbolsDialog (bzr r11782) --- src/verbs.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 450b800c1..8c45ce665 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -78,6 +78,7 @@ #include "ui/dialog/layers.h" #include "ui/dialog/object-properties.h" #include "ui/dialog/swatches.h" +#include "ui/dialog/symbols.h" #include "ui/dialog/spellcheck.h" #include "ui/icon-names.h" #include "ui/tool/node-tool.h" @@ -957,6 +958,12 @@ void EditVerb::perform(SPAction *action, void *data) case SP_VERB_EDIT_UNTILE: sp_selection_untile(dt); break; + case SP_VERB_EDIT_SYMBOL: + sp_selection_symbol(dt); + break; + case SP_VERB_EDIT_UNSYMBOL: + sp_selection_unsymbol(dt); + break; case SP_VERB_EDIT_CLEAR_ALL: sp_edit_clear_all(dt); break; @@ -1912,6 +1919,9 @@ void DialogVerb::perform(SPAction *action, void *data) case SP_VERB_DIALOG_SWATCHES: dt->_dlg_mgr->showDialog("Swatches"); break; + case SP_VERB_DIALOG_SYMBOLS: + dt->_dlg_mgr->showDialog("Symbols"); + break; case SP_VERB_DIALOG_TRANSFORM: dt->_dlg_mgr->showDialog("Transformation"); break; @@ -2375,6 +2385,10 @@ Verb *Verb::_base_verbs[] = { N_("Convert selection to a rectangle with tiled pattern fill"), NULL), new EditVerb(SP_VERB_EDIT_UNTILE, "ObjectsFromPattern", N_("Pattern to _Objects"), N_("Extract objects from a tiled pattern fill"), NULL), + new EditVerb(SP_VERB_EDIT_SYMBOL, "ObjectsToSymbol", N_("Group to Symbol"), + N_("Convert group to a symbol"), NULL), + new EditVerb(SP_VERB_EDIT_UNSYMBOL, "ObjectsFromSymbol", N_("Symbol to Group"), + N_("Extract group from a symbol"), NULL), new EditVerb(SP_VERB_EDIT_CLEAR_ALL, "EditClearAll", N_("Clea_r All"), N_("Delete all objects from document"), NULL), new EditVerb(SP_VERB_EDIT_SELECT_ALL, "EditSelectAll", N_("Select Al_l"), @@ -2748,6 +2762,8 @@ Verb *Verb::_base_verbs[] = { // TRANSLATORS: "Swatches" means: color samples new DialogVerb(SP_VERB_DIALOG_SWATCHES, "DialogSwatches", N_("S_watches..."), N_("Select colors from a swatches palette"), GTK_STOCK_SELECT_COLOR), + new DialogVerb(SP_VERB_DIALOG_SYMBOLS, "DialogSymbols", N_("S_ymbols..."), + N_("Select symbol from a symbols palette"), GTK_STOCK_SELECT_COLOR), new DialogVerb(SP_VERB_DIALOG_TRANSFORM, "DialogTransform", N_("Transfor_m..."), N_("Precisely control objects' transformations"), INKSCAPE_ICON("dialog-transform")), new DialogVerb(SP_VERB_DIALOG_ALIGN_DISTRIBUTE, "DialogAlignDistribute", N_("_Align and Distribute..."), -- cgit v1.2.3 From 60141f6bdf22a0efad3baff5a944d15a2b28f728 Mon Sep 17 00:00:00 2001 From: John Smith Date: Sun, 25 Nov 2012 13:53:29 +0900 Subject: Fix for 1036059 : Keyboard shortcut editor (bzr r11895) --- src/verbs.cpp | 59 +++++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 20 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 8c45ce665..bbadb1a25 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -133,7 +133,7 @@ public: gchar const *name, gchar const *tip, gchar const *image) : - Verb(code, id, name, tip, image) + Verb(code, id, name, tip, image, _("File")) { } }; // FileVerb class @@ -152,7 +152,7 @@ public: gchar const *name, gchar const *tip, gchar const *image) : - Verb(code, id, name, tip, image) + Verb(code, id, name, tip, image, _("Edit")) { } }; // EditVerb class @@ -171,7 +171,7 @@ public: gchar const *name, gchar const *tip, gchar const *image) : - Verb(code, id, name, tip, image) + Verb(code, id, name, tip, image, _("Selection")) { } }; // SelectionVerb class @@ -190,7 +190,7 @@ public: gchar const *name, gchar const *tip, gchar const *image) : - Verb(code, id, name, tip, image) + Verb(code, id, name, tip, image, _("Layer")) { } }; // LayerVerb class @@ -209,7 +209,7 @@ public: gchar const *name, gchar const *tip, gchar const *image) : - Verb(code, id, name, tip, image) + Verb(code, id, name, tip, image, _("Object")) { } }; // ObjectVerb class @@ -228,7 +228,7 @@ public: gchar const *name, gchar const *tip, gchar const *image) : - Verb(code, id, name, tip, image) + Verb(code, id, name, tip, image, _("Context")) { } }; // ContextVerb class @@ -247,7 +247,7 @@ public: gchar const *name, gchar const *tip, gchar const *image) : - Verb(code, id, name, tip, image) + Verb(code, id, name, tip, image, _("View")) { } }; // ZoomVerb class @@ -267,7 +267,7 @@ public: gchar const *name, gchar const *tip, gchar const *image) : - Verb(code, id, name, tip, image) + Verb(code, id, name, tip, image, _("Dialog")) { } }; // DialogVerb class @@ -286,7 +286,7 @@ public: gchar const *name, gchar const *tip, gchar const *image) : - Verb(code, id, name, tip, image) + Verb(code, id, name, tip, image, _("Help")) { } }; // HelpVerb class @@ -305,7 +305,7 @@ public: gchar const *name, gchar const *tip, gchar const *image) : - Verb(code, id, name, tip, image) + Verb(code, id, name, tip, image, _("Help")) { } }; // TutorialVerb class @@ -324,7 +324,7 @@ public: gchar const *name, gchar const *tip, gchar const *image) : - Verb(code, id, name, tip, image) + Verb(code, id, name, tip, image, _("Text")) { } }; //TextVerb : public Verb @@ -341,7 +341,7 @@ Verb::VerbIDTable Verb::_verb_ids; * each call it is incremented. The list of allocated verbs is kept * in the \c _verbs hashtable which is indexed by the \c code. */ -Verb::Verb(gchar const *id, gchar const *name, gchar const *tip, gchar const *image) : +Verb::Verb(gchar const *id, gchar const *name, gchar const *tip, gchar const *image, gchar const *group) : _actions(0), _id(id), _name(name), @@ -350,6 +350,7 @@ Verb::Verb(gchar const *id, gchar const *name, gchar const *tip, gchar const *im _shortcut(0), _image(image), _code(0), + _group(group), _default_sensitive(false) { static int count = SP_VERB_LAST; @@ -2002,6 +2003,7 @@ void DialogVerb::perform(SPAction *action, void *data) case SP_VERB_DIALOG_PRINT_COLORS_PREVIEW: dt->_dlg_mgr->showDialog("PrintColorsPreviewDialog"); break; + default: break; } @@ -2104,7 +2106,7 @@ public: gchar const *name, gchar const *tip, gchar const *image) : - Verb(code, id, name, tip, image) + Verb(code, id, name, tip, image, _("Extensions")) { set_default_sensitive(false); } @@ -2169,7 +2171,7 @@ public: gchar const *name, gchar const *tip, gchar const *image) : - Verb(code, id, name, tip, image) + Verb(code, id, name, tip, image, _("View")) { set_default_sensitive(false); } @@ -2235,7 +2237,7 @@ public: gchar const *name, gchar const *tip, gchar const *image) : - Verb(code, id, name, tip, image) + Verb(code, id, name, tip, image, _("Layer")) { set_default_sensitive(true); } @@ -2294,8 +2296,8 @@ void LockAndHideVerb::perform(SPAction *action, void *data) // these must be in the same order as the SP_VERB_* enum in "verbs.h" Verb *Verb::_base_verbs[] = { // Header - new Verb(SP_VERB_INVALID, NULL, NULL, NULL, NULL), - new Verb(SP_VERB_NONE, "None", N_("None"), N_("Does nothing"), NULL), + new Verb(SP_VERB_INVALID, NULL, NULL, NULL, NULL, NULL), + new Verb(SP_VERB_NONE, "None", N_("None"), N_("Does nothing"), NULL, NULL), // File new FileVerb(SP_VERB_FILE_NEW, "FileNew", N_("Default"), N_("Create new document from the default template"), @@ -2707,7 +2709,7 @@ Verb *Verb::_base_verbs[] = { #ifdef HAVE_GTK_WINDOW_FULLSCREEN new ZoomVerb(SP_VERB_FULLSCREEN, "FullScreen", N_("_Fullscreen"), N_("Stretch this document window to full screen"), INKSCAPE_ICON("view-fullscreen")), - new ZoomVerb(SP_VERB_FULLSCREENFOCUS, "FullScreenFocus", N_("Fullscreen & Focus Mode"), Glib::ustring::format(N_("Stretch this document window to full screen"), N_(" and "), N_("Remove excess toolbars to focus on drawing")).c_str(), + new ZoomVerb(SP_VERB_FULLSCREENFOCUS, "FullScreenFocus", N_("Fullscreen & Focus Mode"), N_("Stretch this document window to full screen"), INKSCAPE_ICON("view-fullscreen")), #endif // HAVE_GTK_WINDOW_FULLSCREEN new ZoomVerb(SP_VERB_FOCUSTOGGLE, "FocusToggle", N_("Toggle _Focus Mode"), N_("Remove excess toolbars to focus on drawing"), @@ -2814,7 +2816,6 @@ Verb *Verb::_base_verbs[] = { N_("Select which color separations to render in Print Colors Preview rendermode"), NULL), new DialogVerb(SP_VERB_DIALOG_EXPORT, "DialogExport", N_("_Export PNG Image..."), N_("Export this document or a selection as a PNG image"), INKSCAPE_ICON("document-export")), - // Help new HelpVerb(SP_VERB_HELP_ABOUT_EXTENSIONS, "HelpAboutExtensions", N_("About E_xtensions"), N_("Information on Inkscape extensions"), NULL), @@ -2898,9 +2899,27 @@ Verb *Verb::_base_verbs[] = { // Footer - new Verb(SP_VERB_LAST, " '\"invalid id", NULL, NULL, NULL) + new Verb(SP_VERB_LAST, " '\"invalid id", NULL, NULL, NULL, NULL) }; +std::vector +Verb::getList (void) { + + std::vector verbs; + // Go through the dynamic verb table + for (VerbTable::iterator iter = _verbs.begin(); iter != _verbs.end(); ++iter) { + Verb * verb = iter->second; + if (verb->get_code() == SP_VERB_INVALID || + verb->get_code() == SP_VERB_NONE || + verb->get_code() == SP_VERB_LAST) { + continue; + } + + verbs.push_back(verb); + } + + return verbs; +}; void Verb::list (void) { -- cgit v1.2.3 From 8764988ec95bd0fc0f26aaa79612284c8b667b9c Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Mon, 4 Mar 2013 17:21:11 +0000 Subject: Drop dead Inkboard code. Config flag no longer exists (bzr r12173) --- src/verbs.cpp | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index bbadb1a25..cdeeab99a 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -89,10 +89,6 @@ using Inkscape::DocumentUndo; using Inkscape::UI::Dialog::ActionAlign; -//#ifdef WITH_INKBOARD -//#include "jabber_whiteboard/session-manager.h" -//#endif - /** * Return the name without underscores and ellipsis, for use in dialog * titles, etc. Allocated memory must be freed by caller. @@ -1972,13 +1968,6 @@ void DialogVerb::perform(SPAction *action, void *data) //sp_item_dialog(); dt->_dlg_mgr->showDialog("ObjectProperties"); break; -/*#ifdef WITH_INKBOARD - case SP_VERB_XMPP_CLIENT: - { - Inkscape::Whiteboard::SessionManager::showClient(); - break; - } -#endif*/ case SP_VERB_DIALOG_INPUT: dt->_dlg_mgr->showDialog("InputDevices"); break; @@ -2796,10 +2785,6 @@ Verb *Verb::_base_verbs[] = { N_("Edit the object attributes..."), INKSCAPE_ICON("dialog-object-attributes")), new DialogVerb(SP_VERB_DIALOG_ITEM, "DialogObjectProperties", N_("_Object Properties..."), N_("Edit the ID, locked and visible status, and other object properties"), INKSCAPE_ICON("dialog-object-properties")), -/*#ifdef WITH_INKBOARD - new DialogVerb(SP_VERB_XMPP_CLIENT, "DialogXmppClient", - N_("_Instant Messaging..."), N_("Jabber Instant Messaging Client"), NULL), -#endif*/ new DialogVerb(SP_VERB_DIALOG_INPUT, "DialogInput", N_("_Input Devices..."), N_("Configure extended input devices, such as a graphics tablet"), INKSCAPE_ICON("dialog-input-devices")), new DialogVerb(SP_VERB_DIALOG_EXTENSIONEDITOR, "org.inkscape.dialogs.extensioneditor", N_("_Extensions..."), -- cgit v1.2.3 From 089e261458bbae1efd61f638336b58d825023296 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Mon, 18 Mar 2013 12:55:10 +0000 Subject: Drop old (unused) find dialog files (bzr r12223) --- src/verbs.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index cdeeab99a..f8bfbab40 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -39,7 +39,6 @@ #include "bind/javabind.h" #include "desktop.h" #include "desktop-handles.h" -#include "dialogs/find.h" #include "display/curve.h" #include "document.h" #include "draw-context.h" -- cgit v1.2.3 From 08a6910ae3366ca64e9da171c3e016bf93ac34b6 Mon Sep 17 00:00:00 2001 From: Raphael Rosch Date: Fri, 22 Mar 2013 17:01:41 -0400 Subject: pick a better filter editor icon Fixed bugs: - https://launchpad.net/bugs/1092313 (bzr r12231) --- src/verbs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index f8bfbab40..b8e72bc9b 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -2793,7 +2793,7 @@ Verb *Verb::_base_verbs[] = { new DialogVerb(SP_VERB_DIALOG_LIVE_PATH_EFFECT, "DialogLivePathEffect", N_("Path E_ffects ..."), N_("Manage, edit, and apply path effects"), NULL), new DialogVerb(SP_VERB_DIALOG_FILTER_EFFECTS, "DialogFilterEffects", N_("Filter _Editor..."), - N_("Manage, edit, and apply SVG filters"), NULL), + N_("Manage, edit, and apply SVG filters"), INKSCAPE_ICON("dialog-filters")), new DialogVerb(SP_VERB_DIALOG_SVG_FONTS, "DialogSVGFonts", N_("SVG Font Editor..."), N_("Edit SVG fonts"), NULL), new DialogVerb(SP_VERB_DIALOG_PRINT_COLORS_PREVIEW, "DialogPrintColorsPreview", N_("Print Colors..."), -- cgit v1.2.3 From 7b741b16f2494156eb9c5a673fa3b008b953c25d Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Thu, 18 Apr 2013 13:31:04 -0400 Subject: Change symbols icon and give minimum size for dialog (bzr r12278) --- src/verbs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index b8e72bc9b..4777e168c 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -2753,7 +2753,7 @@ Verb *Verb::_base_verbs[] = { new DialogVerb(SP_VERB_DIALOG_SWATCHES, "DialogSwatches", N_("S_watches..."), N_("Select colors from a swatches palette"), GTK_STOCK_SELECT_COLOR), new DialogVerb(SP_VERB_DIALOG_SYMBOLS, "DialogSymbols", N_("S_ymbols..."), - N_("Select symbol from a symbols palette"), GTK_STOCK_SELECT_COLOR), + N_("Select symbol from a symbols palette"), INKSCAPE_ICON("symbols")), new DialogVerb(SP_VERB_DIALOG_TRANSFORM, "DialogTransform", N_("Transfor_m..."), N_("Precisely control objects' transformations"), INKSCAPE_ICON("dialog-transform")), new DialogVerb(SP_VERB_DIALOG_ALIGN_DISTRIBUTE, "DialogAlignDistribute", N_("_Align and Distribute..."), -- cgit v1.2.3 From a40d9996c9252ebf79b951e0023340870f0347af Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Tue, 23 Apr 2013 13:40:15 -0400 Subject: Allow multiple groups to be symbolised and replace groups with clones. (bzr r12300) --- src/verbs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 4777e168c..ec7cad8dd 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -955,7 +955,7 @@ void EditVerb::perform(SPAction *action, void *data) sp_selection_untile(dt); break; case SP_VERB_EDIT_SYMBOL: - sp_selection_symbol(dt); + sp_selection_symbols(dt); break; case SP_VERB_EDIT_UNSYMBOL: sp_selection_unsymbol(dt); -- cgit v1.2.3 From 3c82e8251460b21c8046a418a9fefb700db0a164 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Tue, 4 Jun 2013 01:52:40 -0700 Subject: Correct to compile against recent gtkmm, including updated macports versions. Fixes bug #1179338. Fixed bugs: - https://launchpad.net/bugs/1179338 (bzr r12346.1.1) --- src/verbs.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index ec7cad8dd..8d275aeb7 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -32,6 +32,8 @@ #include #include +#include + #include #include #include -- cgit v1.2.3 From 72d8e897c6b67e46b2a613c4743ef9c13de25059 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Thu, 6 Jun 2013 06:44:11 -0700 Subject: Added configure/ifdef guards to only bring in the needed #include if glibmm has it. (bzr r12353) --- src/verbs.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 8d275aeb7..6f83b3dfb 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -32,7 +32,9 @@ #include #include +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H #include +#endif #include #include -- cgit v1.2.3 From 18632069f19fc1255f509bffb6077cf9d00455ac Mon Sep 17 00:00:00 2001 From: Christoffer Holmstedt Date: Mon, 17 Jun 2013 19:16:47 +0200 Subject: Removed hard coded keybinding from event-context.cpp and added the appropiate function call in verbs.cpp (bzr r12379.1.1) --- src/verbs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 6f83b3dfb..3fdb97365 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -47,6 +47,7 @@ #include "document.h" #include "draw-context.h" #include "extension/effect.h" +#include "event-context.h" #include "file.h" #include "gradient-drag.h" #include "helper/action.h" @@ -1560,7 +1561,7 @@ void ContextVerb::perform(SPAction *action, void *data) tools_switch(dt, TOOLS_MEASURE); break; case SP_VERB_CONTEXT_DROPPER: - tools_switch(dt, TOOLS_DROPPER); + sp_toggle_dropper(dt); // Functionality defined in event-context.cpp break; case SP_VERB_CONTEXT_CONNECTOR: tools_switch(dt, TOOLS_CONNECTOR); -- cgit v1.2.3 From c3a160589a9cb41c70a56e5e7b66a65857a0d10e Mon Sep 17 00:00:00 2001 From: Eric Greveson Date: Mon, 1 Jul 2013 21:04:32 +0100 Subject: Factored layer model out into new Inkscape::LayerModel class. This allows Inkscape::Selection to use a LayerModel that is not associated with a UI. Changed the interface of verbs (SPAction) to use a new ActionContext rather than UI::View::View, again so that verbs may be used in a console mode. Modified boolean operation verbs to work in console-only mode. Fixed up DESKTOP_IS_ACTIVE macro to work in the case of no desktops. Modified main.cpp to process selections and verbs in no-GUI mode. Other changes are all consequences of the SPDesktop, Selection and LayerModel interface changes. (bzr r12387.1.1) --- src/verbs.cpp | 193 +++++++++++++++++++++++++++++++--------------------------- 1 file changed, 102 insertions(+), 91 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 6f83b3dfb..4bbd3f9df 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -50,6 +50,7 @@ #include "file.h" #include "gradient-drag.h" #include "helper/action.h" +#include "helper/action-context.h" #include "help.h" #include "inkscape-private.h" #include "interface.h" @@ -124,7 +125,7 @@ class FileVerb : public Verb { private: static void perform(SPAction *action, void *mydata); protected: - virtual SPAction *make_action(Inkscape::UI::View::View *view); + virtual SPAction *make_action(Inkscape::ActionContext const & context); public: /** Use the Verb initializer with the same parameters. */ FileVerb(unsigned int const code, @@ -143,7 +144,7 @@ class EditVerb : public Verb { private: static void perform(SPAction *action, void *mydata); protected: - virtual SPAction *make_action(Inkscape::UI::View::View *view); + virtual SPAction *make_action(Inkscape::ActionContext const & context); public: /** Use the Verb initializer with the same parameters. */ EditVerb(unsigned int const code, @@ -162,7 +163,7 @@ class SelectionVerb : public Verb { private: static void perform(SPAction *action, void *mydata); protected: - virtual SPAction *make_action(Inkscape::UI::View::View *view); + virtual SPAction *make_action(Inkscape::ActionContext const & context); public: /** Use the Verb initializer with the same parameters. */ SelectionVerb(unsigned int const code, @@ -181,7 +182,7 @@ class LayerVerb : public Verb { private: static void perform(SPAction *action, void *mydata); protected: - virtual SPAction *make_action(Inkscape::UI::View::View *view); + virtual SPAction *make_action(Inkscape::ActionContext const & context); public: /** Use the Verb initializer with the same parameters. */ LayerVerb(unsigned int const code, @@ -200,7 +201,7 @@ class ObjectVerb : public Verb { private: static void perform(SPAction *action, void *mydata); protected: - virtual SPAction *make_action(Inkscape::UI::View::View *view); + virtual SPAction *make_action(Inkscape::ActionContext const & context); public: /** Use the Verb initializer with the same parameters. */ ObjectVerb(unsigned int const code, @@ -219,7 +220,7 @@ class ContextVerb : public Verb { private: static void perform(SPAction *action, void *mydata); protected: - virtual SPAction *make_action(Inkscape::UI::View::View *view); + virtual SPAction *make_action(Inkscape::ActionContext const & context); public: /** Use the Verb initializer with the same parameters. */ ContextVerb(unsigned int const code, @@ -238,7 +239,7 @@ class ZoomVerb : public Verb { private: static void perform(SPAction *action, void *mydata); protected: - virtual SPAction *make_action(Inkscape::UI::View::View *view); + virtual SPAction *make_action(Inkscape::ActionContext const & context); public: /** Use the Verb initializer with the same parameters. */ ZoomVerb(unsigned int const code, @@ -258,7 +259,7 @@ class DialogVerb : public Verb { private: static void perform(SPAction *action, void *mydata); protected: - virtual SPAction *make_action(Inkscape::UI::View::View *view); + virtual SPAction *make_action(Inkscape::ActionContext const & context); public: /** Use the Verb initializer with the same parameters. */ DialogVerb(unsigned int const code, @@ -277,7 +278,7 @@ class HelpVerb : public Verb { private: static void perform(SPAction *action, void *mydata); protected: - virtual SPAction *make_action(Inkscape::UI::View::View *view); + virtual SPAction *make_action(Inkscape::ActionContext const & context); public: /** Use the Verb initializer with the same parameters. */ HelpVerb(unsigned int const code, @@ -296,7 +297,7 @@ class TutorialVerb : public Verb { private: static void perform(SPAction *action, void *mydata); protected: - virtual SPAction *make_action(Inkscape::UI::View::View *view); + virtual SPAction *make_action(Inkscape::ActionContext const & context); public: /** Use the Verb initializer with the same parameters. */ TutorialVerb(unsigned int const code, @@ -315,7 +316,7 @@ class TextVerb : public Verb { private: static void perform(SPAction *action, void *mydata); protected: - virtual SPAction *make_action(Inkscape::UI::View::View *view); + virtual SPAction *make_action(Inkscape::ActionContext const & context); public: /** Use the Verb initializer with the same parameters. */ TextVerb(unsigned int const code, @@ -382,10 +383,10 @@ Verb::~Verb(void) * for a function that every subclass should write. Most * can be written using \c make_action_helper. * - * @param view Which view the action should be created for. + * @param context Which context the action should be created for. * @return NULL to represent error (this function shouldn't ever be called) */ -SPAction *Verb::make_action(Inkscape::UI::View::View */*view*/) +SPAction *Verb::make_action(Inkscape::ActionContext const & /*context*/) { //std::cout << "make_action" << std::endl; return NULL; @@ -395,13 +396,13 @@ SPAction *Verb::make_action(Inkscape::UI::View::View */*view*/) * Create an action for a \c FileVerb. * Calls \c make_action_helper with the \c vector. * - * @param view Which view the action should be created for. + * @param context Which context the action should be created for. * @return The built action. */ -SPAction *FileVerb::make_action(Inkscape::UI::View::View *view) +SPAction *FileVerb::make_action(Inkscape::ActionContext const & context) { //std::cout << "fileverb: make_action: " << &perform << std::endl; - return make_action_helper(view, &perform); + return make_action_helper(context, &perform); } /** @@ -409,13 +410,13 @@ SPAction *FileVerb::make_action(Inkscape::UI::View::View *view) * * Calls \c make_action_helper with the \c vector. * - * @param view Which view the action should be created for. + * @param context Which context the action should be created for. * @return The built action. */ -SPAction *EditVerb::make_action(Inkscape::UI::View::View *view) +SPAction *EditVerb::make_action(Inkscape::ActionContext const & context) { //std::cout << "editverb: make_action: " << &perform << std::endl; - return make_action_helper(view, &perform); + return make_action_helper(context, &perform); } /** @@ -423,12 +424,12 @@ SPAction *EditVerb::make_action(Inkscape::UI::View::View *view) * * Calls \c make_action_helper with the \c vector. * - * @param view Which view the action should be created for. + * @param context Which context the action should be created for. * @return The built action. */ -SPAction *SelectionVerb::make_action(Inkscape::UI::View::View *view) +SPAction *SelectionVerb::make_action(Inkscape::ActionContext const & context) { - return make_action_helper(view, &perform); + return make_action_helper(context, &perform); } /** @@ -436,12 +437,12 @@ SPAction *SelectionVerb::make_action(Inkscape::UI::View::View *view) * * Calls \c make_action_helper with the \c vector. * - * @param view Which view the action should be created for. + * @param context Which context the action should be created for. * @return The built action. */ -SPAction *LayerVerb::make_action(Inkscape::UI::View::View *view) +SPAction *LayerVerb::make_action(Inkscape::ActionContext const & context) { - return make_action_helper(view, &perform); + return make_action_helper(context, &perform); } /** @@ -449,12 +450,12 @@ SPAction *LayerVerb::make_action(Inkscape::UI::View::View *view) * * Calls \c make_action_helper with the \c vector. * - * @param view Which view the action should be created for. + * @param context Which context the action should be created for. * @return The built action. */ -SPAction *ObjectVerb::make_action(Inkscape::UI::View::View *view) +SPAction *ObjectVerb::make_action(Inkscape::ActionContext const & context) { - return make_action_helper(view, &perform); + return make_action_helper(context, &perform); } /** @@ -462,12 +463,12 @@ SPAction *ObjectVerb::make_action(Inkscape::UI::View::View *view) * * Calls \c make_action_helper with the \c vector. * - * @param view Which view the action should be created for. + * @param context Which context the action should be created for. * @return The built action. */ -SPAction *ContextVerb::make_action(Inkscape::UI::View::View *view) +SPAction *ContextVerb::make_action(Inkscape::ActionContext const & context) { - return make_action_helper(view, &perform); + return make_action_helper(context, &perform); } /** @@ -475,12 +476,12 @@ SPAction *ContextVerb::make_action(Inkscape::UI::View::View *view) * * Calls \c make_action_helper with the \c vector. * - * @param view Which view the action should be created for. + * @param context Which context the action should be created for. * @return The built action. */ -SPAction *ZoomVerb::make_action(Inkscape::UI::View::View *view) +SPAction *ZoomVerb::make_action(Inkscape::ActionContext const & context) { - return make_action_helper(view, &perform); + return make_action_helper(context, &perform); } /** @@ -488,12 +489,12 @@ SPAction *ZoomVerb::make_action(Inkscape::UI::View::View *view) * * Calls \c make_action_helper with the \c vector. * - * @param view Which view the action should be created for. + * @param context Which context the action should be created for. * @return The built action. */ -SPAction *DialogVerb::make_action(Inkscape::UI::View::View *view) +SPAction *DialogVerb::make_action(Inkscape::ActionContext const & context) { - return make_action_helper(view, &perform); + return make_action_helper(context, &perform); } /** @@ -501,12 +502,12 @@ SPAction *DialogVerb::make_action(Inkscape::UI::View::View *view) * * Calls \c make_action_helper with the \c vector. * - * @param view Which view the action should be created for. + * @param context Which context the action should be created for. * @return The built action. */ -SPAction *HelpVerb::make_action(Inkscape::UI::View::View *view) +SPAction *HelpVerb::make_action(Inkscape::ActionContext const & context) { - return make_action_helper(view, &perform); + return make_action_helper(context, &perform); } /** @@ -514,12 +515,12 @@ SPAction *HelpVerb::make_action(Inkscape::UI::View::View *view) * * Calls \c make_action_helper with the \c vector. * - * @param view Which view the action should be created for. + * @param context Which context the action should be created for. * @return The built action. */ -SPAction *TutorialVerb::make_action(Inkscape::UI::View::View *view) +SPAction *TutorialVerb::make_action(Inkscape::ActionContext const & context) { - return make_action_helper(view, &perform); + return make_action_helper(context, &perform); } /** @@ -527,12 +528,12 @@ SPAction *TutorialVerb::make_action(Inkscape::UI::View::View *view) * * Calls \c make_action_helper with the \c vector. * - * @param view Which view the action should be created for. + * @param context Which context the action should be created for. * @return The built action. */ -SPAction *TextVerb::make_action(Inkscape::UI::View::View *view) +SPAction *TextVerb::make_action(Inkscape::ActionContext const & context) { - return make_action_helper(view, &perform); + return make_action_helper(context, &perform); } /** @@ -546,16 +547,16 @@ SPAction *TextVerb::make_action(Inkscape::UI::View::View *view) * if the action gets crated, a listener is added to the action with * the vector that is passed in. * - * @param view Which view the action should be created for. + * @param context Which context the action should be created for. * @param vector The function vector for the verb. * @return The created action. */ -SPAction *Verb::make_action_helper(Inkscape::UI::View::View *view, void (*perform_fun)(SPAction *, void *), void *in_pntr) +SPAction *Verb::make_action_helper(Inkscape::ActionContext const & context, void (*perform_fun)(SPAction *, void *), void *in_pntr) { SPAction *action; //std::cout << "Adding action: " << _code << std::endl; - action = sp_action_new(view, _id, _(_name), + action = sp_action_new(context, _id, _(_name), _(_tip), _image, this); if (action == NULL) return NULL; @@ -587,22 +588,22 @@ SPAction *Verb::make_action_helper(Inkscape::UI::View::View *view, void (*perfor * looked for, and the sensitivity is matched. Unfortunately, this is * currently a linear search. * - * @param view The view which this action would relate to. + * @param context The action context which this action relates to. * @return The action, or NULL if there is an error. */ -SPAction *Verb::get_action(Inkscape::UI::View::View *view) +SPAction *Verb::get_action(Inkscape::ActionContext const & context) { SPAction *action = NULL; if ( _actions == NULL ) { _actions = new ActionTable; } - ActionTable::iterator action_found = _actions->find(view); + ActionTable::iterator action_found = _actions->find(context.getView()); if (action_found != _actions->end()) { action = action_found->second; } else { - action = this->make_action(view); + action = this->make_action(context); // if (action == NULL) printf("Hmm, NULL in %s\n", _name); if (action == NULL) printf("Hmm, NULL in %s\n", _name); @@ -610,16 +611,16 @@ SPAction *Verb::get_action(Inkscape::UI::View::View *view) sp_action_set_sensitive(action, 0); } else { for (ActionTable::iterator cur_action = _actions->begin(); - cur_action != _actions->end() && view != NULL; + cur_action != _actions->end() && context.getView() != NULL; ++cur_action) { - if (cur_action->first != NULL && cur_action->first->doc() == view->doc()) { + if (cur_action->first != NULL && cur_action->first->doc() == context.getDocument()) { sp_action_set_sensitive(action, cur_action->second->sensitive); break; } } } - _actions->insert(ActionTable::value_type(view, action)); + _actions->insert(ActionTable::value_type(context.getView(), action)); } return action; @@ -802,8 +803,7 @@ void FileVerb::perform(SPAction *action, void *data) #if 0 // These aren't used, but are here to remind people not to use // the CURRENT_DOCUMENT macros unless they really have to. - Inkscape::UI::View::View *current_view = sp_action_get_view(action); - SPDocument *current_document = current_view->doc(); + SPDocument *current_document = sp_action_get_document(action); #endif SPDesktop *desktop = dynamic_cast(sp_action_get_view(action)); @@ -1028,8 +1028,39 @@ void EditVerb::perform(SPAction *action, void *data) */ void SelectionVerb::perform(SPAction *action, void *data) { + Inkscape::Selection *selection = sp_action_get_selection(action); SPDesktop *dt = static_cast(sp_action_get_view(action)); + // Some of these operations have been modified so they work in command-line mode! + // In this case, all we need is a selection + if (!selection) { + return; + } + + switch (reinterpret_cast(data)) { + case SP_VERB_SELECTION_UNION: + sp_selected_path_union(selection, dt); + break; + case SP_VERB_SELECTION_INTERSECT: + sp_selected_path_intersect(selection, dt); + break; + case SP_VERB_SELECTION_DIFF: + sp_selected_path_diff(selection, dt); + break; + case SP_VERB_SELECTION_SYMDIFF: + sp_selected_path_symdiff(selection, dt); + break; + case SP_VERB_SELECTION_CUT: + sp_selected_path_cut(selection, dt); + break; + case SP_VERB_SELECTION_SLICE: + sp_selected_path_slice(selection, dt); + break; + default: + break; + } + + // The remaining operations require a desktop if (!dt) return; @@ -1065,26 +1096,6 @@ void SelectionVerb::perform(SPAction *action, void *data) text_remove_all_kerns(); break; - case SP_VERB_SELECTION_UNION: - sp_selected_path_union(dt); - break; - case SP_VERB_SELECTION_INTERSECT: - sp_selected_path_intersect(dt); - break; - case SP_VERB_SELECTION_DIFF: - sp_selected_path_diff(dt); - break; - case SP_VERB_SELECTION_SYMDIFF: - sp_selected_path_symdiff(dt); - break; - - case SP_VERB_SELECTION_CUT: - sp_selected_path_cut(dt); - break; - case SP_VERB_SELECTION_SLICE: - sp_selected_path_slice(dt); - break; - case SP_VERB_SELECTION_OFFSET: sp_selected_path_offset(dt); break; @@ -1500,7 +1511,7 @@ void ContextVerb::perform(SPAction *action, void *data) */ for (vidx = SP_VERB_CONTEXT_SELECT; vidx <= SP_VERB_CONTEXT_PAINTBUCKET_PREFS; vidx++) { - SPAction *tool_action= get((sp_verb_t)vidx)->get_action(dt); + SPAction *tool_action= get((sp_verb_t)vidx)->get_action(action->context); if (tool_action) { sp_action_set_active(tool_action, vidx == (int)verb); } @@ -2090,7 +2101,7 @@ class EffectLastVerb : public Verb { private: static void perform(SPAction *action, void *mydata); protected: - virtual SPAction *make_action(Inkscape::UI::View::View *view); + virtual SPAction *make_action(Inkscape::ActionContext const & context); public: /** Use the Verb initializer with the same parameters. */ EffectLastVerb(unsigned int const code, @@ -2109,12 +2120,12 @@ public: * * Calls \c make_action_helper with the \c vector. * - * @param view Which view the action should be created for. + * @param context Which context the action should be created for. * @return The built action. */ -SPAction *EffectLastVerb::make_action(Inkscape::UI::View::View *view) +SPAction *EffectLastVerb::make_action(Inkscape::ActionContext const & context) { - return make_action_helper(view, &perform); + return make_action_helper(context, &perform); } /** @@ -2155,7 +2166,7 @@ class FitCanvasVerb : public Verb { private: static void perform(SPAction *action, void *mydata); protected: - virtual SPAction *make_action(Inkscape::UI::View::View *view); + virtual SPAction *make_action(Inkscape::ActionContext const & context); public: /** Use the Verb initializer with the same parameters. */ FitCanvasVerb(unsigned int const code, @@ -2174,12 +2185,12 @@ public: * * Calls \c make_action_helper with the \c vector. * - * @param view Which view the action should be created for. + * @param context Which context the action should be created for. * @return The built action. */ -SPAction *FitCanvasVerb::make_action(Inkscape::UI::View::View *view) +SPAction *FitCanvasVerb::make_action(Inkscape::ActionContext const & context) { - SPAction *action = make_action_helper(view, &perform); + SPAction *action = make_action_helper(context, &perform); return action; } @@ -2221,7 +2232,7 @@ class LockAndHideVerb : public Verb { private: static void perform(SPAction *action, void *mydata); protected: - virtual SPAction *make_action(Inkscape::UI::View::View *view); + virtual SPAction *make_action(Inkscape::ActionContext const & context); public: /** Use the Verb initializer with the same parameters. */ LockAndHideVerb(unsigned int const code, @@ -2240,12 +2251,12 @@ public: * * Calls \c make_action_helper with the \c vector. * - * @param view Which view the action should be created for. + * @param context Which context the action should be created for. * @return The built action. */ -SPAction *LockAndHideVerb::make_action(Inkscape::UI::View::View *view) +SPAction *LockAndHideVerb::make_action(Inkscape::ActionContext const & context) { - SPAction *action = make_action_helper(view, &perform); + SPAction *action = make_action_helper(context, &perform); return action; } -- cgit v1.2.3 From 2a53d44964f9105ce0f9c8725853150dc5360096 Mon Sep 17 00:00:00 2001 From: Eric Greveson Date: Mon, 1 Jul 2013 22:27:23 +0100 Subject: Added error messages when attempting to use verbs requiring GUI in console (--without-gui) mode. (bzr r12387.1.3) --- src/verbs.cpp | 83 +++++++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 69 insertions(+), 14 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 4bbd3f9df..979267215 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -626,6 +626,12 @@ SPAction *Verb::get_action(Inkscape::ActionContext const & context) return action; } +/* static */ +void Verb::show_gui_required_message(SPAction *action) +{ + g_printerr("WARNING: ignoring verb %s - GUI required for this verb.\n", action->id); +} + void Verb::sensitive(SPDocument *in_doc, bool in_sensitive) { // printf("Setting sensitivity of \"%s\" to %d\n", _name, in_sensitive); @@ -807,7 +813,11 @@ void FileVerb::perform(SPAction *action, void *data) #endif SPDesktop *desktop = dynamic_cast(sp_action_get_view(action)); - g_assert(desktop != NULL); + if (desktop == NULL) { + show_gui_required_message(action); + return; + } + Gtk::Window *parent = desktop->getToplevel(); g_assert(parent != NULL); @@ -873,8 +883,10 @@ void FileVerb::perform(SPAction *action, void *data) void EditVerb::perform(SPAction *action, void *data) { SPDesktop *dt = static_cast(sp_action_get_view(action)); - if (!dt) + if (dt == NULL) { + show_gui_required_message(action); return; + } switch (reinterpret_cast(data)) { case SP_VERB_EDIT_UNDO: @@ -1037,6 +1049,7 @@ void SelectionVerb::perform(SPAction *action, void *data) return; } + bool handled = true; switch (reinterpret_cast(data)) { case SP_VERB_SELECTION_UNION: sp_selected_path_union(selection, dt); @@ -1057,12 +1070,19 @@ void SelectionVerb::perform(SPAction *action, void *data) sp_selected_path_slice(selection, dt); break; default: + handled = false; break; } + if (handled) { + return; + } + // The remaining operations require a desktop - if (!dt) + if (dt == NULL) { + show_gui_required_message(action); return; + } g_assert(dt->_dlg_mgr != NULL); @@ -1162,8 +1182,12 @@ void LayerVerb::perform(SPAction *action, void *data) { SPDesktop *dt = static_cast(sp_action_get_view(action)); size_t verb = reinterpret_cast(data); - - if ( !dt || !dt->currentLayer() ) { + + if (dt == NULL) { + show_gui_required_message(action); + return; + } + if ( !dt->currentLayer() ) { return; } @@ -1412,8 +1436,10 @@ void LayerVerb::perform(SPAction *action, void *data) void ObjectVerb::perform( SPAction *action, void *data) { SPDesktop *dt = static_cast(sp_action_get_view(action)); - if (!dt) + if (dt == NULL) { + show_gui_required_message(action); return; + } SPEventContext *ec = dt->event_context; @@ -1500,9 +1526,11 @@ void ContextVerb::perform(SPAction *action, void *data) int vidx; dt = static_cast(sp_action_get_view(action)); - - if (!dt) + + if (dt == NULL) { + show_gui_required_message(action); return; + } verb = (sp_verb_t)GPOINTER_TO_INT((gpointer)data); @@ -1701,8 +1729,10 @@ void ContextVerb::perform(SPAction *action, void *data) void TextVerb::perform(SPAction *action, void */*data*/) { SPDesktop *dt = static_cast(sp_action_get_view(action)); - if (!dt) + if (dt == NULL) { + show_gui_required_message(action); return; + } SPDocument *doc = sp_desktop_document(dt); (void)doc; @@ -1716,8 +1746,10 @@ void TextVerb::perform(SPAction *action, void */*data*/) void ZoomVerb::perform(SPAction *action, void *data) { SPDesktop *dt = static_cast(sp_action_get_view(action)); - if (!dt) + if (dt == NULL) { + show_gui_required_message(action); return; + } SPEventContext *ec = dt->event_context; SPDocument *doc = sp_desktop_document(dt); @@ -1906,6 +1938,10 @@ void DialogVerb::perform(SPAction *action, void *data) } SPDesktop *dt = static_cast(sp_action_get_view(action)); + if (dt == NULL) { + show_gui_required_message(action); + return; + } g_assert(dt->_dlg_mgr != NULL); switch (reinterpret_cast(data)) { @@ -2018,6 +2054,10 @@ void DialogVerb::perform(SPAction *action, void *data) void HelpVerb::perform(SPAction *action, void *data) { SPDesktop *dt = static_cast(sp_action_get_view(action)); + if (dt == NULL) { + show_gui_required_message(action); + return; + } g_assert(dt->_dlg_mgr != NULL); switch (reinterpret_cast(data)) { @@ -2050,8 +2090,12 @@ void HelpVerb::perform(SPAction *action, void *data) /** * Decode the verb code and take appropriate action. */ -void TutorialVerb::perform(SPAction */*action*/, void *data) +void TutorialVerb::perform(SPAction *action, void *data) { + if (sp_action_get_view(action) == NULL) { + show_gui_required_message(action); + return; + } switch (reinterpret_cast(data)) { case SP_VERB_TUTORIAL_BASIC: // TRANSLATORS: If you have translated the tutorial-basic.en.svgz file to your language, @@ -2136,11 +2180,14 @@ void EffectLastVerb::perform(SPAction *action, void *data) // These aren't used, but are here to remind people not to use // the CURRENT_DOCUMENT macros unless they really have to. Inkscape::UI::View::View *current_view = sp_action_get_view(action); + if (current_view == NULL) { + show_gui_required_message(action); + return; + } // SPDocument *current_document = SP_VIEW_DOCUMENT(current_view); Inkscape::Extension::Effect *effect = Inkscape::Extension::Effect::get_last_effect(); if (effect == NULL) return; - if (current_view == NULL) return; switch (reinterpret_cast(data)) { case SP_VERB_EFFECT_LAST_PREF: @@ -2200,7 +2247,11 @@ SPAction *FitCanvasVerb::make_action(Inkscape::ActionContext const & context) void FitCanvasVerb::perform(SPAction *action, void *data) { SPDesktop *dt = static_cast(sp_action_get_view(action)); - if (!dt) return; + if (dt == NULL) { + show_gui_required_message(action); + return; + } + SPDocument *doc = sp_desktop_document(dt); if (!doc) return; @@ -2266,7 +2317,11 @@ SPAction *LockAndHideVerb::make_action(Inkscape::ActionContext const & context) void LockAndHideVerb::perform(SPAction *action, void *data) { SPDesktop *dt = static_cast(sp_action_get_view(action)); - if (!dt) return; + if (dt == NULL) { + show_gui_required_message(action); + return; + } + SPDocument *doc = sp_desktop_document(dt); if (!doc) return; -- cgit v1.2.3 From fdb68963cec5ddbd3eef111f4c95b7e049aa839c Mon Sep 17 00:00:00 2001 From: Slagvi Public Date: Tue, 2 Jul 2013 17:37:42 +0200 Subject: Adding NewFromTemplate to the Inkscape menu (bzr r12379.2.5) --- src/verbs.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 6f83b3dfb..a3d8b07a2 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -79,6 +79,7 @@ #include "ui/dialog/inkscape-preferences.h" #include "ui/dialog/layer-properties.h" #include "ui/dialog/layers.h" +#include "ui/dialog/new-from-template.h" #include "ui/dialog/object-properties.h" #include "ui/dialog/swatches.h" #include "ui/dialog/symbols.h" @@ -860,6 +861,9 @@ void FileVerb::perform(SPAction *action, void *data) case SP_VERB_FILE_QUIT: sp_file_exit(); break; + case SP_VERB_FILE_TEMPLATES: + sp_file_new_from_templatee(); + break; default: break; } @@ -2323,6 +2327,8 @@ Verb *Verb::_base_verbs[] = { new FileVerb(SP_VERB_FILE_CLOSE_VIEW, "FileClose", N_("_Close"), N_("Close this document window"), GTK_STOCK_CLOSE), new FileVerb(SP_VERB_FILE_QUIT, "FileQuit", N_("_Quit"), N_("Quit Inkscape"), GTK_STOCK_QUIT), + new FileVerb(SP_VERB_FILE_TEMPLATES, "FileTemplates", N_("_Templates..."), + N_("Create new project from template"), INKSCAPE_ICON("dialog-templates")), // Edit new EditVerb(SP_VERB_EDIT_UNDO, "EditUndo", N_("_Undo"), N_("Undo last action"), -- cgit v1.2.3 From 09ce234c1fc367a2607936e6cf106cb24c60e94f Mon Sep 17 00:00:00 2001 From: Eric Greveson Date: Wed, 3 Jul 2013 20:06:11 +0100 Subject: Modified dbus interface so that it works in console mode (--dbus-listen) Modified action context setup so that in console mode, when a document is added to the main inkscape app instance, it gets a selection model and layer model automatically set up for it Made a couple more verbs work in console mode (bzr r12387.1.4) --- src/verbs.cpp | 74 +++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 47 insertions(+), 27 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 979267215..6187cfb4c 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -806,13 +806,28 @@ Verb *Verb::getbyid(gchar const *id) */ void FileVerb::perform(SPAction *action, void *data) { -#if 0 - // These aren't used, but are here to remind people not to use - // the CURRENT_DOCUMENT macros unless they really have to. - SPDocument *current_document = sp_action_get_document(action); -#endif + // Convert verb impls to use this where possible, to reduce static cling + // to macros like SP_ACTIVE_DOCUMENT, which end up enforcing GUI-mode operation + SPDocument *doc = sp_action_get_document(action); + + // We can vacuum defs, or exit, without needing a desktop! + bool handled = true; + switch (reinterpret_cast(data)) { + case SP_VERB_FILE_VACUUM: + sp_file_vacuum(doc); + break; + case SP_VERB_FILE_QUIT: + sp_file_exit(); + break; + default: + handled = false; + break; + } + if (handled) { + return; + } - SPDesktop *desktop = dynamic_cast(sp_action_get_view(action)); + SPDesktop *desktop = sp_action_get_desktop(action); if (desktop == NULL) { show_gui_required_message(action); return; @@ -843,9 +858,6 @@ void FileVerb::perform(SPAction *action, void *data) case SP_VERB_FILE_PRINT: sp_file_print(*parent); break; - case SP_VERB_FILE_VACUUM: - sp_file_vacuum(); - break; case SP_VERB_FILE_IMPORT: sp_file_import(*parent); break; @@ -867,9 +879,6 @@ void FileVerb::perform(SPAction *action, void *data) case SP_VERB_FILE_CLOSE_VIEW: sp_ui_close_view(NULL); break; - case SP_VERB_FILE_QUIT: - sp_file_exit(); - break; default: break; } @@ -882,7 +891,21 @@ void FileVerb::perform(SPAction *action, void *data) */ void EditVerb::perform(SPAction *action, void *data) { - SPDesktop *dt = static_cast(sp_action_get_view(action)); + // We can clear all without a desktop + bool handled = true; + switch (reinterpret_cast(data)) { + case SP_VERB_EDIT_CLEAR_ALL: + sp_edit_clear_all(sp_action_get_selection(action)); + break; + default: + handled = false; + break; + } + if (handled) { + return; + } + + SPDesktop *dt = sp_action_get_desktop(action); if (dt == NULL) { show_gui_required_message(action); return; @@ -976,9 +999,6 @@ void EditVerb::perform(SPAction *action, void *data) case SP_VERB_EDIT_UNSYMBOL: sp_selection_unsymbol(dt); break; - case SP_VERB_EDIT_CLEAR_ALL: - sp_edit_clear_all(dt); - break; case SP_VERB_EDIT_SELECT_ALL: SelectionHelper::selectAll(dt); break; @@ -1041,7 +1061,7 @@ void EditVerb::perform(SPAction *action, void *data) void SelectionVerb::perform(SPAction *action, void *data) { Inkscape::Selection *selection = sp_action_get_selection(action); - SPDesktop *dt = static_cast(sp_action_get_view(action)); + SPDesktop *dt = sp_action_get_desktop(action); // Some of these operations have been modified so they work in command-line mode! // In this case, all we need is a selection @@ -1180,7 +1200,7 @@ void SelectionVerb::perform(SPAction *action, void *data) */ void LayerVerb::perform(SPAction *action, void *data) { - SPDesktop *dt = static_cast(sp_action_get_view(action)); + SPDesktop *dt = sp_action_get_desktop(action); size_t verb = reinterpret_cast(data); if (dt == NULL) { @@ -1435,7 +1455,7 @@ void LayerVerb::perform(SPAction *action, void *data) */ void ObjectVerb::perform( SPAction *action, void *data) { - SPDesktop *dt = static_cast(sp_action_get_view(action)); + SPDesktop *dt = sp_action_get_desktop(action); if (dt == NULL) { show_gui_required_message(action); return; @@ -1525,7 +1545,7 @@ void ContextVerb::perform(SPAction *action, void *data) sp_verb_t verb; int vidx; - dt = static_cast(sp_action_get_view(action)); + dt = sp_action_get_desktop(action); if (dt == NULL) { show_gui_required_message(action); @@ -1728,7 +1748,7 @@ void ContextVerb::perform(SPAction *action, void *data) */ void TextVerb::perform(SPAction *action, void */*data*/) { - SPDesktop *dt = static_cast(sp_action_get_view(action)); + SPDesktop *dt = sp_action_get_desktop(action); if (dt == NULL) { show_gui_required_message(action); return; @@ -1745,7 +1765,7 @@ void TextVerb::perform(SPAction *action, void */*data*/) */ void ZoomVerb::perform(SPAction *action, void *data) { - SPDesktop *dt = static_cast(sp_action_get_view(action)); + SPDesktop *dt = sp_action_get_desktop(action); if (dt == NULL) { show_gui_required_message(action); return; @@ -1937,7 +1957,7 @@ void DialogVerb::perform(SPAction *action, void *data) inkscape_dialogs_unhide(); } - SPDesktop *dt = static_cast(sp_action_get_view(action)); + SPDesktop *dt = sp_action_get_desktop(action); if (dt == NULL) { show_gui_required_message(action); return; @@ -2053,7 +2073,7 @@ void DialogVerb::perform(SPAction *action, void *data) */ void HelpVerb::perform(SPAction *action, void *data) { - SPDesktop *dt = static_cast(sp_action_get_view(action)); + SPDesktop *dt = sp_action_get_desktop(action); if (dt == NULL) { show_gui_required_message(action); return; @@ -2092,7 +2112,7 @@ void HelpVerb::perform(SPAction *action, void *data) */ void TutorialVerb::perform(SPAction *action, void *data) { - if (sp_action_get_view(action) == NULL) { + if (sp_action_get_desktop(action) == NULL) { show_gui_required_message(action); return; } @@ -2246,7 +2266,7 @@ SPAction *FitCanvasVerb::make_action(Inkscape::ActionContext const & context) */ void FitCanvasVerb::perform(SPAction *action, void *data) { - SPDesktop *dt = static_cast(sp_action_get_view(action)); + SPDesktop *dt = sp_action_get_desktop(action); if (dt == NULL) { show_gui_required_message(action); return; @@ -2316,7 +2336,7 @@ SPAction *LockAndHideVerb::make_action(Inkscape::ActionContext const & context) */ void LockAndHideVerb::perform(SPAction *action, void *data) { - SPDesktop *dt = static_cast(sp_action_get_view(action)); + SPDesktop *dt = sp_action_get_desktop(action); if (dt == NULL) { show_gui_required_message(action); return; -- cgit v1.2.3 From 1c75594f5c37e86dec195ec1975254315ef180e9 Mon Sep 17 00:00:00 2001 From: Eric Greveson Date: Wed, 3 Jul 2013 23:00:06 +0100 Subject: Changed dbus interface to treat 'division' like other boolops, with a new return type for selection_combine to support this (array of string). This also fixes a bug with not setting the error flag when returning NULL from this method. Refactored some more selection verbs to allow use in no-GUI mode. (bzr r12387.1.5) --- src/verbs.cpp | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 6187cfb4c..fed9622fb 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1089,6 +1089,24 @@ void SelectionVerb::perform(SPAction *action, void *data) case SP_VERB_SELECTION_SLICE: sp_selected_path_slice(selection, dt); break; + case SP_VERB_SELECTION_TO_FRONT: + sp_selection_raise_to_top(selection, dt); + break; + case SP_VERB_SELECTION_TO_BACK: + sp_selection_lower_to_bottom(selection, dt); + break; + case SP_VERB_SELECTION_RAISE: + sp_selection_raise(selection, dt); + break; + case SP_VERB_SELECTION_LOWER: + sp_selection_lower(selection, dt); + break; + case SP_VERB_SELECTION_GROUP: + sp_selection_group(selection, dt); + break; + case SP_VERB_SELECTION_UNGROUP: + sp_selection_ungroup(selection, dt); + break; default: handled = false; break; @@ -1107,25 +1125,6 @@ void SelectionVerb::perform(SPAction *action, void *data) g_assert(dt->_dlg_mgr != NULL); switch (reinterpret_cast(data)) { - case SP_VERB_SELECTION_TO_FRONT: - sp_selection_raise_to_top(dt); - break; - case SP_VERB_SELECTION_TO_BACK: - sp_selection_lower_to_bottom(dt); - break; - case SP_VERB_SELECTION_RAISE: - sp_selection_raise(dt); - break; - case SP_VERB_SELECTION_LOWER: - sp_selection_lower(dt); - break; - case SP_VERB_SELECTION_GROUP: - sp_selection_group(dt); - break; - case SP_VERB_SELECTION_UNGROUP: - sp_selection_ungroup(dt); - break; - case SP_VERB_SELECTION_TEXTTOPATH: text_put_on_path(); break; -- cgit v1.2.3 From 104efe4e3ecadc975ab76748c66f041abf8ee7b1 Mon Sep 17 00:00:00 2001 From: Eric Greveson Date: Thu, 4 Jul 2013 15:01:44 +0100 Subject: Code readability improvements and licence changes for action-context.* based on merge request code review and feedback (bzr r12387.1.7) --- src/verbs.cpp | 91 ++++++++++++++++------------------------------------------- 1 file changed, 24 insertions(+), 67 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 2e6417ce1..1dae8bcf0 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -628,9 +628,13 @@ SPAction *Verb::get_action(Inkscape::ActionContext const & context) } /* static */ -void Verb::show_gui_required_message(SPAction *action) +bool Verb::ensure_desktop_valid(SPAction *action) { + if (sp_action_get_desktop(action) != NULL) { + return true; + } g_printerr("WARNING: ignoring verb %s - GUI required for this verb.\n", action->id); + return false; } void Verb::sensitive(SPDocument *in_doc, bool in_sensitive) @@ -827,12 +831,9 @@ void FileVerb::perform(SPAction *action, void *data) if (handled) { return; } - + + g_return_if_fail(ensure_desktop_valid(action)); SPDesktop *desktop = sp_action_get_desktop(action); - if (desktop == NULL) { - show_gui_required_message(action); - return; - } Gtk::Window *parent = desktop->getToplevel(); g_assert(parent != NULL); @@ -905,12 +906,9 @@ void EditVerb::perform(SPAction *action, void *data) if (handled) { return; } - + + g_return_if_fail(ensure_desktop_valid(action)); SPDesktop *dt = sp_action_get_desktop(action); - if (dt == NULL) { - show_gui_required_message(action); - return; - } switch (reinterpret_cast(data)) { case SP_VERB_EDIT_UNDO: @@ -1118,10 +1116,7 @@ void SelectionVerb::perform(SPAction *action, void *data) } // The remaining operations require a desktop - if (dt == NULL) { - show_gui_required_message(action); - return; - } + g_return_if_fail(ensure_desktop_valid(action)); g_assert(dt->_dlg_mgr != NULL); @@ -1200,13 +1195,10 @@ void SelectionVerb::perform(SPAction *action, void *data) */ void LayerVerb::perform(SPAction *action, void *data) { + g_return_if_fail(ensure_desktop_valid(action)); SPDesktop *dt = sp_action_get_desktop(action); size_t verb = reinterpret_cast(data); - if (dt == NULL) { - show_gui_required_message(action); - return; - } if ( !dt->currentLayer() ) { return; } @@ -1455,11 +1447,8 @@ void LayerVerb::perform(SPAction *action, void *data) */ void ObjectVerb::perform( SPAction *action, void *data) { + g_return_if_fail(ensure_desktop_valid(action)); SPDesktop *dt = sp_action_get_desktop(action); - if (dt == NULL) { - show_gui_required_message(action); - return; - } SPEventContext *ec = dt->event_context; @@ -1544,13 +1533,9 @@ void ContextVerb::perform(SPAction *action, void *data) SPDesktop *dt; sp_verb_t verb; int vidx; - - dt = sp_action_get_desktop(action); - if (dt == NULL) { - show_gui_required_message(action); - return; - } + g_return_if_fail(ensure_desktop_valid(action)); + dt = sp_action_get_desktop(action); verb = (sp_verb_t)GPOINTER_TO_INT((gpointer)data); @@ -1748,11 +1733,8 @@ void ContextVerb::perform(SPAction *action, void *data) */ void TextVerb::perform(SPAction *action, void */*data*/) { + g_return_if_fail(ensure_desktop_valid(action)); SPDesktop *dt = sp_action_get_desktop(action); - if (dt == NULL) { - show_gui_required_message(action); - return; - } SPDocument *doc = sp_desktop_document(dt); (void)doc; @@ -1765,11 +1747,8 @@ void TextVerb::perform(SPAction *action, void */*data*/) */ void ZoomVerb::perform(SPAction *action, void *data) { + g_return_if_fail(ensure_desktop_valid(action)); SPDesktop *dt = sp_action_get_desktop(action); - if (dt == NULL) { - show_gui_required_message(action); - return; - } SPEventContext *ec = dt->event_context; SPDocument *doc = sp_desktop_document(dt); @@ -1956,12 +1935,9 @@ void DialogVerb::perform(SPAction *action, void *data) // unhide all when opening a new dialog inkscape_dialogs_unhide(); } - + + g_return_if_fail(ensure_desktop_valid(action)); SPDesktop *dt = sp_action_get_desktop(action); - if (dt == NULL) { - show_gui_required_message(action); - return; - } g_assert(dt->_dlg_mgr != NULL); switch (reinterpret_cast(data)) { @@ -2073,11 +2049,8 @@ void DialogVerb::perform(SPAction *action, void *data) */ void HelpVerb::perform(SPAction *action, void *data) { + g_return_if_fail(ensure_desktop_valid(action)); SPDesktop *dt = sp_action_get_desktop(action); - if (dt == NULL) { - show_gui_required_message(action); - return; - } g_assert(dt->_dlg_mgr != NULL); switch (reinterpret_cast(data)) { @@ -2112,10 +2085,7 @@ void HelpVerb::perform(SPAction *action, void *data) */ void TutorialVerb::perform(SPAction *action, void *data) { - if (sp_action_get_desktop(action) == NULL) { - show_gui_required_message(action); - return; - } + g_return_if_fail(ensure_desktop_valid(action)); switch (reinterpret_cast(data)) { case SP_VERB_TUTORIAL_BASIC: // TRANSLATORS: If you have translated the tutorial-basic.en.svgz file to your language, @@ -2197,14 +2167,9 @@ SPAction *EffectLastVerb::make_action(Inkscape::ActionContext const & context) */ void EffectLastVerb::perform(SPAction *action, void *data) { - // These aren't used, but are here to remind people not to use - // the CURRENT_DOCUMENT macros unless they really have to. + g_return_if_fail(ensure_desktop_valid(action)); Inkscape::UI::View::View *current_view = sp_action_get_view(action); - if (current_view == NULL) { - show_gui_required_message(action); - return; - } - // SPDocument *current_document = SP_VIEW_DOCUMENT(current_view); + Inkscape::Extension::Effect *effect = Inkscape::Extension::Effect::get_last_effect(); if (effect == NULL) return; @@ -2266,12 +2231,8 @@ SPAction *FitCanvasVerb::make_action(Inkscape::ActionContext const & context) */ void FitCanvasVerb::perform(SPAction *action, void *data) { + g_return_if_fail(ensure_desktop_valid(action)); SPDesktop *dt = sp_action_get_desktop(action); - if (dt == NULL) { - show_gui_required_message(action); - return; - } - SPDocument *doc = sp_desktop_document(dt); if (!doc) return; @@ -2336,12 +2297,8 @@ SPAction *LockAndHideVerb::make_action(Inkscape::ActionContext const & context) */ void LockAndHideVerb::perform(SPAction *action, void *data) { + g_return_if_fail(ensure_desktop_valid(action)); SPDesktop *dt = sp_action_get_desktop(action); - if (dt == NULL) { - show_gui_required_message(action); - return; - } - SPDocument *doc = sp_desktop_document(dt); if (!doc) return; -- cgit v1.2.3 From 46211dc227f62c2e71b3edfa1ffb508c9fe8e0ac Mon Sep 17 00:00:00 2001 From: Slagvi Public Date: Thu, 4 Jul 2013 16:19:38 +0200 Subject: Added loading templates into NewFromTemplate dialog. (bzr r12379.2.7) --- src/verbs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index a3d8b07a2..8b8a7e6af 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -862,7 +862,7 @@ void FileVerb::perform(SPAction *action, void *data) sp_file_exit(); break; case SP_VERB_FILE_TEMPLATES: - sp_file_new_from_templatee(); + Inkscape::UI::NewFromTemplate::load_new_from_template(); break; default: break; -- cgit v1.2.3 From 4d9dc443915f588d2e3de8dbc9b61ba1cf2e6dee Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Sat, 6 Jul 2013 02:09:21 -0400 Subject: Fix verbs that were out by 5 because of missing script verbs (broken between r7137-r11611) (bzr r12406) --- src/verbs.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 1dae8bcf0..d0396155c 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -2903,7 +2903,17 @@ Verb *Verb::_base_verbs[] = { N_("Link an ICC color profile"), NULL), new EditVerb(SP_VERB_EDIT_REMOVE_COLOR_PROFILE, "RemoveColorProfile", N_("Remove Color Profile"), N_("Remove a linked ICC color profile"), NULL), - + // Scripting + new ContextVerb(SP_VERB_EDIT_ADD_EXTERNAL_SCRIPT, "AddExternalScript", + N_("Add External Script"), N_("Add an external script"), NULL), + new ContextVerb(SP_VERB_EDIT_ADD_EMBEDDED_SCRIPT, "AddEmbeddedScript", + N_("Add Embedded Script"), N_("Add an embedded script"), NULL), + new ContextVerb(SP_VERB_EDIT_EMBEDDED_SCRIPT, "EditEmbeddedScript", + N_("Edit Embedded Script"), N_("Edit an embedded script"), NULL), + new ContextVerb(SP_VERB_EDIT_REMOVE_EXTERNAL_SCRIPT, "RemoveExternalScript", + N_("Remove External Script"), N_("Remove an external script"), NULL), + new ContextVerb(SP_VERB_EDIT_REMOVE_EMBEDDED_SCRIPT, "RemoveEmbeddedScript", + N_("Remove Embedded Script"), N_("Remove an embedded script"), NULL), // Align new ContextVerb(SP_VERB_ALIGN_HORIZONTAL_RIGHT_TO_ANCHOR, "AlignHorizontalRightToAnchor", N_("Align right edges of objects to the left edge of the anchor"), N_("Align right edges of objects to the left edge of the anchor"), INKSCAPE_ICON("align-horizontal-right-to-anchor")), -- cgit v1.2.3 From 0ae1b56c3420006295bdd1cafe3b0fc57f2f89be Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Wed, 17 Jul 2013 13:16:27 +0100 Subject: Fix ordering of verbs (bzr r12423) --- src/verbs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index d0396155c..a085e841f 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -2452,10 +2452,10 @@ Verb *Verb::_base_verbs[] = { N_("Select previous object or node"), NULL), new EditVerb(SP_VERB_EDIT_DESELECT, "EditDeselect", N_("D_eselect"), N_("Deselect any selected objects or nodes"), INKSCAPE_ICON("edit-select-none")), - new EditVerb(SP_VERB_EDIT_GUIDES_AROUND_PAGE, "EditGuidesAroundPage", N_("Create _Guides Around the Page"), - N_("Create four guides aligned with the page borders"), NULL), new EditVerb(SP_VERB_EDIT_DELETE_ALL_GUIDES, "EditRemoveAllGuides", N_("Delete All Guides"), N_("Create four guides aligned with the page borders"), NULL), + new EditVerb(SP_VERB_EDIT_GUIDES_AROUND_PAGE, "EditGuidesAroundPage", N_("Create _Guides Around the Page"), + N_("Create four guides aligned with the page borders"), NULL), new EditVerb(SP_VERB_EDIT_NEXT_PATHEFFECT_PARAMETER, "EditNextPathEffectParameter", N_("Next path effect parameter"), N_("Show next editable path effect parameter"), INKSCAPE_ICON("path-effect-parameter-next")), -- cgit v1.2.3 From eb7b26af09df66f30ba50058e9e4a583028cd81a Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Tue, 23 Jul 2013 12:54:01 +0200 Subject: Remove the disabled script dialog and the nonfunctional Java binding (bzr r12428) --- src/verbs.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index a085e841f..06e59be38 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -40,7 +40,6 @@ #include #include -#include "bind/javabind.h" #include "desktop.h" #include "desktop-handles.h" #include "display/curve.h" @@ -1992,10 +1991,6 @@ void DialogVerb::perform(SPAction *action, void *data) case SP_VERB_DIALOG_DEBUG: dt->_dlg_mgr->showDialog("Messages"); break; - case SP_VERB_DIALOG_SCRIPT: - //dt->_dlg_mgr->showDialog("Script"); - Inkscape::Bind::JavaBindery::getInstance()->showConsole(); - break; case SP_VERB_DIALOG_UNDO_HISTORY: dt->_dlg_mgr->showDialog("UndoHistory"); break; @@ -2821,8 +2816,6 @@ Verb *Verb::_base_verbs[] = { N_("Check spelling of text in document"), GTK_STOCK_SPELL_CHECK ), new DialogVerb(SP_VERB_DIALOG_DEBUG, "DialogDebug", N_("_Messages..."), N_("View debug messages"), INKSCAPE_ICON("dialog-messages")), - new DialogVerb(SP_VERB_DIALOG_SCRIPT, "DialogScript", N_("S_cripts..."), - N_("Run scripts"), INKSCAPE_ICON("dialog-scripts")), new DialogVerb(SP_VERB_DIALOG_TOGGLE, "DialogsToggle", N_("Show/Hide D_ialogs"), N_("Show or hide all open dialogs"), INKSCAPE_ICON("show-dialogs")), new DialogVerb(SP_VERB_DIALOG_CLONETILER, "DialogClonetiler", N_("Create Tiled Clones..."), -- cgit v1.2.3 From 05f008356889de30ff55df1f73030003ed7cc312 Mon Sep 17 00:00:00 2001 From: Eric Greveson Date: Mon, 12 Aug 2013 16:39:48 +0100 Subject: Allow Object to Path verb from non-GUI (DBus) interface (bzr r12473.1.1) --- src/verbs.cpp | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 06e59be38..baac07d60 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1446,12 +1446,26 @@ void LayerVerb::perform(SPAction *action, void *data) */ void ObjectVerb::perform( SPAction *action, void *data) { - g_return_if_fail(ensure_desktop_valid(action)); SPDesktop *dt = sp_action_get_desktop(action); + Inkscape::Selection *sel = sp_action_get_selection(action); - SPEventContext *ec = dt->event_context; + // We can perform some actions without a desktop + bool handled = true; + switch (reinterpret_cast(data)) { + case SP_VERB_OBJECT_TO_CURVE: + sp_selected_path_to_curves(sel, dt); + break; + default: + handled = false; + break; + } + if (handled) { + return; + } - Inkscape::Selection *sel = sp_desktop_selection(dt); + g_return_if_fail(ensure_desktop_valid(action)); + + SPEventContext *ec = dt->event_context; if (sel->isEmpty()) return; @@ -1478,9 +1492,6 @@ void ObjectVerb::perform( SPAction *action, void *data) case SP_VERB_OBJECT_FLATTEN: sp_selection_remove_transform(dt); break; - case SP_VERB_OBJECT_TO_CURVE: - sp_selected_path_to_curves(dt); - break; case SP_VERB_OBJECT_FLOW_TEXT: text_flow_into_shape(); break; -- cgit v1.2.3 From dd18c27c36c9138bc68161ad365bfc61b8d135f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20dos=20Santos=20Oliveira?= Date: Thu, 12 Sep 2013 07:23:11 -0300 Subject: Integrating with libdepixelize (bzr r12506.1.1) --- src/verbs.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 737d9e150..23a560423 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1173,6 +1173,10 @@ void SelectionVerb::perform(SPAction *action, void *data) inkscape_dialogs_unhide(); dt->_dlg_mgr->showDialog("Trace"); break; + case SP_VERB_SELECTION_PIXEL_ART: + inkscape_dialogs_unhide(); + dt->_dlg_mgr->showDialog("PixelArt"); + break; case SP_VERB_SELECTION_CREATE_BITMAP: sp_selection_create_bitmap_copy(dt); break; @@ -2545,6 +2549,8 @@ Verb *Verb::_base_verbs[] = { // TRANSLATORS: "to trace" means "to convert a bitmap to vector graphics" (to vectorize) new SelectionVerb(SP_VERB_SELECTION_TRACE, "SelectionTrace", N_("_Trace Bitmap..."), N_("Create one or more paths from a bitmap by tracing it"), INKSCAPE_ICON("bitmap-trace")), + new SelectionVerb(SP_VERB_SELECTION_PIXEL_ART, "SelectionPixelArt", N_("Trace Pixel Art..."), + N_("Create paths using Kopf-Lischinski algorithm to vectorize pixel art"), INKSCAPE_ICON("pixelart-trace")), new SelectionVerb(SP_VERB_SELECTION_CREATE_BITMAP, "SelectionCreateBitmap", N_("Make a _Bitmap Copy"), N_("Export selection to a bitmap and insert it into document"), INKSCAPE_ICON("selection-make-bitmap-copy") ), new SelectionVerb(SP_VERB_SELECTION_COMBINE, "SelectionCombine", N_("_Combine"), -- cgit v1.2.3 From 421bdee0ed2b55d175459c898240b54762119569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20dos=20Santos=20Oliveira?= Date: Sun, 29 Sep 2013 08:35:21 -0300 Subject: Adding tutorial-tracing-pixelart (bzr r12626) --- src/verbs.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 23a560423..bdef0526a 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -2119,6 +2119,9 @@ void TutorialVerb::perform(SPAction *action, void *data) // TRANSLATORS: See "tutorial-basic.svg" comment. sp_help_open_tutorial(NULL, (gpointer)_("tutorial-tracing.svg")); break; + case SP_VERB_TUTORIAL_TRACING_PIXELART: + sp_help_open_tutorial(NULL, (gpointer)_("tutorial-tracing-pixelart.svg")); + break; case SP_VERB_TUTORIAL_CALLIGRAPHY: // TRANSLATORS: See "tutorial-basic.svg" comment. sp_help_open_tutorial(NULL, (gpointer)_("tutorial-calligraphy.svg")); @@ -2883,6 +2886,8 @@ Verb *Verb::_base_verbs[] = { // TRANSLATORS: "to trace" means "to convert a bitmap to vector graphics" (to vectorize) new TutorialVerb(SP_VERB_TUTORIAL_TRACING, "TutorialsTracing", N_("Inkscape: T_racing"), N_("Using bitmap tracing"), NULL/*"tutorial_tracing"*/), + new TutorialVerb(SP_VERB_TUTORIAL_TRACING_PIXELART, "TutorialsTracingPixelArt", N_("Inkscape: Tracing Pixel Art"), + N_("Using Trace Pixel Art dialog"), NULL), new TutorialVerb(SP_VERB_TUTORIAL_CALLIGRAPHY, "TutorialsCalligraphy", N_("Inkscape: _Calligraphy"), N_("Using the Calligraphy pen tool"), NULL), new TutorialVerb(SP_VERB_TUTORIAL_INTERPOLATE, "TutorialsInterpolate", N_("Inkscape: _Interpolate"), -- cgit v1.2.3 From 55b451bf382e0c3d5ed8728e42fbb535acfa8a33 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Thu, 7 Nov 2013 21:44:00 +0100 Subject: First step of moving tools into appropriate namespaces. (bzr r12782) --- src/verbs.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index bdef0526a..4bcfd39fe 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1473,7 +1473,7 @@ void ObjectVerb::perform( SPAction *action, void *data) g_return_if_fail(ensure_desktop_valid(action)); - SPEventContext *ec = dt->event_context; + Inkscape::UI::Tools::ToolBase *ec = dt->event_context; if (sel->isEmpty()) return; @@ -1622,7 +1622,7 @@ void ContextVerb::perform(SPAction *action, void *data) tools_switch(dt, TOOLS_MEASURE); break; case SP_VERB_CONTEXT_DROPPER: - sp_toggle_dropper(dt); // Functionality defined in event-context.cpp + Inkscape::UI::Tools::sp_toggle_dropper(dt); // Functionality defined in event-context.cpp break; case SP_VERB_CONTEXT_CONNECTOR: tools_switch(dt, TOOLS_CONNECTOR); @@ -1767,7 +1767,7 @@ void ZoomVerb::perform(SPAction *action, void *data) { g_return_if_fail(ensure_desktop_valid(action)); SPDesktop *dt = sp_action_get_desktop(action); - SPEventContext *ec = dt->event_context; + Inkscape::UI::Tools::ToolBase *ec = dt->event_context; SPDocument *doc = sp_desktop_document(dt); @@ -1780,7 +1780,7 @@ void ZoomVerb::perform(SPAction *action, void *data) switch (reinterpret_cast(data)) { case SP_VERB_ZOOM_IN: { - gint mul = 1 + gobble_key_events( + gint mul = 1 + Inkscape::UI::Tools::gobble_key_events( GDK_KEY_KP_Add, 0); // with any mask // While drawing with the pen/pencil tool, zoom towards the end of the unfinished path if (tools_isactive(dt, TOOLS_FREEHAND_PENCIL) || tools_isactive(dt, TOOLS_FREEHAND_PEN)) { @@ -1798,7 +1798,7 @@ void ZoomVerb::perform(SPAction *action, void *data) } case SP_VERB_ZOOM_OUT: { - gint mul = 1 + gobble_key_events( + gint mul = 1 + Inkscape::UI::Tools::gobble_key_events( GDK_KEY_KP_Subtract, 0); // with any mask // While drawing with the pen/pencil tool, zoom away from the end of the unfinished path if (tools_isactive(dt, TOOLS_FREEHAND_PENCIL) || tools_isactive(dt, TOOLS_FREEHAND_PEN)) { -- cgit v1.2.3 From c04e30df241a3ee039077425bab9b9c37abe2854 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Sat, 9 Nov 2013 23:36:13 +0100 Subject: Moved and renamed some tool-related files. (bzr r12785) --- src/verbs.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 4bcfd39fe..329e63115 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -44,9 +44,9 @@ #include "desktop-handles.h" #include "display/curve.h" #include "document.h" -#include "draw-context.h" +#include "ui/tools/freehand-base.h" #include "extension/effect.h" -#include "event-context.h" +#include "ui/tools/tool-base.h" #include "file.h" #include "gradient-drag.h" #include "helper/action.h" @@ -59,7 +59,7 @@ #include "message-stack.h" #include "path-chemistry.h" #include "preferences.h" -#include "select-context.h" +#include "ui/tools/select-tool.h" #include "selection-chemistry.h" #include "seltrans.h" #include "shape-editor.h" @@ -86,7 +86,7 @@ #include "ui/dialog/symbols.h" #include "ui/dialog/spellcheck.h" #include "ui/icon-names.h" -#include "ui/tool/node-tool.h" +#include "ui/tools/node-tool.h" #include "selection.h" #include -- cgit v1.2.3 From c862d2996b29dcace346d6c2e746672fd9d1949d Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Thu, 2 Jan 2014 17:34:58 +0000 Subject: Fix Gtk+ 3.10 warnings: GtkStockItem is deprecated (bzr r12868) --- src/verbs.cpp | 56 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 27 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 329e63115..8b333383f 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -2353,19 +2353,19 @@ Verb *Verb::_base_verbs[] = { // File new FileVerb(SP_VERB_FILE_NEW, "FileNew", N_("Default"), N_("Create new document from the default template"), - GTK_STOCK_NEW ), + INKSCAPE_ICON("document-new")), new FileVerb(SP_VERB_FILE_OPEN, "FileOpen", N_("_Open..."), - N_("Open an existing document"), GTK_STOCK_OPEN ), + N_("Open an existing document"), INKSCAPE_ICON("document-open")), new FileVerb(SP_VERB_FILE_REVERT, "FileRevert", N_("Re_vert"), - N_("Revert to the last saved version of document (changes will be lost)"), GTK_STOCK_REVERT_TO_SAVED ), + N_("Revert to the last saved version of document (changes will be lost)"), INKSCAPE_ICON("document-revert")), new FileVerb(SP_VERB_FILE_SAVE, "FileSave", N_("_Save"), N_("Save document"), - GTK_STOCK_SAVE ), + INKSCAPE_ICON("document-save")), new FileVerb(SP_VERB_FILE_SAVE_AS, "FileSaveAs", N_("Save _As..."), - N_("Save document under a new name"), GTK_STOCK_SAVE_AS ), + N_("Save document under a new name"), INKSCAPE_ICON("document-save-as")), new FileVerb(SP_VERB_FILE_SAVE_A_COPY, "FileSaveACopy", N_("Save a Cop_y..."), N_("Save a copy of the document under a new name"), NULL ), new FileVerb(SP_VERB_FILE_PRINT, "FilePrint", N_("_Print..."), N_("Print document"), - GTK_STOCK_PRINT ), + INKSCAPE_ICON("document-print")), // TRANSLATORS: "Vacuum Defs" means "Clean up defs" (so as to remove unused definitions) new FileVerb(SP_VERB_FILE_VACUUM, "FileVacuum", N_("Clean _up document"), N_("Remove unused definitions (such as gradients or clipping paths) from the <defs> of the document"), INKSCAPE_ICON("document-cleanup") ), @@ -2381,22 +2381,22 @@ Verb *Verb::_base_verbs[] = { new FileVerb(SP_VERB_FILE_PREV_DESKTOP, "PrevWindow", N_("P_revious Window"), N_("Switch to the previous document window"), INKSCAPE_ICON("window-previous")), new FileVerb(SP_VERB_FILE_CLOSE_VIEW, "FileClose", N_("_Close"), - N_("Close this document window"), GTK_STOCK_CLOSE), - new FileVerb(SP_VERB_FILE_QUIT, "FileQuit", N_("_Quit"), N_("Quit Inkscape"), GTK_STOCK_QUIT), + N_("Close this document window"), INKSCAPE_ICON("window-close")), + new FileVerb(SP_VERB_FILE_QUIT, "FileQuit", N_("_Quit"), N_("Quit Inkscape"), INKSCAPE_ICON("application-exit")), new FileVerb(SP_VERB_FILE_TEMPLATES, "FileTemplates", N_("_Templates..."), N_("Create new project from template"), INKSCAPE_ICON("dialog-templates")), // Edit new EditVerb(SP_VERB_EDIT_UNDO, "EditUndo", N_("_Undo"), N_("Undo last action"), - GTK_STOCK_UNDO), + INKSCAPE_ICON("edit-undo")), new EditVerb(SP_VERB_EDIT_REDO, "EditRedo", N_("_Redo"), - N_("Do again the last undone action"), GTK_STOCK_REDO), + N_("Do again the last undone action"), INKSCAPE_ICON("edit-redo")), new EditVerb(SP_VERB_EDIT_CUT, "EditCut", N_("Cu_t"), - N_("Cut selection to clipboard"), GTK_STOCK_CUT), + N_("Cut selection to clipboard"), INKSCAPE_ICON("edit-cut")), new EditVerb(SP_VERB_EDIT_COPY, "EditCopy", N_("_Copy"), - N_("Copy selection to clipboard"), GTK_STOCK_COPY), + N_("Copy selection to clipboard"), INKSCAPE_ICON("edit-copy")), new EditVerb(SP_VERB_EDIT_PASTE, "EditPaste", N_("_Paste"), - N_("Paste objects from clipboard to mouse point, or paste text"), GTK_STOCK_PASTE), + N_("Paste objects from clipboard to mouse point, or paste text"), INKSCAPE_ICON("edit-paste")), new EditVerb(SP_VERB_EDIT_PASTE_STYLE, "EditPasteStyle", N_("Paste _Style"), N_("Apply the style of the copied object to selection"), INKSCAPE_ICON("edit-paste-style")), new EditVerb(SP_VERB_EDIT_PASTE_SIZE, "EditPasteSize", N_("Paste Si_ze"), @@ -2420,7 +2420,7 @@ Verb *Verb::_base_verbs[] = { new EditVerb(SP_VERB_EDIT_REMOVE_FILTER, "RemoveFilter", N_("_Remove Filters"), N_("Remove any filters from selected objects"), NULL), new EditVerb(SP_VERB_EDIT_DELETE, "EditDelete", N_("_Delete"), - N_("Delete selection"), GTK_STOCK_DELETE), + N_("Delete selection"), INKSCAPE_ICON("edit-delete")), new EditVerb(SP_VERB_EDIT_DUPLICATE, "EditDuplicate", N_("Duplic_ate"), N_("Duplicate selected objects"), INKSCAPE_ICON("edit-duplicate")), new EditVerb(SP_VERB_EDIT_CLONE, "EditClone", N_("Create Clo_ne"), @@ -2448,19 +2448,19 @@ Verb *Verb::_base_verbs[] = { new EditVerb(SP_VERB_EDIT_CLEAR_ALL, "EditClearAll", N_("Clea_r All"), N_("Delete all objects from document"), NULL), new EditVerb(SP_VERB_EDIT_SELECT_ALL, "EditSelectAll", N_("Select Al_l"), - N_("Select all objects or all nodes"), GTK_STOCK_SELECT_ALL), + N_("Select all objects or all nodes"), INKSCAPE_ICON("edit-select-all")), new EditVerb(SP_VERB_EDIT_SELECT_ALL_IN_ALL_LAYERS, "EditSelectAllInAllLayers", N_("Select All in All La_yers"), N_("Select all objects in all visible and unlocked layers"), INKSCAPE_ICON("edit-select-all-layers")), new EditVerb(SP_VERB_EDIT_SELECT_SAME_FILL_STROKE, "EditSelectSameFillStroke", N_("Fill _and Stroke"), - N_("Select all objects with the same fill and stroke as the selected objects"), GTK_STOCK_SELECT_ALL), + N_("Select all objects with the same fill and stroke as the selected objects"), INKSCAPE_ICON("edit-select-all")), new EditVerb(SP_VERB_EDIT_SELECT_SAME_FILL_COLOR, "EditSelectSameFillColor", N_("_Fill Color"), - N_("Select all objects with the same fill as the selected objects"), GTK_STOCK_SELECT_ALL), + N_("Select all objects with the same fill as the selected objects"), INKSCAPE_ICON("edit-select-all")), new EditVerb(SP_VERB_EDIT_SELECT_SAME_STROKE_COLOR, "EditSelectSameStrokeColor", N_("_Stroke Color"), - N_("Select all objects with the same stroke as the selected objects"), GTK_STOCK_SELECT_ALL), + N_("Select all objects with the same stroke as the selected objects"), INKSCAPE_ICON("edit-select-all")), new EditVerb(SP_VERB_EDIT_SELECT_SAME_STROKE_STYLE, "EditSelectSameStrokeStyle", N_("Stroke St_yle"), - N_("Select all objects with the same stroke style (width, dash, markers) as the selected objects"), GTK_STOCK_SELECT_ALL), + N_("Select all objects with the same stroke style (width, dash, markers) as the selected objects"), INKSCAPE_ICON("edit-select-all")), new EditVerb(SP_VERB_EDIT_SELECT_SAME_OBJECT_TYPE, "EditSelectSameObjectType", N_("_Object Type"), - N_("Select all objects with the same object type (rect, arc, text, path, bitmap etc) as the selected objects"), GTK_STOCK_SELECT_ALL), + N_("Select all objects with the same object type (rect, arc, text, path, bitmap etc) as the selected objects"), INKSCAPE_ICON("edit-select-all")), new EditVerb(SP_VERB_EDIT_INVERT, "EditInvert", N_("In_vert Selection"), N_("Invert selection (unselect what is selected and select everything else)"), INKSCAPE_ICON("edit-select-invert")), new EditVerb(SP_VERB_EDIT_INVERT_IN_ALL_LAYERS, "EditInvertInAllLayers", N_("Invert in All Layers"), @@ -2808,18 +2808,20 @@ Verb *Verb::_base_verbs[] = { // Dialogs new DialogVerb(SP_VERB_DIALOG_DISPLAY, "DialogPreferences", N_("P_references..."), - N_("Edit global Inkscape preferences"), GTK_STOCK_PREFERENCES ), + N_("Edit global Inkscape preferences"), INKSCAPE_ICON("preferences-system")), new DialogVerb(SP_VERB_DIALOG_NAMEDVIEW, "DialogDocumentProperties", N_("_Document Properties..."), - N_("Edit properties of this document (to be saved with the document)"), GTK_STOCK_PROPERTIES ), + N_("Edit properties of this document (to be saved with the document)"), INKSCAPE_ICON("document-properties")), new DialogVerb(SP_VERB_DIALOG_METADATA, "DialogMetadata", N_("Document _Metadata..."), N_("Edit document metadata (to be saved with the document)"), INKSCAPE_ICON("document-metadata") ), new DialogVerb(SP_VERB_DIALOG_FILL_STROKE, "DialogFillStroke", N_("_Fill and Stroke..."), N_("Edit objects' colors, gradients, arrowheads, and other fill and stroke properties..."), INKSCAPE_ICON("dialog-fill-and-stroke")), + // FIXME: Probably better to either use something from the icon naming spec or ship our own "select-font" icon new DialogVerb(SP_VERB_DIALOG_GLYPHS, "DialogGlyphs", N_("Gl_yphs..."), - N_("Select characters from a glyphs palette"), GTK_STOCK_SELECT_FONT), + N_("Select characters from a glyphs palette"), INKSCAPE_ICON("gtk-select-font")), + // FIXME: Probably better to either use something from the icon naming spec or ship our own "select-color" icon // TRANSLATORS: "Swatches" means: color samples new DialogVerb(SP_VERB_DIALOG_SWATCHES, "DialogSwatches", N_("S_watches..."), - N_("Select colors from a swatches palette"), GTK_STOCK_SELECT_COLOR), + N_("Select colors from a swatches palette"), INKSCAPE_ICON("gtk-select-color")), new DialogVerb(SP_VERB_DIALOG_SYMBOLS, "DialogSymbols", N_("S_ymbols..."), N_("Select symbol from a symbols palette"), INKSCAPE_ICON("symbols")), new DialogVerb(SP_VERB_DIALOG_TRANSFORM, "DialogTransform", N_("Transfor_m..."), @@ -2835,11 +2837,11 @@ Verb *Verb::_base_verbs[] = { new DialogVerb(SP_VERB_DIALOG_XML_EDITOR, "DialogXMLEditor", N_("_XML Editor..."), N_("View and edit the XML tree of the document"), INKSCAPE_ICON("dialog-xml-editor")), new DialogVerb(SP_VERB_DIALOG_FIND, "DialogFind", N_("_Find/Replace..."), - N_("Find objects in document"), GTK_STOCK_FIND ), + N_("Find objects in document"), INKSCAPE_ICON("edit-find")), new DialogVerb(SP_VERB_DIALOG_FINDREPLACE, "DialogFindReplace", N_("Find and _Replace Text..."), - N_("Find and replace text in document"), GTK_STOCK_FIND_AND_REPLACE ), + N_("Find and replace text in document"), INKSCAPE_ICON("edit-find-replace")), new DialogVerb(SP_VERB_DIALOG_SPELLCHECK, "DialogSpellcheck", N_("Check Spellin_g..."), - N_("Check spelling of text in document"), GTK_STOCK_SPELL_CHECK ), + N_("Check spelling of text in document"), INKSCAPE_ICON("tools-check-spelling")), new DialogVerb(SP_VERB_DIALOG_DEBUG, "DialogDebug", N_("_Messages..."), N_("View debug messages"), INKSCAPE_ICON("dialog-messages")), new DialogVerb(SP_VERB_DIALOG_TOGGLE, "DialogsToggle", N_("Show/Hide D_ialogs"), -- cgit v1.2.3 From 903d68d4df1de1ae21e124d6e9c12770085ea087 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Tue, 25 Feb 2014 17:08:30 +0100 Subject: Rewrite of symbol creation code. Partial fix for 1201325. Symbols cannot have 'tranform' attribute. The old code copied the group 'transform' attribute to the symbol. The new code creates an intermediate group with the required 'transform' if it is not a simple translation. A simple translation is removed and applied instead to the new element. Multiple objects can now be turned into a symbol without first grouping the objects. (At the cost that multiple groups can no longer be turned into multiple symbols at one go.) This better matches marker and pattern creation. (bzr r13057) --- src/verbs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 8b333383f..653d5f892 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -996,7 +996,7 @@ void EditVerb::perform(SPAction *action, void *data) sp_selection_untile(dt); break; case SP_VERB_EDIT_SYMBOL: - sp_selection_symbols(dt); + sp_selection_symbol(dt); break; case SP_VERB_EDIT_UNSYMBOL: sp_selection_unsymbol(dt); -- cgit v1.2.3 From 927c9939330b056314097d5e20134428859e9a38 Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Tue, 4 Mar 2014 14:04:57 +0100 Subject: UI. Fix for bug #1281822 (Keyboard shortcuts editor, duplicate description and degrees symbol as text). Translations. POT file and French translation update. (bzr r13112) --- src/verbs.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 653d5f892..8b72dd5ab 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -2472,7 +2472,7 @@ Verb *Verb::_base_verbs[] = { new EditVerb(SP_VERB_EDIT_DESELECT, "EditDeselect", N_("D_eselect"), N_("Deselect any selected objects or nodes"), INKSCAPE_ICON("edit-select-none")), new EditVerb(SP_VERB_EDIT_DELETE_ALL_GUIDES, "EditRemoveAllGuides", N_("Delete All Guides"), - N_("Create four guides aligned with the page borders"), NULL), + N_("Delete all the guides in the document"), NULL), new EditVerb(SP_VERB_EDIT_GUIDES_AROUND_PAGE, "EditGuidesAroundPage", N_("Create _Guides Around the Page"), N_("Create four guides aligned with the page borders"), NULL), new EditVerb(SP_VERB_EDIT_NEXT_PATHEFFECT_PARAMETER, "EditNextPathEffectParameter", N_("Next path effect parameter"), @@ -2609,11 +2609,11 @@ Verb *Verb::_base_verbs[] = { N_("Toggle visibility of current layer"), NULL), // Object - new ObjectVerb(SP_VERB_OBJECT_ROTATE_90_CW, "ObjectRotate90", N_("Rotate _90° CW"), + new ObjectVerb(SP_VERB_OBJECT_ROTATE_90_CW, "ObjectRotate90", N_("Rotate _90\xc2\xb0 CW"), // This is shared between tooltips and statusbar, so they // must use UTF-8, not HTML entities for special characters. N_("Rotate selection 90\xc2\xb0 clockwise"), INKSCAPE_ICON("object-rotate-right")), - new ObjectVerb(SP_VERB_OBJECT_ROTATE_90_CCW, "ObjectRotate90CCW", N_("Rotate 9_0° CCW"), + new ObjectVerb(SP_VERB_OBJECT_ROTATE_90_CCW, "ObjectRotate90CCW", N_("Rotate 9_0\xc2\xb0 CCW"), // This is shared between tooltips and statusbar, so they // must use UTF-8, not HTML entities for special characters. N_("Rotate selection 90\xc2\xb0 counter-clockwise"), INKSCAPE_ICON("object-rotate-left")), -- cgit v1.2.3 From bad6e2e0dd2b5cea8a3f8a56f68d301ded69e768 Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Wed, 26 Mar 2014 13:30:14 -0400 Subject: Remove Snap menu item and improve grid menu item text (bzr r13213) --- src/verbs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 8b72dd5ab..5914c058a 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -2743,7 +2743,7 @@ Verb *Verb::_base_verbs[] = { new ZoomVerb(SP_VERB_ZOOM_OUT, "ZoomOut", N_("Zoom Out"), N_("Zoom out"), INKSCAPE_ICON("zoom-out")), new ZoomVerb(SP_VERB_TOGGLE_RULERS, "ToggleRulers", N_("_Rulers"), N_("Show or hide the canvas rulers"), NULL), new ZoomVerb(SP_VERB_TOGGLE_SCROLLBARS, "ToggleScrollbars", N_("Scroll_bars"), N_("Show or hide the canvas scrollbars"), NULL), - new ZoomVerb(SP_VERB_TOGGLE_GRID, "ToggleGrid", N_("_Grid"), N_("Show or hide the grid"), INKSCAPE_ICON("show-grid")), + new ZoomVerb(SP_VERB_TOGGLE_GRID, "ToggleGrid", N_("Page _Grid"), N_("Show or hide the page grid"), INKSCAPE_ICON("show-grid")), new ZoomVerb(SP_VERB_TOGGLE_GUIDES, "ToggleGuides", N_("G_uides"), N_("Show or hide guides (drag from a ruler to create a guide)"), INKSCAPE_ICON("show-guides")), new ZoomVerb(SP_VERB_TOGGLE_SNAPPING, "ToggleSnapGlobal", N_("Snap"), N_("Enable snapping"), INKSCAPE_ICON("snap")), new ZoomVerb(SP_VERB_TOGGLE_COMMANDS_TOOLBAR, "ToggleCommandsToolbar", N_("_Commands Bar"), N_("Show or hide the Commands bar (under the menu)"), NULL), -- cgit v1.2.3