summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 731842f)
raw | patch | inline | side by side (parent: 731842f)
author | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Tue, 18 Dec 2007 21:23:15 +0000 (21:23 +0000) | ||
committer | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Tue, 18 Dec 2007 21:23:15 +0000 (21:23 +0000) |
diff --git a/share/keys/default.xml b/share/keys/default.xml
index acf45b311cc356a836c57f5c590b285c608dacfc..74f7682ede055dd2440b226d2feda37f2e64cc46 100644 (file)
--- a/share/keys/default.xml
+++ b/share/keys/default.xml
<bind action="ArcPrefs" />
- <bind key="F9" modifiers="Shift" action="ToolStar" />
- <bind key="asterisk" modifiers="Shift" action="ToolStar" />
- <bind key="asterisk" action="ToolStar" />
- <bind key="KP_Multiply" action="ToolStar" display="true"/>
+ <bind key="F9" modifiers="Shift" action="ToolStar" display="true"/>
<bind action="StarPrefs" />
<bind key="numbersign" modifiers="Shift" action="ToggleGrid" /> <!-- # -->
<bind key="numbersign" action="ToggleGrid" display="true"/>
+
+ <bind key="KP_Multiply" action="ToggleSnapping" display="true"/> <!-- # -->
+ <bind key="asterisk" modifiers="Shift" action="ToggleSnapping" />
+ <bind key="asterisk" action="ToggleSnapping" />
<bind action="ViewNew"/>
<bind action="ViewNewPreview"/>
index e877c344b03baf6b3266dd1e7b3cf34add420397..b39b02e9f6774929f96c591a686cd123710fa55d 100644 (file)
--- a/share/keys/inkscape.xml
+++ b/share/keys/inkscape.xml
<bind action="ArcPrefs" />
- <bind key="F9" modifiers="Shift" action="ToolStar" />
- <bind key="asterisk" modifiers="Shift" action="ToolStar" />
- <bind key="asterisk" action="ToolStar" />
- <bind key="KP_Multiply" action="ToolStar" display="true"/>
+ <bind key="F9" modifiers="Shift" action="ToolStar" display="true"/>
<bind action="StarPrefs" />
<bind key="numbersign" modifiers="Shift" action="ToggleGrid" /> <!-- # -->
<bind key="numbersign" action="ToggleGrid" display="true"/>
+ <bind key="KP_Multiply" action="ToggleSnapping" display="true"/> <!-- # -->
+ <bind key="asterisk" modifiers="Shift" action="ToggleSnapping" />
+ <bind key="asterisk" action="ToggleSnapping" />
+
<bind action="ViewNew"/>
<bind action="ViewNewPreview"/>
<bind action="ViewIconPreview"/>
diff --git a/src/menus-skeleton.h b/src/menus-skeleton.h
index 7bff62c29fa9ba03cc94df7a03e7388f654b31e8..c039dcefd838956798ead611a6275c9a4f178aef 100644 (file)
--- a/src/menus-skeleton.h
+++ b/src/menus-skeleton.h
" <separator/>\n"
" <verb verb-id=\"ToggleGrid\" />\n"
" <verb verb-id=\"ToggleGuides\" />\n"
+" <verb verb-id=\"ToggleSnapping\" />\n"
" <verb verb-id=\"ViewCmsToggle\" />\n"
" <separator/>\n"
" <submenu name=\"" N_("Show/Hide") "\">\n"
diff --git a/src/snap.h b/src/snap.h
index 1f2b85974fe237a028d9160203e2959bb95bf68a..f7882fc619e1a11ea56a7a09756b7bba6d2c9e13 100644 (file)
--- a/src/snap.h
+++ b/src/snap.h
bool getSnapEnabledGlobally() const {
return _snap_enabled_globally;
}
+
+ void toggleSnapEnabledGlobally() {
+ _snap_enabled_globally = !_snap_enabled_globally;
+ }
protected:
SPNamedView const *_named_view;
diff --git a/src/verbs.cpp b/src/verbs.cpp
index f5ff45a0b519d68a43bd7ecac1bfa65667457a4a..2c2da7093b739e04073c974be98e927ea7577495 100644 (file)
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
case SP_VERB_TOGGLE_GUIDES:
sp_namedview_toggle_guides(doc, repr);
break;
+ case SP_VERB_TOGGLE_SNAPPING:
+ dt->namedview->snap_manager.toggleSnapEnabledGlobally();
+ break;
case SP_VERB_TOGGLE_GRID:
dt->toggleGrids();
break;
new ZoomVerb(SP_VERB_TOGGLE_SCROLLBARS, "ToggleScrollbars", N_("Scroll_bars"), N_("Show or hide the canvas scrollbars"), "scrollbars"),
new ZoomVerb(SP_VERB_TOGGLE_GRID, "ToggleGrid", N_("_Grid"), N_("Show or hide the grid"), "grid"),
new ZoomVerb(SP_VERB_TOGGLE_GUIDES, "ToggleGuides", N_("G_uides"), N_("Show or hide guides (drag from a ruler to create a guide)"), "guides"),
+ new ZoomVerb(SP_VERB_TOGGLE_SNAPPING, "ToggleSnapping", N_("Snap"), N_("Toggle snapping on or off"), NULL),
new ZoomVerb(SP_VERB_ZOOM_NEXT, "ZoomNext", N_("Nex_t Zoom"), N_("Next zoom (from the history of zooms)"),
"zoom_next"),
new ZoomVerb(SP_VERB_ZOOM_PREV, "ZoomPrev", N_("Pre_vious Zoom"), N_("Previous zoom (from the history of zooms)"),
diff --git a/src/verbs.h b/src/verbs.h
index a9abc02ed613543ab0a2ff57f7ac4f9af91d4c26..fce826c8f82c92147c34b247a1719c62aee48707 100644 (file)
--- a/src/verbs.h
+++ b/src/verbs.h
SP_VERB_TOGGLE_SCROLLBARS,
SP_VERB_TOGGLE_GRID,
SP_VERB_TOGGLE_GUIDES,
+ SP_VERB_TOGGLE_SNAPPING,
SP_VERB_ZOOM_NEXT,
SP_VERB_ZOOM_PREV,
SP_VERB_ZOOM_1_1,