From afe6f502c326350cc31d34646d5000a964321525 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 17 Sep 2010 18:39:59 -0400 Subject: Use new GDK keysym names if available. In GTK+ 2.21.8, the keysym names were renamed from GDK_* to GDK_KEY_*. I've added backward-compatibility macors to gtk-compat.h, which can be dumped as soon as we require GTK+ >= 2.22.0. --- shell/e-shell-searchbar.c | 5 ++++- shell/e-shell-window-private.h | 3 +++ shell/e-shell-window.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'shell') diff --git a/shell/e-shell-searchbar.c b/shell/e-shell-searchbar.c index 9a7800fdab..ce433592b4 100644 --- a/shell/e-shell-searchbar.c +++ b/shell/e-shell-searchbar.c @@ -38,6 +38,9 @@ #include "e-shell-window-actions.h" +/* backward-compatibility cruft */ +#include "e-util/gtk-compat.h" + #define E_SHELL_SEARCHBAR_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE \ ((obj), E_TYPE_SHELL_SEARCHBAR, EShellSearchbarPrivate)) @@ -416,7 +419,7 @@ shell_searchbar_entry_key_press_cb (EShellSearchbar *searchbar, if ((key_event->state & mask) != GDK_MOD1_MASK) return FALSE; - if (key_event->keyval != GDK_Down) + if (key_event->keyval != GDK_KEY_Down) return FALSE; shell_view = e_shell_searchbar_get_shell_view (searchbar); diff --git a/shell/e-shell-window-private.h b/shell/e-shell-window-private.h index 02a688503e..de2b32471a 100644 --- a/shell/e-shell-window-private.h +++ b/shell/e-shell-window-private.h @@ -43,6 +43,9 @@ #include #include +/* backward-compatibility cruft */ +#include "e-util/gtk-compat.h" + #define E_SHELL_WINDOW_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE \ ((obj), E_TYPE_SHELL_WINDOW, EShellWindowPrivate)) diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c index 5480903f6b..e8be087560 100644 --- a/shell/e-shell-window.c +++ b/shell/e-shell-window.c @@ -421,7 +421,7 @@ shell_window_construct_toolbar (EShellWindow *shell_window) gtk_widget_add_accelerator ( GTK_WIDGET (item), "clicked", gtk_ui_manager_get_accel_group (ui_manager), - GDK_N, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); + GDK_KEY_N, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, 0); gtk_widget_show (GTK_WIDGET (item)); -- cgit