summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8d5f237)
raw | patch | inline | side by side (parent: 8d5f237)
author | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Thu, 20 Dec 2007 19:47:40 +0000 (19:47 +0000) | ||
committer | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Thu, 20 Dec 2007 19:47:40 +0000 (19:47 +0000) |
diff --git a/share/keys/default.xml b/share/keys/default.xml
index 74f7682ede055dd2440b226d2feda37f2e64cc46..a519be542542c6c8a6f799b68851a2df2d89c1c5 100644 (file)
--- a/share/keys/default.xml
+++ b/share/keys/default.xml
<bind action="ArcPrefs" />
- <bind key="F9" modifiers="Shift" action="ToolStar" display="true"/>
+ <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 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 key="percent" action="ToggleSnapping" display="true"/> <!-- # -->
+ <bind key="percent" modifiers="Shift" action="ToggleSnapping" />
<bind action="ViewNew"/>
<bind action="ViewNewPreview"/>
index b39b02e9f6774929f96c591a686cd123710fa55d..437cb7d7a907d4f3279fb852aaea04f17dcbb4ba 100644 (file)
--- a/share/keys/inkscape.xml
+++ b/share/keys/inkscape.xml
<bind action="ArcPrefs" />
- <bind key="F9" modifiers="Shift" action="ToolStar" display="true"/>
+ <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 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 key="percent" action="ToggleSnapping" display="true"/> <!-- # -->
+ <bind key="percent" modifiers="Shift" action="ToggleSnapping" />
<bind action="ViewNew"/>
<bind action="ViewNewPreview"/>
diff --git a/src/desktop.cpp b/src/desktop.cpp
index d31babf87cb1f365a0dfe11e95353fc912ace79d..feb3f5cb0287ece3a51a8a05af074332473f98c4 100644 (file)
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
}
}
+void SPDesktop::toggleSnapping()
+{
+ bool v = namedview->snap_manager.getSnapEnabledGlobally();
+ Inkscape::XML::Node *repr = SP_OBJECT_REPR(namedview);
+ sp_repr_set_boolean(repr, "inkscape:snap-global", !v);
+}
//----------------------------------------------------------------------
// Callback implementations. The virtual ones are connected by the view.
diff --git a/src/desktop.h b/src/desktop.h
index 4c9d1ece8cfcaed5ebdd4d0987ddce8f642ef4c4..0a3732d56cd54ec91cb1b9d9eedf2d30d14dbf0f 100644 (file)
--- a/src/desktop.h
+++ b/src/desktop.h
void toggleColorProfAdjust();
void toggleGrids();
+ void toggleSnapping();
bool gridsEnabled() { return grids_visible; }
void showGrids(bool show, bool dirty_document = true);
diff --git a/src/interface.cpp b/src/interface.cpp
index 114f9b34ac95d211d0bd5d9e200bf6f80bb09ea6..f7a2bc47fd799b4ff903dcf6c389c5cd5101df74 100644 (file)
--- a/src/interface.cpp
+++ b/src/interface.cpp
else if (!strcmp(n, "Page_Down" )) return "PgDn";
else if (!strcmp(n, "grave" )) return "`";
else if (!strcmp(n, "numbersign" )) return "#";
- else if (!strcmp(n, "bar" )) return "|";
- else if (!strcmp(n, "slash" )) return "/";
- else if (!strcmp(n, "exclam" )) return "!";
+ else if (!strcmp(n, "bar" )) return "|";
+ else if (!strcmp(n, "slash" )) return "/";
+ else if (!strcmp(n, "exclam" )) return "!";
+ else if (!strcmp(n, "percent" )) return "%";
else return n;
}
diff --git a/src/verbs.cpp b/src/verbs.cpp
index 2c2da7093b739e04073c974be98e927ea7577495..78dd8bee85570c33a0d8c9077ab41fec89efd40a 100644 (file)
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
sp_namedview_toggle_guides(doc, repr);
break;
case SP_VERB_TOGGLE_SNAPPING:
- dt->namedview->snap_manager.toggleSnapEnabledGlobally();
+ dt->toggleSnapping();
break;
case SP_VERB_TOGGLE_GRID:
dt->toggleGrids();