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 /widgets/misc/e-combo-cell-editable.c | |
parent | b79bf3d187cabd11df74d2e6e414e41ae637f307 (diff) | |
download | gsoc2013-evolution-afe6f502c326350cc31d34646d5000a964321525.tar.gz 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 'widgets/misc/e-combo-cell-editable.c')
-rw-r--r-- | widgets/misc/e-combo-cell-editable.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/widgets/misc/e-combo-cell-editable.c b/widgets/misc/e-combo-cell-editable.c index 675e499388..aa514630ee 100644 --- a/widgets/misc/e-combo-cell-editable.c +++ b/widgets/misc/e-combo-cell-editable.c @@ -25,6 +25,9 @@ #include "e-combo-cell-editable.h" +/* backward-compatibility cruft */ +#include "e-util/gtk-compat.h" + struct _EComboCellEditablePriv { GtkEntry *entry; GtkWidget *popup; @@ -61,13 +64,13 @@ static gboolean popup_key_press_cb (GtkWidget *widget, GdkEventKey *event, EComboCellEditable *ecce) { switch (event->keyval) { - case GDK_Escape: + case GDK_KEY_Escape: ecce->priv->cancelled = TRUE; kill_popup (ecce); break; - case GDK_Return: - case GDK_KP_Enter: + case GDK_KEY_Return: + case GDK_KEY_KP_Enter: ecce->priv->cancelled = FALSE; kill_popup (ecce); break; @@ -275,7 +278,7 @@ entry_activated_cb (GtkEntry *entry, EComboCellEditable *widget) static gboolean entry_key_press_event_cb (GtkEntry *entry, GdkEventKey *key_event, EComboCellEditable *ecce) { - if (key_event->keyval == GDK_Escape) { + if (key_event->keyval == GDK_KEY_Escape) { ecce->priv->cancelled = TRUE; gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (ecce)); gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (ecce)); @@ -283,7 +286,7 @@ entry_key_press_event_cb (GtkEntry *entry, GdkEventKey *key_event, EComboCellEdi } if (key_event->state & GDK_MOD1_MASK - && key_event->keyval == GDK_Down) { + && key_event->keyval == GDK_KEY_Down) { if (!ecce->priv->popup) show_popup (ecce); |