diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-09-18 06:39:59 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-09-18 06:39:59 +0800 |
commit | afe6f502c326350cc31d34646d5000a964321525 (patch) | |
tree | 9d9469a0ce33428e24e602fdbf87bc496864bc57 /mail | |
parent | b79bf3d187cabd11df74d2e6e414e41ae637f307 (diff) | |
download | gsoc2013-evolution-afe6f502c326350cc31d34646d5000a964321525.tar gsoc2013-evolution-afe6f502c326350cc31d34646d5000a964321525.tar.gz gsoc2013-evolution-afe6f502c326350cc31d34646d5000a964321525.tar.bz2 gsoc2013-evolution-afe6f502c326350cc31d34646d5000a964321525.tar.lz gsoc2013-evolution-afe6f502c326350cc31d34646d5000a964321525.tar.xz gsoc2013-evolution-afe6f502c326350cc31d34646d5000a964321525.tar.zst gsoc2013-evolution-afe6f502c326350cc31d34646d5000a964321525.zip |
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.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/e-mail-browser.c | 5 | ||||
-rw-r--r-- | mail/e-mail-reader.c | 27 | ||||
-rw-r--r-- | mail/em-folder-tree.c | 6 | ||||
-rw-r--r-- | mail/message-list.c | 4 |
4 files changed, 26 insertions, 16 deletions
diff --git a/mail/e-mail-browser.c b/mail/e-mail-browser.c index 34b4313a6f..3ffc290ba4 100644 --- a/mail/e-mail-browser.c +++ b/mail/e-mail-browser.c @@ -38,6 +38,9 @@ #include "mail/em-format-html-display.h" #include "mail/message-list.h" +/* backward-compatibility cruft */ +#include "e-util/gtk-compat.h" + #define E_MAIL_BROWSER_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE \ ((obj), E_TYPE_MAIL_BROWSER, EMailBrowserPrivate)) @@ -639,7 +642,7 @@ static gboolean mail_browser_key_press_event (GtkWidget *widget, GdkEventKey *event) { - if (event->keyval == GDK_Escape) { + if (event->keyval == GDK_KEY_Escape) { e_mail_browser_close (E_MAIL_BROWSER (widget)); return TRUE; } diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c index f628b657bf..68cae17828 100644 --- a/mail/e-mail-reader.c +++ b/mail/e-mail-reader.c @@ -59,6 +59,9 @@ #include <clutter-gtk/clutter-gtk.h> #endif +/* backward-compatibility cruft */ +#include "e-util/gtk-compat.h" + #define E_MAIL_READER_GET_PRIVATE(obj) \ ((EMailReaderPrivate *) g_object_get_qdata \ (G_OBJECT (obj), quark_private)) @@ -2075,24 +2078,24 @@ mail_reader_key_press_event_cb (EMailReader *reader, /* <keyval> alone */ switch (event->keyval) { - case GDK_Delete: - case GDK_KP_Delete: + case GDK_KEY_Delete: + case GDK_KEY_KP_Delete: action_name = "mail-delete"; break; - case GDK_Return: - case GDK_KP_Enter: - case GDK_ISO_Enter: + case GDK_KEY_Return: + case GDK_KEY_KP_Enter: + case GDK_KEY_ISO_Enter: action_name = "mail-message-open"; break; - case GDK_period: - case GDK_bracketright: + case GDK_KEY_period: + case GDK_KEY_bracketright: action_name = "mail-next-unread"; break; - case GDK_comma: - case GDK_bracketleft: + case GDK_KEY_comma: + case GDK_KEY_bracketleft: action_name = "mail-previous-unread"; break; @@ -2106,7 +2109,7 @@ mail_reader_key_press_event_cb (EMailReader *reader, break; #endif - case GDK_exclam: + case GDK_KEY_exclam: action_name = "mail-toggle-important"; break; @@ -2120,11 +2123,11 @@ ctrl: /* Ctrl + <keyval> */ switch (event->keyval) { - case GDK_period: + case GDK_KEY_period: action_name = "mail-next-unread"; break; - case GDK_comma: + case GDK_KEY_comma: action_name = "mail-previous-unread"; break; diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index 4fb1615a96..1c0e00d508 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -44,7 +44,6 @@ #include "e-util/e-icon-factory.h" #include "e-util/e-alert-dialog.h" #include "e-util/e-util.h" -#include "e-util/gtk-compat.h" #include "misc/e-selectable.h" @@ -66,6 +65,9 @@ #include "e-mail-local.h" +/* backward-compatibility cruft */ +#include "e-util/gtk-compat.h" + #define d(x) #define EM_FOLDER_TREE_GET_PRIVATE(obj) \ @@ -821,7 +823,7 @@ folder_tree_key_press_event (GtkWidget *widget, GtkTreeView *tree_view; if (event && event->type == GDK_KEY_PRESS && - (event->keyval == GDK_space || + (event->keyval == GDK_KEY_space || event->keyval == '.' || event->keyval == ',' || event->keyval == '[' || diff --git a/mail/message-list.c b/mail/message-list.c index 02881f8a05..ff7350a327 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -41,7 +41,6 @@ #include "e-util/e-profile-event.h" #include "e-util/e-util-private.h" #include "e-util/e-util.h" -#include "e-util/gtk-compat.h" #include "misc/e-selectable.h" @@ -68,6 +67,9 @@ #include "mail-tools.h" #include "message-list.h" +/* backward-compatibility cruft */ +#include "e-util/gtk-compat.h" + #if HAVE_CLUTTER #include <clutter/clutter.h> #include <mx/mx.h> |