diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2012-04-15 00:17:25 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2012-04-15 00:17:25 +0000 |
| commit | 0024197c76bca50d557edc2824646a636d695c4d (patch) | |
| tree | 5806bbba74cc9460371d2175f8a354917004245e /src/ui/widget/spinbutton.cpp | |
| parent | Don't prevent deprecated symbol usage with GTK+ 3 build yet... let's go one s... (diff) | |
| download | inkscape-0024197c76bca50d557edc2824646a636d695c4d.tar.gz inkscape-0024197c76bca50d557edc2824646a636d695c4d.zip | |
Get rid of remaining deprecated GDK Key symbols
(bzr r11250)
Diffstat (limited to 'src/ui/widget/spinbutton.cpp')
| -rw-r--r-- | src/ui/widget/spinbutton.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/ui/widget/spinbutton.cpp b/src/ui/widget/spinbutton.cpp index 60b7856f6..8ba8d413d 100644 --- a/src/ui/widget/spinbutton.cpp +++ b/src/ui/widget/spinbutton.cpp @@ -17,6 +17,12 @@ #include "util/expression-evaluator.h" #include "event-context.h" +#if !GTK_CHECK_VERSION(2,22,0) +#define GDK_KEY_Escape 0xff1b +#define GDK_KEY_z 0x07a +#define GDK_KEY_Z 0x05a +#endif + namespace Inkscape { namespace UI { namespace Widget { @@ -64,12 +70,12 @@ bool SpinButton::on_my_focus_in_event(GdkEventFocus* /*event*/) bool SpinButton::on_my_key_press_event(GdkEventKey* event) { switch (get_group0_keyval (event)) { - case GDK_Escape: + case GDK_KEY_Escape: undo(); return true; // I consumed the event break; - case GDK_z: - case GDK_Z: + case GDK_KEY_z: + case GDK_KEY_Z: if (event->state & GDK_CONTROL_MASK) { undo(); return true; // I consumed the event |
