aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-cell-combo.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-09-18 06:39:59 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-09-18 06:39:59 +0800
commitafe6f502c326350cc31d34646d5000a964321525 (patch)
tree9d9469a0ce33428e24e602fdbf87bc496864bc57 /widgets/table/e-cell-combo.c
parentb79bf3d187cabd11df74d2e6e414e41ae637f307 (diff)
downloadgsoc2013-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/table/e-cell-combo.c')
-rw-r--r--widgets/table/e-cell-combo.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/widgets/table/e-cell-combo.c b/widgets/table/e-cell-combo.c
index 186ae4dfed..6e8eb41762 100644
--- a/widgets/table/e-cell-combo.c
+++ b/widgets/table/e-cell-combo.c
@@ -68,6 +68,9 @@
#include "e-cell-combo.h"
#include "e-cell-text.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define d(x)
/* The height to make the popup list if there aren't any items in it. */
@@ -628,14 +631,14 @@ e_cell_combo_key_press (GtkWidget *popup_window,
ECellCombo *ecc)
{
/* If the Escape key is pressed we hide the popup. */
- if (event->keyval != GDK_Escape
- && event->keyval != GDK_Return
- && event->keyval != GDK_KP_Enter
- && event->keyval != GDK_ISO_Enter
- && event->keyval != GDK_3270_Enter)
+ if (event->keyval != GDK_KEY_Escape
+ && event->keyval != GDK_KEY_Return
+ && event->keyval != GDK_KEY_KP_Enter
+ && event->keyval != GDK_KEY_ISO_Enter
+ && event->keyval != GDK_KEY_3270_Enter)
return FALSE;
- if (event->keyval == GDK_Escape && (!ecc->popup_window||!gtk_widget_get_visible (ecc->popup_window)))
+ if (event->keyval == GDK_KEY_Escape && (!ecc->popup_window||!gtk_widget_get_visible (ecc->popup_window)))
return FALSE;
gtk_grab_remove (ecc->popup_window);
@@ -646,7 +649,7 @@ e_cell_combo_key_press (GtkWidget *popup_window,
e_cell_popup_set_shown (E_CELL_POPUP (ecc), FALSE);
d(g_print("%s: popup_shown = FALSE\n", __FUNCTION__));
- if (event->keyval != GDK_Escape)
+ if (event->keyval != GDK_KEY_Escape)
e_cell_combo_update_cell (ecc);
e_cell_combo_restart_edit (ecc);