From 266cd1e5c43e6a46cd37f7db5138270b80d0944e Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Sun, 6 Dec 2015 22:39:31 +0100 Subject: Fixes UX pointed in suv review (bzr r14500.1.9) --- src/verbs.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index afcc37bc4..ed4b1ceb0 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -952,6 +952,10 @@ void EditVerb::perform(SPAction *action, void *data) g_return_if_fail(ensure_desktop_valid(action)); SPDesktop *dt = sp_action_get_desktop(action); + SPDocument *doc = dt->getDocument(); + + Inkscape::XML::Node *repr = dt->namedview->getRepr(); + switch (reinterpret_cast(data)) { case SP_VERB_EDIT_UNDO: sp_undo(dt, dt->getDocument()); @@ -1079,10 +1083,12 @@ void EditVerb::perform(SPAction *action, void *data) case SP_VERB_EDIT_DELETE_ALL_GUIDES: sp_guide_delete_all_guides(dt); break; + case SP_VERB_EDIT_GUIDES_TOGGLE_LOCK: + dt->toggleGuidesLock(); + break; case SP_VERB_EDIT_GUIDES_AROUND_PAGE: sp_guide_create_guides_around_page(dt); break; - case SP_VERB_EDIT_NEXT_PATHEFFECT_PARAMETER: sp_selection_next_patheffect_param(dt); break; @@ -1938,9 +1944,6 @@ void ZoomVerb::perform(SPAction *action, void *data) case SP_VERB_TOGGLE_GUIDES: sp_namedview_toggle_guides(doc, repr); break; - case SP_VERB_TOGGLE_GUIDES_LOCK: - sp_namedview_toggle_guides_lock(doc, repr); - break; case SP_VERB_TOGGLE_SNAPPING: dt->toggleSnapGlobal(); break; @@ -2543,6 +2546,7 @@ Verb *Verb::_base_verbs[] = { 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_("Delete all the guides in the document"), NULL), + new EditVerb(SP_VERB_EDIT_GUIDES_TOGGLE_LOCK, "EditGuidesToggleLock", N_("Lock All Guides"), N_("Toggle lock of all 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"), @@ -2831,7 +2835,6 @@ Verb *Verb::_base_verbs[] = { 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_("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_GUIDES_LOCK, "ToggleGuidesLook", N_("Gui_des Lock"), N_("Lock or unlock all guides"), INKSCAPE_ICON("object-locked")), 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), -- cgit v1.2.3