summaryrefslogtreecommitdiffstats
path: root/src/ui/tool/node.cpp
diff options
context:
space:
mode:
authorDenis Declara <declara91@gmail.com>2012-04-15 12:29:45 +0000
committerDenis Declara <declara91@gmail.com>2012-04-15 12:29:45 +0000
commit6b5ff661a46ea1779c86f6947006c5ed32926117 (patch)
treea5b170f0830854e99ad065055ee2a3996933e614 /src/ui/tool/node.cpp
parentImproved User interface. (diff)
parenti18n. Fix for Bug #980518 (Please use c-format). (diff)
downloadinkscape-6b5ff661a46ea1779c86f6947006c5ed32926117.tar.gz
inkscape-6b5ff661a46ea1779c86f6947006c5ed32926117.zip
Trunk merge
(bzr r11073.1.15)
Diffstat (limited to 'src/ui/tool/node.cpp')
-rw-r--r--src/ui/tool/node.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp
index 8e39ec05a..1d3acb4a5 100644
--- a/src/ui/tool/node.cpp
+++ b/src/ui/tool/node.cpp
@@ -33,6 +33,15 @@
#include "ui/tool/path-manipulator.h"
#include <gdk/gdkkeysyms.h>
+#if !GTK_CHECK_VERSION(2,22,0)
+#define GDK_KEY_s 0x073
+#define GDK_KEY_S 0x053
+#define GDK_KEY_Page_Up 0xff55
+#define GDK_KEY_KP_Page_Up 0xff9a
+#define GDK_KEY_Page_Down 0xff56
+#define GDK_KEY_KP_Page_Down 0xff9b
+#endif
+
namespace Inkscape {
namespace UI {
@@ -81,7 +90,7 @@ double Handle::_saved_length = 0.0;
bool Handle::_drag_out = false;
Handle::Handle(NodeSharedData const &data, Geom::Point const &initial_pos, Node *parent)
- : ControlPoint(data.desktop, initial_pos, Gtk::ANCHOR_CENTER, SP_CTRL_SHAPE_CIRCLE, 7.0,
+ : ControlPoint(data.desktop, initial_pos, SP_ANCHOR_CENTER, SP_CTRL_SHAPE_CIRCLE, 7.0,
&handle_colors, data.handle_group)
, _parent(parent)
, _degenerate(true)
@@ -232,8 +241,8 @@ bool Handle::_eventHandler(SPEventContext *event_context, GdkEvent *event)
case GDK_KEY_PRESS:
switch (shortcut_key(event->key))
{
- case GDK_s:
- case GDK_S:
+ case GDK_KEY_s:
+ case GDK_KEY_S:
if (held_only_shift(event->key) && _parent->_type == NODE_CUSP) {
// when Shift+S is pressed when hovering over a handle belonging to a cusp node,
// hold this handle in place; otherwise process normally
@@ -473,7 +482,7 @@ Glib::ustring Handle::_getDragTip(GdkEventMotion */*event*/)
* The method move() keeps node type invariants during translations.
*/
Node::Node(NodeSharedData const &data, Geom::Point const &initial_pos)
- : SelectableControlPoint(data.desktop, initial_pos, Gtk::ANCHOR_CENTER,
+ : SelectableControlPoint(data.desktop, initial_pos, SP_ANCHOR_CENTER,
SP_CTRL_SHAPE_DIAMOND, 9.0, *data.selection, &node_colors, data.node_group)
, _front(data, initial_pos, this)
, _back(data, initial_pos, this)
@@ -803,10 +812,10 @@ bool Node::_eventHandler(SPEventContext *event_context, GdkEvent *event)
case GDK_KEY_PRESS:
switch (shortcut_key(event->key))
{
- case GDK_Page_Up:
+ case GDK_KEY_Page_Up:
dir = 1;
break;
- case GDK_Page_Down:
+ case GDK_KEY_Page_Down:
dir = -1;
break;
default: goto bail_out;