diff options
| author | Markus Engel <markus.engel@tum.de> | 2013-03-29 23:52:42 +0000 |
|---|---|---|
| committer | Markus Engel <markus.engel@tum.de> | 2013-03-29 23:52:42 +0000 |
| commit | a168040d5a452544328a1e6ad35aaac351f94d44 (patch) | |
| tree | fae1ba829f543a473da281bd5fa6e4deabbf6912 /src/verbs.cpp | |
| parent | Removed function pointers from SPObject and subclasses. (diff) | |
| parent | Dutch translation update (diff) | |
| download | inkscape-a168040d5a452544328a1e6ad35aaac351f94d44.tar.gz inkscape-a168040d5a452544328a1e6ad35aaac351f94d44.zip | |
merged from trunk
(bzr r11608.1.56)
Diffstat (limited to 'src/verbs.cpp')
| -rw-r--r-- | src/verbs.cpp | 207 |
1 files changed, 163 insertions, 44 deletions
diff --git a/src/verbs.cpp b/src/verbs.cpp index 7769a45f4..b8e72bc9b 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" @@ -66,6 +65,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" @@ -77,6 +77,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" @@ -85,10 +86,7 @@ #include <gtk/gtk.h> using Inkscape::DocumentUndo; - -//#ifdef WITH_INKBOARD -//#include "jabber_whiteboard/session-manager.h" -//#endif +using Inkscape::UI::Dialog::ActionAlign; /** * Return the name without underscores and ellipsis, for use in dialog @@ -130,7 +128,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 @@ -149,7 +147,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 @@ -168,7 +166,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 @@ -187,7 +185,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 @@ -206,7 +204,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 @@ -225,7 +223,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 @@ -244,7 +242,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 @@ -264,7 +262,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 @@ -283,7 +281,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 @@ -302,7 +300,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 @@ -321,7 +319,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 @@ -338,7 +336,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), @@ -347,6 +345,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; @@ -955,6 +954,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; @@ -1188,6 +1193,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: @@ -1336,17 +1345,34 @@ 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_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")); + break; + } case SP_VERB_LAYER_TOGGLE_LOCK: case SP_VERB_LAYER_TOGGLE_HIDE: { if ( dt->currentLayer() == dt->currentRoot() ) { @@ -1634,6 +1660,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; @@ -1756,6 +1795,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; @@ -1769,6 +1826,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()); @@ -1810,6 +1871,7 @@ void ZoomVerb::perform(SPAction *action, void *data) inkscape_dialogs_unhide(); dt->_dlg_mgr->showDialog("IconPreviewPanel"); break; + default: break; } @@ -1853,6 +1915,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; @@ -1902,13 +1967,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; @@ -1933,6 +1991,7 @@ void DialogVerb::perform(SPAction *action, void *data) case SP_VERB_DIALOG_PRINT_COLORS_PREVIEW: dt->_dlg_mgr->showDialog("PrintColorsPreviewDialog"); break; + default: break; } @@ -2035,7 +2094,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); } @@ -2100,7 +2159,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); } @@ -2166,7 +2225,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); } @@ -2225,8 +2284,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"), @@ -2316,6 +2375,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"), @@ -2423,7 +2486,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")), @@ -2446,6 +2509,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"), @@ -2464,6 +2529,12 @@ 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_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"), N_("Toggle lock on current layer"), NULL), new LayerVerb(SP_VERB_LAYER_TOGGLE_HIDE, "LayerToggleHide", N_("_Show/hide Current Layer"), @@ -2599,7 +2670,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")), @@ -2608,6 +2678,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)"), @@ -2621,6 +2697,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"), 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"), NULL), @@ -2674,6 +2752,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..."), @@ -2704,10 +2784,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..."), @@ -2717,14 +2793,13 @@ 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..."), 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"), N_("Information on Inkscape extensions"), NULL), @@ -2781,10 +2856,54 @@ 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) + new Verb(SP_VERB_LAST, " '\"invalid id", NULL, NULL, NULL, NULL) }; +std::vector<Inkscape::Verb *> +Verb::getList (void) { + + std::vector<Verb *> 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) { |
