diff options
Diffstat (limited to 'src/verbs.cpp')
| -rw-r--r-- | src/verbs.cpp | 72 |
1 files changed, 68 insertions, 4 deletions
diff --git a/src/verbs.cpp b/src/verbs.cpp index edfc45f8e..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; @@ -1342,17 +1349,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() ) { @@ -1775,6 +1799,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; @@ -1833,6 +1875,7 @@ void ZoomVerb::perform(SPAction *action, void *data) inkscape_dialogs_unhide(); dt->_dlg_mgr->showDialog("IconPreviewPanel"); break; + default: break; } @@ -1876,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; @@ -2339,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"), @@ -2489,6 +2539,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"), @@ -2632,6 +2688,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)"), @@ -2700,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..."), |
