diff options
Diffstat (limited to 'src/ui/tool/node.cpp')
| -rw-r--r-- | src/ui/tool/node.cpp | 21 |
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; |
