From 3c593bb8da3357514ff5b4f3154d08c4508ad47e Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Wed, 20 Jul 2016 11:01:17 +0200 Subject: Changed arguments and names of selection chemistry functions (bzr r14954.1.22) --- src/verbs.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 299cfe8e7..8255ea1ea 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1133,22 +1133,22 @@ void SelectionVerb::perform(SPAction *action, void *data) sp_selected_path_slice(selection, dt); break; case SP_VERB_SELECTION_TO_FRONT: - sp_selection_raise_to_top(selection, dt); + sp_selection_raise_to_top_ui(selection, dt); break; case SP_VERB_SELECTION_TO_BACK: - sp_selection_lower_to_bottom(selection, dt); + sp_selection_lower_to_bottom_ui(selection, dt); break; case SP_VERB_SELECTION_RAISE: - sp_selection_raise(selection, dt); + sp_selection_raise_ui(selection, dt); break; case SP_VERB_SELECTION_LOWER: - sp_selection_lower(selection, dt); + sp_selection_lower_ui(selection, dt); break; case SP_VERB_SELECTION_GROUP: - sp_selection_group(selection, dt); + sp_selection_group_ui(selection, dt); break; case SP_VERB_SELECTION_UNGROUP: - sp_selection_ungroup(selection, dt); + sp_selection_ungroup_ui(selection, dt); break; case SP_VERB_SELECTION_UNGROUP_POP_SELECTION: sp_selection_ungroup_pop_selection(selection, dt); -- cgit v1.2.3 From ff4fbbc93f67afd6cbf851691833a50d6c76b350 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Wed, 27 Jul 2016 12:19:03 +0200 Subject: Renamed some functions, fixed tests (bzr r14954.1.28) --- src/verbs.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 8255ea1ea..d6c239e86 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1133,22 +1133,22 @@ void SelectionVerb::perform(SPAction *action, void *data) sp_selected_path_slice(selection, dt); break; case SP_VERB_SELECTION_TO_FRONT: - sp_selection_raise_to_top_ui(selection, dt); + sp_selection_raise_to_top(selection, dt); break; case SP_VERB_SELECTION_TO_BACK: - sp_selection_lower_to_bottom_ui(selection, dt); + sp_selection_lower_to_bottom(selection, dt); break; case SP_VERB_SELECTION_RAISE: - sp_selection_raise_ui(selection, dt); + sp_selection_raise(selection, dt); break; case SP_VERB_SELECTION_LOWER: - sp_selection_lower_ui(selection, dt); + sp_selection_lower(selection, dt); break; case SP_VERB_SELECTION_GROUP: - sp_selection_group_ui(selection, dt); + sp_selection_group(selection, dt); break; case SP_VERB_SELECTION_UNGROUP: - sp_selection_ungroup_ui(selection, dt); + sp_selection_ungroup(selection, dt); break; case SP_VERB_SELECTION_UNGROUP_POP_SELECTION: sp_selection_ungroup_pop_selection(selection, dt); @@ -1520,7 +1520,7 @@ void ObjectVerb::perform( SPAction *action, void *data) sp_selection_rotate_90(dt, true); break; case SP_VERB_OBJECT_FLATTEN: - sp_selection_remove_transform(dt); + sp_object_set_remove_transform(dt); break; case SP_VERB_OBJECT_FLOW_TEXT: text_flow_into_shape(); @@ -1532,12 +1532,12 @@ void ObjectVerb::perform( SPAction *action, void *data) flowtext_to_text(); break; case SP_VERB_OBJECT_FLIP_HORIZONTAL: - sp_selection_scale_relative(sel, center, Geom::Scale(-1.0, 1.0)); + sp_object_set_scale_relative(sel, center, Geom::Scale(-1.0, 1.0)); DocumentUndo::done(dt->getDocument(), SP_VERB_OBJECT_FLIP_HORIZONTAL, _("Flip horizontally")); break; case SP_VERB_OBJECT_FLIP_VERTICAL: - sp_selection_scale_relative(sel, center, Geom::Scale(1.0, -1.0)); + sp_object_set_scale_relative(sel, center, Geom::Scale(1.0, -1.0)); DocumentUndo::done(dt->getDocument(), SP_VERB_OBJECT_FLIP_VERTICAL, _("Flip vertically")); break; -- cgit v1.2.3 From f35bb1f74a0ffeb5c6477a25e3c4cde87a97bcf1 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 12:06:06 +0200 Subject: Removed unused includes, decrease compilation time (bzr r15025) --- src/verbs.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 299cfe8e7..b6293b3a2 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -26,7 +26,7 @@ #ifdef HAVE_CONFIG_H -# include "config.h" +#include #endif #include @@ -45,11 +45,9 @@ #include "document.h" #include "ui/tools/freehand-base.h" #include "extension/effect.h" -#include "ui/tools/tool-base.h" #include "file.h" #include "gradient-drag.h" #include "helper/action.h" -#include "helper/action-context.h" #include "help.h" #include "inkscape.h" #include "ui/interface.h" @@ -57,7 +55,6 @@ #include "layer-manager.h" #include "message-stack.h" #include "path-chemistry.h" -#include "preferences.h" #include "ui/tools/select-tool.h" #include "selection-chemistry.h" #include "seltrans.h" @@ -87,9 +84,6 @@ #include "ui/dialog/spellcheck.h" #include "ui/icon-names.h" #include "ui/tools/node-tool.h" -#include "selection.h" - -#include using Inkscape::DocumentUndo; using Inkscape::UI::Dialog::ActionAlign; -- cgit v1.2.3 From 43b49e325db73cc19b1731db6c69545664ee8fbe Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 13:26:17 +0200 Subject: Reverted changes to r15024 after many building problems (bzr r15027) --- src/verbs.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index b6293b3a2..299cfe8e7 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -26,7 +26,7 @@ #ifdef HAVE_CONFIG_H -#include +# include "config.h" #endif #include @@ -45,9 +45,11 @@ #include "document.h" #include "ui/tools/freehand-base.h" #include "extension/effect.h" +#include "ui/tools/tool-base.h" #include "file.h" #include "gradient-drag.h" #include "helper/action.h" +#include "helper/action-context.h" #include "help.h" #include "inkscape.h" #include "ui/interface.h" @@ -55,6 +57,7 @@ #include "layer-manager.h" #include "message-stack.h" #include "path-chemistry.h" +#include "preferences.h" #include "ui/tools/select-tool.h" #include "selection-chemistry.h" #include "seltrans.h" @@ -84,6 +87,9 @@ #include "ui/dialog/spellcheck.h" #include "ui/icon-names.h" #include "ui/tools/node-tool.h" +#include "selection.h" + +#include using Inkscape::DocumentUndo; using Inkscape::UI::Dialog::ActionAlign; -- cgit v1.2.3 From 35830f456cadaecf8b8e3944e3031a1a93f6cb41 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Wed, 3 Aug 2016 15:29:38 +0200 Subject: Removed unused includes, decreased compilation time. Once again (bzr r15034) --- src/verbs.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 299cfe8e7..b6293b3a2 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -26,7 +26,7 @@ #ifdef HAVE_CONFIG_H -# include "config.h" +#include #endif #include @@ -45,11 +45,9 @@ #include "document.h" #include "ui/tools/freehand-base.h" #include "extension/effect.h" -#include "ui/tools/tool-base.h" #include "file.h" #include "gradient-drag.h" #include "helper/action.h" -#include "helper/action-context.h" #include "help.h" #include "inkscape.h" #include "ui/interface.h" @@ -57,7 +55,6 @@ #include "layer-manager.h" #include "message-stack.h" #include "path-chemistry.h" -#include "preferences.h" #include "ui/tools/select-tool.h" #include "selection-chemistry.h" #include "seltrans.h" @@ -87,9 +84,6 @@ #include "ui/dialog/spellcheck.h" #include "ui/icon-names.h" #include "ui/tools/node-tool.h" -#include "selection.h" - -#include using Inkscape::DocumentUndo; using Inkscape::UI::Dialog::ActionAlign; -- cgit v1.2.3 From c95b03989b70f33ff3d54f2e644673ab518ac68b Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Wed, 3 Aug 2016 22:41:01 +0200 Subject: Add legacy verb SP_VERB_SELECTION_OUTLINE_LEGACY as pointed in bug 1556592#14 (bzr r15036) --- 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 b6293b3a2..d781442eb 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1201,6 +1201,9 @@ void SelectionVerb::perform(SPAction *action, void *data) case SP_VERB_SELECTION_OUTLINE: sp_selected_path_outline(dt); break; + case SP_VERB_SELECTION_OUTLINE_LEGACY: + sp_selected_path_outline(dt, true); + break; case SP_VERB_SELECTION_SIMPLIFY: sp_selected_path_simplify(dt); break; @@ -2612,6 +2615,8 @@ Verb *Verb::_base_verbs[] = { INKSCAPE_ICON("path-offset-linked")), new SelectionVerb(SP_VERB_SELECTION_OUTLINE, "StrokeToPath", N_("_Stroke to Path"), N_("Convert selected object's stroke to paths"), INKSCAPE_ICON("stroke-to-path")), + new SelectionVerb(SP_VERB_SELECTION_OUTLINE_LEGACY, "StrokeToPathLegacy", N_("_Stroke to Path Legacy"), + N_("Convert selected object's stroke to paths legacy mode"), INKSCAPE_ICON("stroke-to-path")), new SelectionVerb(SP_VERB_SELECTION_SIMPLIFY, "SelectionSimplify", N_("Si_mplify"), N_("Simplify selected paths (remove extra nodes)"), INKSCAPE_ICON("path-simplify")), new SelectionVerb(SP_VERB_SELECTION_REVERSE, "SelectionReverse", N_("_Reverse"), -- cgit v1.2.3 From 7f779f28e67eac1653e0f7751bb3f224b67894c7 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Mon, 15 Aug 2016 22:55:21 +0200 Subject: Fix a bunch of errors as reported at http://www.viva64.com/en/b/0419/ (bzr r15059) --- 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 59ad06fa1..5130f1701 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1842,7 +1842,7 @@ void ZoomVerb::perform(SPAction *action, void *data) Inkscape::Preferences *prefs = Inkscape::Preferences::get(); gdouble zoom_inc = - prefs->getDoubleLimited( "/options/zoomincrement/value", 1.414213562, 1.01, 10 ); + prefs->getDoubleLimited( "/options/zoomincrement/value", M_SQRT2, 1.01, 10 ); double zcorr = 1.0; Glib::ustring abbr = prefs->getString("/options/zoomcorrection/unit"); -- cgit v1.2.3 From d9c220b750654b229096a9f62f24480e100c8aa8 Mon Sep 17 00:00:00 2001 From: Dmitry Zhulanov Date: Thu, 29 Sep 2016 21:47:23 +0700 Subject: allow optional args for xverbs (bzr r15136.1.7) --- src/verbs.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 5130f1701..72708a7c0 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -817,7 +817,7 @@ Verb *Verb::get_search(unsigned int code) * * @param id Which id to search for. */ -Verb *Verb::getbyid(gchar const *id) +Verb *Verb::getbyid(gchar const *id, bool verbose) { Verb *verb = NULL; VerbIDTable::iterator verb_found = _verb_ids.find(id); @@ -833,8 +833,10 @@ Verb *Verb::getbyid(gchar const *id) && strcmp(id, "SelectionTrace") != 0 && strcmp(id, "PaintBucketPrefs") != 0 #endif - ) - printf("Unable to find: %s\n", id); + ) { + if (verbose) + printf("Unable to find: %s\n", id); + } return verb; } -- cgit v1.2.3 From 7be3086bf70ba9bf28c5cfe06fd7a8e28e719bcc Mon Sep 17 00:00:00 2001 From: sandra-snan Date: Sat, 8 Oct 2016 08:16:53 +0200 Subject: [Bug #770681] KEY MAPPING: Comma and period hijacked by scaling. Fixed bugs: - https://launchpad.net/bugs/770681 (bzr r15155) --- src/verbs.cpp | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 72708a7c0..e061eaab6 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1101,6 +1101,7 @@ void SelectionVerb::perform(SPAction *action, void *data) { Inkscape::Selection *selection = sp_action_get_selection(action); SPDesktop *dt = sp_action_get_desktop(action); + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); // Some of these operations have been modified so they work in command-line mode! // In this case, all we need is a selection @@ -1128,6 +1129,38 @@ void SelectionVerb::perform(SPAction *action, void *data) case SP_VERB_SELECTION_SLICE: sp_selected_path_slice(selection, dt); break; + case SP_VERB_SELECTION_GROW: + { + // FIXME these and the other grow/shrink they should use gobble_key_events. + // the problem is how to get access to which key, if any, to gobble. + sp_selection_scale(selection, prefs->getDoubleLimited("/options/defaultscale/value", 2, 0, 1000)); + break; + } + case SP_VERB_SELECTION_GROW_SCREEN: + { + sp_selection_scale_screen(selection, 2); + break; + } + case SP_VERB_SELECTION_GROW_DOUBLE: + { + sp_selection_scale_times(selection, 2); + break; + } + case SP_VERB_SELECTION_SHRINK: + { + sp_selection_scale(selection, -prefs->getDoubleLimited("/options/defaultscale/value", 2, 0, 1000)); + break; + } + case SP_VERB_SELECTION_SHRINK_SCREEN: + { + sp_selection_scale_screen(selection, -2); + break; + } + case SP_VERB_SELECTION_SHRINK_HALVE: + { + sp_selection_scale_times(selection, 0.5); + break; + } case SP_VERB_SELECTION_TO_FRONT: sp_selection_raise_to_top(selection, dt); break; @@ -1858,6 +1891,7 @@ void ZoomVerb::perform(SPAction *action, void *data) { gint mul = 1 + Inkscape::UI::Tools::gobble_key_events( GDK_KEY_KP_Add, 0); // with any mask + // FIXME what if zoom out is bound to something other than subtract? // 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)) { SPCurve *rc = SP_DRAW_CONTEXT(ec)->red_curve; @@ -2587,6 +2621,18 @@ Verb *Verb::_base_verbs[] = { // Advanced tutorial for more info new SelectionVerb(SP_VERB_SELECTION_SLICE, "SelectionCutPath", N_("Cut _Path"), N_("Cut the bottom path's stroke into pieces, removing fill"), INKSCAPE_ICON("path-cut")), + new SelectionVerb(SP_VERB_SELECTION_GROW, "SelectionGrow", N_("_Grow"), + N_("Make selected objects bigger"), INKSCAPE_ICON("selection-grow")), + new SelectionVerb(SP_VERB_SELECTION_GROW_SCREEN, "SelectionGrowScreen", N_("_Grow on screen"), + N_("Make selected objects bigger relative to screen"), INKSCAPE_ICON("selection-grow-screen")), + new SelectionVerb(SP_VERB_SELECTION_GROW_DOUBLE, "SelectionGrowDouble", N_("_Double size"), + N_("Double the size of selected objects"), INKSCAPE_ICON("selection-grow-double")), + new SelectionVerb(SP_VERB_SELECTION_SHRINK, "SelectionShrink", N_("_Shrink"), + N_("Make selected objects smaller"), INKSCAPE_ICON("selection-shrink")), + new SelectionVerb(SP_VERB_SELECTION_SHRINK_SCREEN, "SelectionShrinkScreen", N_("_Shrink on screen"), + N_("Make selected objects smaller relative to screen"), INKSCAPE_ICON("selection-shrink-screen")), + new SelectionVerb(SP_VERB_SELECTION_SHRINK_HALVE, "SelectionShrinkHalve", N_("_Halve size"), + N_("Halve the size of selected objects"), INKSCAPE_ICON("selection-shrink-halve")), // TRANSLATORS: "outset": expand a shape by offsetting the object's path, // i.e. by displacing it perpendicular to the path in each point. // See also the Advanced Tutorial for explanation. -- cgit v1.2.3 From 532f77b14a76fc04e6bdeca3625f9a55b5f11bdf Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Tue, 25 Oct 2016 00:58:43 +0200 Subject: CPPification: almost all sp_object_set_whatever and sp_selection_whatever global functions are now methods of ObjectSet*, with these additional benefits: - They can now act on any SelectionSet, not just the current selection; - Whenever possible, they don't need a desktop anymore and can run if called from GUI. I hope I did not break too many things in the process. *: So instead of callink sp_selection_move(desktop,x,y), you call myobjectset->move(x,y) (bzr r15189) --- src/verbs.cpp | 114 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 57 insertions(+), 57 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index e061eaab6..7a9875c69 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -956,85 +956,85 @@ void EditVerb::perform(SPAction *action, void *data) sp_redo(dt, dt->getDocument()); break; case SP_VERB_EDIT_CUT: - sp_selection_cut(dt); + dt->selection->cut(); break; case SP_VERB_EDIT_COPY: - sp_selection_copy(dt); + dt->selection->copy(); break; case SP_VERB_EDIT_PASTE: sp_selection_paste(dt, false); break; case SP_VERB_EDIT_PASTE_STYLE: - sp_selection_paste_style(dt); + dt->selection->pasteStyle(); break; case SP_VERB_EDIT_PASTE_SIZE: - sp_selection_paste_size(dt, true, true); + dt->selection->pasteSize(true,true); break; case SP_VERB_EDIT_PASTE_SIZE_X: - sp_selection_paste_size(dt, true, false); + dt->selection->pasteSize(true, false); break; case SP_VERB_EDIT_PASTE_SIZE_Y: - sp_selection_paste_size(dt, false, true); + dt->selection->pasteSize(false, true); break; case SP_VERB_EDIT_PASTE_SIZE_SEPARATELY: - sp_selection_paste_size_separately(dt, true, true); + dt->selection->pasteSizeSeparately(true, true); break; case SP_VERB_EDIT_PASTE_SIZE_SEPARATELY_X: - sp_selection_paste_size_separately(dt, true, false); + dt->selection->pasteSizeSeparately(true, false); break; case SP_VERB_EDIT_PASTE_SIZE_SEPARATELY_Y: - sp_selection_paste_size_separately(dt, false, true); + dt->selection->pasteSizeSeparately(false, true); break; case SP_VERB_EDIT_PASTE_IN_PLACE: sp_selection_paste(dt, true); break; case SP_VERB_EDIT_PASTE_LIVEPATHEFFECT: - sp_selection_paste_livepatheffect(dt); + dt->selection->pastePathEffect(); break; case SP_VERB_EDIT_REMOVE_LIVEPATHEFFECT: - sp_selection_remove_livepatheffect(dt); + dt->selection->removeLPE(); break; case SP_VERB_EDIT_REMOVE_FILTER: - sp_selection_remove_filter(dt); + dt->selection->removeFilter(); break; case SP_VERB_EDIT_DELETE: - sp_selection_delete(dt); + dt->selection->deleteItems(); break; case SP_VERB_EDIT_DUPLICATE: - sp_selection_duplicate(dt); + dt->selection->duplicate(); break; case SP_VERB_EDIT_CLONE: - sp_selection_clone(dt); + dt->selection->clone(); break; case SP_VERB_EDIT_UNLINK_CLONE: - sp_selection_unlink(dt); + dt->selection->unlink(); break; case SP_VERB_EDIT_RELINK_CLONE: - sp_selection_relink(dt); + dt->selection->relink(); break; case SP_VERB_EDIT_CLONE_SELECT_ORIGINAL: - sp_select_clone_original(dt); + dt->selection->cloneOriginal(); break; case SP_VERB_EDIT_CLONE_ORIGINAL_PATH_LPE: - sp_selection_clone_original_path_lpe(dt); + dt->selection->cloneOriginalPathLPE(); break; case SP_VERB_EDIT_SELECTION_2_MARKER: - sp_selection_to_marker(dt); + dt->selection->toMarker(); break; case SP_VERB_EDIT_SELECTION_2_GUIDES: - sp_selection_to_guides(dt); + dt->selection->toGuides(); break; case SP_VERB_EDIT_TILE: - sp_selection_tile(dt); + dt->selection->tile(); break; case SP_VERB_EDIT_UNTILE: - sp_selection_untile(dt); + dt->selection->untile(); break; case SP_VERB_EDIT_SYMBOL: - sp_selection_symbol(dt); + dt->selection->toSymbol(); break; case SP_VERB_EDIT_UNSYMBOL: - sp_selection_unsymbol(dt); + dt->selection->unSymbol(); break; case SP_VERB_EDIT_SELECT_ALL: SelectionHelper::selectAll(dt); @@ -1133,54 +1133,54 @@ void SelectionVerb::perform(SPAction *action, void *data) { // FIXME these and the other grow/shrink they should use gobble_key_events. // the problem is how to get access to which key, if any, to gobble. - sp_selection_scale(selection, prefs->getDoubleLimited("/options/defaultscale/value", 2, 0, 1000)); + selection->scale(prefs->getDoubleLimited("/options/defaultscale/value", 2, 0, 1000)); break; } case SP_VERB_SELECTION_GROW_SCREEN: { - sp_selection_scale_screen(selection, 2); + selection->scaleScreen(2); break; } case SP_VERB_SELECTION_GROW_DOUBLE: { - sp_selection_scale_times(selection, 2); + selection->scaleTimes(2); break; } case SP_VERB_SELECTION_SHRINK: { - sp_selection_scale(selection, -prefs->getDoubleLimited("/options/defaultscale/value", 2, 0, 1000)); + selection->scale(-prefs->getDoubleLimited("/options/defaultscale/value", 2, 0, 1000)); break; } case SP_VERB_SELECTION_SHRINK_SCREEN: { - sp_selection_scale_screen(selection, -2); + selection->scaleScreen(-2); break; } case SP_VERB_SELECTION_SHRINK_HALVE: { - sp_selection_scale_times(selection, 0.5); + selection->scaleTimes(0.5); break; } case SP_VERB_SELECTION_TO_FRONT: - sp_selection_raise_to_top(selection, dt); + selection->raiseToTop(); break; case SP_VERB_SELECTION_TO_BACK: - sp_selection_lower_to_bottom(selection, dt); + selection->lowerToBottom(); break; case SP_VERB_SELECTION_RAISE: - sp_selection_raise(selection, dt); + selection->raise(); break; case SP_VERB_SELECTION_LOWER: - sp_selection_lower(selection, dt); + selection->lower(); break; case SP_VERB_SELECTION_GROUP: - sp_selection_group(selection, dt); + selection->group(); break; case SP_VERB_SELECTION_UNGROUP: - sp_selection_ungroup(selection, dt); + selection->ungroup(); break; case SP_VERB_SELECTION_UNGROUP_POP_SELECTION: - sp_selection_ungroup_pop_selection(selection, dt); + selection->popFromGroup(); break; default: handled = false; @@ -1258,14 +1258,14 @@ void SelectionVerb::perform(SPAction *action, void *data) dt->_dlg_mgr->showDialog("PixelArt"); break; case SP_VERB_SELECTION_CREATE_BITMAP: - sp_selection_create_bitmap_copy(dt); + dt->selection->createBitmapCopy(); break; case SP_VERB_SELECTION_COMBINE: - sp_selected_path_combine(dt); + selection->combine(); break; case SP_VERB_SELECTION_BREAK_APART: - sp_selected_path_break_apart(dt); + selection->breakApart(); break; case SP_VERB_SELECTION_ARRANGE: INKSCAPE.dialogs_unhide(); @@ -1324,11 +1324,11 @@ void LayerVerb::perform(SPAction *action, void *data) break; } case SP_VERB_LAYER_MOVE_TO_NEXT: { - sp_selection_to_next_layer(dt); + dt->selection->toNextLayer(); break; } case SP_VERB_LAYER_MOVE_TO_PREV: { - sp_selection_to_prev_layer(dt); + dt->selection->toPrevLayer(); break; } case SP_VERB_LAYER_MOVE_TO: { @@ -1399,7 +1399,7 @@ void LayerVerb::perform(SPAction *action, void *data) case SP_VERB_LAYER_DUPLICATE: { if ( dt->currentLayer() != dt->currentRoot() ) { - sp_selection_duplicate(dt, true, true); + dt->selection->duplicate(true,true); DocumentUndo::done(dt->getDocument(), SP_VERB_LAYER_DUPLICATE, _("Duplicate layer")); @@ -1515,7 +1515,7 @@ void ObjectVerb::perform( SPAction *action, void *data) bool handled = true; switch (reinterpret_cast(data)) { case SP_VERB_OBJECT_TO_CURVE: - sp_selected_path_to_curves(sel, dt); + sel->toCurves(); break; default: handled = false; @@ -1546,13 +1546,13 @@ void ObjectVerb::perform( SPAction *action, void *data) switch (reinterpret_cast(data)) { case SP_VERB_OBJECT_ROTATE_90_CW: - sp_selection_rotate_90(dt, false); + sel->rotate90(false); break; case SP_VERB_OBJECT_ROTATE_90_CCW: - sp_selection_rotate_90(dt, true); + sel->rotate90(true); break; case SP_VERB_OBJECT_FLATTEN: - sp_object_set_remove_transform(dt); + sel->removeTransform(); break; case SP_VERB_OBJECT_FLOW_TEXT: text_flow_into_shape(); @@ -1564,35 +1564,35 @@ void ObjectVerb::perform( SPAction *action, void *data) flowtext_to_text(); break; case SP_VERB_OBJECT_FLIP_HORIZONTAL: - sp_object_set_scale_relative(sel, center, Geom::Scale(-1.0, 1.0)); + sel->setScaleRelative(center, Geom::Scale(-1.0, 1.0)); DocumentUndo::done(dt->getDocument(), SP_VERB_OBJECT_FLIP_HORIZONTAL, _("Flip horizontally")); break; case SP_VERB_OBJECT_FLIP_VERTICAL: - sp_object_set_scale_relative(sel, center, Geom::Scale(1.0, -1.0)); + sel->setScaleRelative(center, Geom::Scale(1.0, -1.0)); DocumentUndo::done(dt->getDocument(), SP_VERB_OBJECT_FLIP_VERTICAL, _("Flip vertically")); break; case SP_VERB_OBJECT_SET_MASK: - sp_selection_set_mask(dt, false, false); + sel->setMask(false, false); break; case SP_VERB_OBJECT_EDIT_MASK: - sp_selection_edit_clip_or_mask(dt, false); + sel->editMask(false); break; case SP_VERB_OBJECT_UNSET_MASK: - sp_selection_unset_mask(dt, false); + sel->unsetMask(false); break; case SP_VERB_OBJECT_SET_CLIPPATH: - sp_selection_set_mask(dt, true, false); + sel->setMask(true, false); break; case SP_VERB_OBJECT_CREATE_CLIP_GROUP: - sp_selection_set_clipgroup(dt); + sel->setClipGroup(); break; case SP_VERB_OBJECT_EDIT_CLIPPATH: - sp_selection_edit_clip_or_mask(dt, true); + sel->editMask(true); break; case SP_VERB_OBJECT_UNSET_CLIPPATH: - sp_selection_unset_mask(dt, true); + sel->unsetMask(true); break; default: break; -- cgit v1.2.3 From 3649ef4c620b9eae5132d89a39ebd280d9dc50a8 Mon Sep 17 00:00:00 2001 From: Alexander Brock Date: Thu, 27 Oct 2016 19:13:05 +0200 Subject: Add recursive clone unlink feature (bzr r15191.1.1) --- 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 7a9875c69..5e3fea677 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1009,6 +1009,9 @@ void EditVerb::perform(SPAction *action, void *data) case SP_VERB_EDIT_UNLINK_CLONE: dt->selection->unlink(); break; + case SP_VERB_EDIT_UNLINK_CLONE_RECURSIVE: + dt->selection->unlinkRecursive(); + break; case SP_VERB_EDIT_RELINK_CLONE: dt->selection->relink(); break; @@ -2530,6 +2533,8 @@ Verb *Verb::_base_verbs[] = { N_("Create a clone (a copy linked to the original) of selected object"), INKSCAPE_ICON("edit-clone")), new EditVerb(SP_VERB_EDIT_UNLINK_CLONE, "EditUnlinkClone", N_("Unlin_k Clone"), N_("Cut the selected clones' links to the originals, turning them into standalone objects"), INKSCAPE_ICON("edit-clone-unlink")), + new EditVerb(SP_VERB_EDIT_UNLINK_CLONE_RECURSIVE, "EditUnlinkCloneRecursive", N_("Unlink Clones _recursively"), + N_("Unlink all clones in the selection, even if they are in groups."), INKSCAPE_ICON("edit-clone-unlink")), new EditVerb(SP_VERB_EDIT_RELINK_CLONE, "EditRelinkClone", N_("Relink to Copied"), N_("Relink the selected clones to the object currently on the clipboard"), NULL), new EditVerb(SP_VERB_EDIT_CLONE_SELECT_ORIGINAL, "EditCloneSelectOriginal", N_("Select _Original"), -- cgit v1.2.3 From a5ea253b4b4d94659e0e0992b51853ffd4debbf9 Mon Sep 17 00:00:00 2001 From: Tobias Ellinghaus Date: Wed, 2 Nov 2016 23:42:43 +0100 Subject: fix prefs icon Fixed bugs: - https://launchpad.net/bugs/1638353 (bzr r15202) --- 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 7a9875c69..dc92545e2 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -2942,7 +2942,7 @@ Verb *Verb::_base_verbs[] = { // Dialogs new DialogVerb(SP_VERB_DIALOG_DISPLAY, "DialogPreferences", N_("P_references..."), - N_("Edit global Inkscape preferences"), INKSCAPE_ICON("preferences-system")), + N_("Edit global Inkscape preferences"), INKSCAPE_ICON("gtk-preferences")), new DialogVerb(SP_VERB_DIALOG_NAMEDVIEW, "DialogDocumentProperties", N_("_Document 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..."), -- cgit v1.2.3 From 68c305f169dfe9a273e29dd2aa587f0d59071483 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sun, 6 Nov 2016 16:33:01 +0100 Subject: further cppification Fixed bugs: - https://launchpad.net/bugs/1306662 (bzr r15218) --- 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 dc92545e2..c2167f67c 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -2359,7 +2359,7 @@ void FitCanvasVerb::perform(SPAction *action, void *data) switch (reinterpret_cast(data)) { case SP_VERB_FIT_CANVAS_TO_SELECTION: - verb_fit_canvas_to_selection(dt); + dt->selection->fitCanvas(true); break; case SP_VERB_FIT_CANVAS_TO_DRAWING: verb_fit_canvas_to_drawing(dt); -- cgit v1.2.3 From 07a86951a15301ccb7eb1446cc1e6d3ca7a68f9b Mon Sep 17 00:00:00 2001 From: Alexander Brock Date: Wed, 9 Nov 2016 01:23:41 +0100 Subject: Move boolop functions from sp_selected_path_ to ObjectSet::path (bzr r15223.1.1) --- src/verbs.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index a5426f324..32aee4161 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1115,22 +1115,22 @@ void SelectionVerb::perform(SPAction *action, void *data) bool handled = true; switch (reinterpret_cast(data)) { case SP_VERB_SELECTION_UNION: - sp_selected_path_union(selection, dt); + selection->pathUnion(); break; case SP_VERB_SELECTION_INTERSECT: - sp_selected_path_intersect(selection, dt); + selection->pathIntersect(); break; case SP_VERB_SELECTION_DIFF: - sp_selected_path_diff(selection, dt); + selection->pathDiff(); break; case SP_VERB_SELECTION_SYMDIFF: - sp_selected_path_symdiff(selection, dt); + selection->pathSymDiff(); break; case SP_VERB_SELECTION_CUT: - sp_selected_path_cut(selection, dt); + selection->pathCut(); break; case SP_VERB_SELECTION_SLICE: - sp_selected_path_slice(selection, dt); + selection->pathSlice(); break; case SP_VERB_SELECTION_GROW: { -- cgit v1.2.3 From 2e8438d76a5f26719d381843cd3ce3fa694809fb Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Tue, 27 Dec 2016 15:49:22 +0000 Subject: Rm remaining Gtk::Stock usage (bzr r15368) --- 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 32aee4161..975a3679e 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -37,7 +37,6 @@ // If this is not done, then errors will be generate relating to Glib::Threads being undefined #include #include -#include #include "desktop.h" -- cgit v1.2.3 From e8dcb5062f6114a9fb06d496ab5d906aec405c78 Mon Sep 17 00:00:00 2001 From: "alexandru.roman" Date: Sat, 21 Jan 2017 23:28:05 +0100 Subject: Fix "swap fill and stroke" for multiple objects in selection Add verb and shortcut possibility Fixed bugs: - https://launchpad.net/bugs/367360 - https://launchpad.net/bugs/675690 (bzr r15428) --- 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 975a3679e..aeb742105 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1086,6 +1086,9 @@ void EditVerb::perform(SPAction *action, void *data) case SP_VERB_EDIT_NEXT_PATHEFFECT_PARAMETER: sp_selection_next_patheffect_param(dt); break; + case SP_VERB_EDIT_SWAP_FILL_STROKE: + dt->selection->swapFillStroke(); + break; case SP_VERB_EDIT_LINK_COLOR_PROFILE: break; case SP_VERB_EDIT_REMOVE_COLOR_PROFILE: @@ -2585,6 +2588,8 @@ Verb *Verb::_base_verbs[] = { 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")), + new EditVerb(SP_VERB_EDIT_SWAP_FILL_STROKE, "EditSwapFillStroke", N_("Swap fill and stroke"), + N_("Swap fill and stroke of an object"), NULL), // Selection new SelectionVerb(SP_VERB_SELECTION_TO_FRONT, "SelectionToFront", N_("Raise to _Top"), -- cgit v1.2.3