diff --git a/src/verbs.cpp b/src/verbs.cpp
index 78dd8bee85570c33a0d8c9077ab41fec89efd40a..b9dfec2711de70e7b0db06eaed3d85fff68c8f5b 100644 (file)
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
*/
-
-
-#include <gtk/gtkstock.h>
-
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
+#include <cstring>
+#include <string>
+#include <gtk/gtkstock.h>
+
#include "helper/action.h"
#include <gtkmm/messagedialog.h>
#include "shape-editor.h"
#include "draw-context.h"
#include "gradient-drag.h"
+#include "sp-guide.h"
/**
return;
}
+/** \brief Accessor to get the tooltip for verb as localised string */
+gchar const *
+Verb::get_tip (void)
+{
+ return _(_tip);
+}
void
Verb::name(SPDocument *in_doc, Glib::ustring in_name)
sp_file_save_a_copy(*parent, NULL, NULL);
break;
case SP_VERB_FILE_PRINT:
- sp_file_print();
+ sp_file_print(*parent);
break;
case SP_VERB_FILE_VACUUM:
sp_file_vacuum();
break;
- case SP_VERB_FILE_PRINT_DIRECT:
- sp_file_print_direct();
- break;
case SP_VERB_FILE_PRINT_PREVIEW:
sp_file_print_preview(NULL, NULL);
break;
case SP_VERB_EDIT_PASTE_LIVEPATHEFFECT:
sp_selection_paste_livepatheffect();
break;
+ case SP_VERB_EDIT_REMOVE_LIVEPATHEFFECT:
+ sp_selection_remove_livepatheffect();
+ break;
case SP_VERB_EDIT_DELETE:
sp_selection_delete();
break;
case SP_VERB_EDIT_SELECTION_2_MARKER:
sp_selection_to_marker();
break;
+ case SP_VERB_EDIT_SELECTION_2_GUIDES:
+ sp_selection_to_guides();
+ break;
case SP_VERB_EDIT_TILE:
sp_selection_tile();
break;
}
break;
+ case SP_VERB_EDIT_GUIDES_AROUND_PAGE:
+ sp_guide_create_guides_around_page(sp_desktop_document(dt));
+ break;
+
case SP_VERB_EDIT_NEXT_PATHEFFECT_PARAMETER:
sp_selection_next_patheffect_param(dt);
break;
case SP_VERB_OBJECT_SET_MASK:
sp_selection_set_mask(false, false);
break;
+ case SP_VERB_OBJECT_EDIT_MASK:
+ sp_selection_edit_clip_or_mask(dt, false);
+ break;
case SP_VERB_OBJECT_UNSET_MASK:
sp_selection_unset_mask(false);
break;
case SP_VERB_OBJECT_SET_CLIPPATH:
sp_selection_set_mask(true, false);
break;
+ case SP_VERB_OBJECT_EDIT_CLIPPATH:
+ sp_selection_edit_clip_or_mask(dt, true);
+ break;
case SP_VERB_OBJECT_UNSET_CLIPPATH:
sp_selection_unset_mask(true);
break;
case SP_VERB_DIALOG_INPUT:
sp_input_dialog();
break;
+ case SP_VERB_DIALOG_INPUT2:
+ dt->_dlg_mgr->showDialog("InputDevices");
+ break;
case SP_VERB_DIALOG_EXTENSIONEDITOR:
dt->_dlg_mgr->showDialog("ExtensionEditor");
break;
switch ((long) data) {
case SP_VERB_EFFECT_LAST_PREF:
- if (!effect->prefs(current_view))
- return;
- /* Note: fall through */
+ effect->prefs(current_view);
+ break;
case SP_VERB_EFFECT_LAST:
effect->effect(current_view);
break;
// 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"),
"file_vacuum" ),
- new FileVerb(SP_VERB_FILE_PRINT_DIRECT, "FilePrintDirect", N_("Print _Direct"),
- N_("Print directly without prompting to a file or pipe"), NULL ),
new FileVerb(SP_VERB_FILE_PRINT_PREVIEW, "FilePrintPreview", N_("Print Previe_w"),
N_("Preview document printout"), GTK_STOCK_PRINT_PREVIEW ),
new FileVerb(SP_VERB_FILE_IMPORT, "FileImport", N_("_Import..."),
N_("Scale each selected object vertically to match the height of the copied object"), NULL),
new EditVerb(SP_VERB_EDIT_PASTE_IN_PLACE, "EditPasteInPlace", N_("Paste _In Place"),
N_("Paste objects from clipboard to the original location"), "selection_paste_in_place"),
- new EditVerb(SP_VERB_EDIT_PASTE_LIVEPATHEFFECT, "EditPasteLivePathEffect", N_("Paste Path _Effect"),
+ new EditVerb(SP_VERB_EDIT_PASTE_LIVEPATHEFFECT, "PasteLivePathEffect", N_("Paste Path _Effect"),
N_("Apply the path effect of the copied object to selection"), NULL),
+ new EditVerb(SP_VERB_EDIT_REMOVE_LIVEPATHEFFECT, "RemoveLivePathEffect", N_("Remove Path _Effect"),
+ N_("Remove any path effects from selected objects"), NULL),
new EditVerb(SP_VERB_EDIT_DELETE, "EditDelete", N_("_Delete"),
N_("Delete selection"), GTK_STOCK_DELETE),
new EditVerb(SP_VERB_EDIT_DUPLICATE, "EditDuplicate", N_("Duplic_ate"),
// TRANSLATORS: Convert selection to a line marker
new EditVerb(SP_VERB_EDIT_SELECTION_2_MARKER, "ObjectsToMarker", N_("Objects to _Marker"),
N_("Convert selection to a line marker"), NULL),
+ // TRANSLATORS: Convert selection to a collection of guidelines
+ new EditVerb(SP_VERB_EDIT_SELECTION_2_GUIDES, "ObjectsToGuides", N_("Objects to Gu_ides"),
+ N_("Convert selected objects to a collection of guidelines aligned with their edges"), NULL),
// TRANSLATORS: Convert selection to a rectangle with tiled pattern fill
new EditVerb(SP_VERB_EDIT_TILE, "ObjectsToPattern", N_("Objects to Patter_n"),
N_("Convert selection to a rectangle with tiled pattern fill"), NULL),
N_("Select previous object or node"), NULL),
new EditVerb(SP_VERB_EDIT_DESELECT, "EditDeselect", N_("D_eselect"),
N_("Deselect any selected objects or nodes"), "selection_deselect"),
+ new EditVerb(SP_VERB_EDIT_GUIDES_AROUND_PAGE, "EditGuidesAroundPage", N_("_Guides around 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 Path Effect parameter for editing"), "edit_next_parameter"),
// Advanced tutorial for more info
new SelectionVerb(SP_VERB_SELECTION_BREAK_APART, "SelectionBreakApart", N_("Break _Apart"),
N_("Break selected paths into subpaths"), "selection_break"),
- new SelectionVerb(SP_VERB_SELECTION_GRIDTILE, "DialogGridArrange", N_("Gri_d Arrange..."),
- N_("Arrange selected objects in a grid pattern"), "grid_arrange"),
+ new SelectionVerb(SP_VERB_SELECTION_GRIDTILE, "DialogGridArrange", N_("Rows and Columns..."),
+ N_("Arrange selected objects in a table"), "grid_arrange"),
/* Layer */
new LayerVerb(SP_VERB_LAYER_NEW, "LayerNew", N_("_Add Layer..."),
N_("Create a new layer"), "new_layer"),
"object_flip_ver"),
new ObjectVerb(SP_VERB_OBJECT_SET_MASK, "ObjectSetMask", N_("_Set"),
N_("Apply mask to selection (using the topmost object as mask)"), NULL),
+ new ObjectVerb(SP_VERB_OBJECT_EDIT_MASK, "ObjectEditMask", N_("_Edit"),
+ N_("Edit mask"), "nodeedit-mask"),
new ObjectVerb(SP_VERB_OBJECT_UNSET_MASK, "ObjectUnSetMask", N_("_Release"),
N_("Remove mask from selection"), NULL),
new ObjectVerb(SP_VERB_OBJECT_SET_CLIPPATH, "ObjectSetClipPath", N_("_Set"),
N_("Apply clipping path to selection (using the topmost object as clipping path)"), NULL),
+ new ObjectVerb(SP_VERB_OBJECT_EDIT_CLIPPATH, "ObjectEditClipPath", N_("_Edit"),
+ N_("Edit clipping path"), "nodeedit-clippath"),
new ObjectVerb(SP_VERB_OBJECT_UNSET_CLIPPATH, "ObjectUnSetClipPath", N_("_Release"),
N_("Remove clipping path from selection"), NULL),
new ZoomVerb(SP_VERB_VIEW_MODE_TOGGLE, "ViewModeToggle", N_("_Toggle"),
N_("Toggle between normal and outline display modes"), NULL),
- new ZoomVerb(SP_VERB_VIEW_CMS_TOGGLE, "ViewCmsToggle", N_("Color manage view"),
- N_("Toggle color managed display adjustment for this document window"), "color_management"),
+ new ZoomVerb(SP_VERB_VIEW_CMS_TOGGLE, "ViewCmsToggle", N_("Color-managed view"),
+ N_("Toggle color-managed display for this document window"), "color_management"),
new ZoomVerb(SP_VERB_VIEW_ICON_PREVIEW, "ViewIconPreview", N_("Ico_n Preview..."),
N_("Open a window to preview objects at different icon resolutions"), "view_icon_preview"),
#endif
new DialogVerb(SP_VERB_DIALOG_INPUT, "DialogInput", N_("_Input Devices..."),
N_("Configure extended input devices, such as a graphics tablet"), "input_devices"),
+ new DialogVerb(SP_VERB_DIALOG_INPUT2, "DialogInput2", N_("_Input Devices (new)..."),
+ N_("Configure extended input devices, such as a graphics tablet"), "input_devices"),
new DialogVerb(SP_VERB_DIALOG_EXTENSIONEDITOR, "org.inkscape.dialogs.extensioneditor", N_("_Extensions..."),
N_("Query information about extensions"), NULL),
new DialogVerb(SP_VERB_DIALOG_LAYERS, "DialogLayers", N_("Layer_s..."),