aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
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 /addressbook
parentb79bf3d187cabd11df74d2e6e414e41ae637f307 (diff)
downloadgsoc2013-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 'addressbook')
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor.c10
-rw-r--r--addressbook/gui/widgets/e-minicard-label.c5
-rw-r--r--addressbook/gui/widgets/e-minicard-view.c5
-rw-r--r--addressbook/gui/widgets/e-minicard.c13
4 files changed, 22 insertions, 11 deletions
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
index edd8f003b9..2ffee04b91 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c
+++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
@@ -26,7 +26,6 @@
#include <e-util/e-util-private.h>
#include <e-util/e-alert-dialog.h>
#include <e-util/e-selection.h>
-#include <e-util/gtk-compat.h>
#include "shell/e-shell.h"
#include <string.h>
@@ -48,6 +47,9 @@
#include "e-contact-list-model.h"
#include "eab-contact-merging.h"
+/* backward-compatibility cruft */
+#include <e-util/gtk-compat.h>
+
#define E_CONTACT_LIST_EDITOR_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_CONTACT_LIST_EDITOR, EContactListEditorPrivate))
@@ -572,7 +574,7 @@ contact_list_editor_email_entry_key_press_event_cb (GtkWidget *widget,
editor = contact_list_editor_extract (widget);
- if (event->keyval == GDK_comma) {
+ if (event->keyval == GDK_KEY_comma) {
GtkEntry *entry;
gint cpos = -1;
@@ -596,7 +598,7 @@ contact_list_editor_email_entry_key_press_event_cb (GtkWidget *widget,
}
}
- if (can_comma || event->keyval == GDK_Return) {
+ if (can_comma || event->keyval == GDK_KEY_Return) {
g_signal_emit_by_name (widget, "activate", 0);
contact_list_editor_add_email (editor);
@@ -827,7 +829,7 @@ contact_list_editor_tree_view_key_press_event_cb (GtkWidget *widget,
editor = contact_list_editor_extract (widget);
- if (event->keyval == GDK_Delete) {
+ if (event->keyval == GDK_KEY_Delete) {
g_signal_emit_by_name (WIDGET (REMOVE_BUTTON), "clicked");
return TRUE;
}
diff --git a/addressbook/gui/widgets/e-minicard-label.c b/addressbook/gui/widgets/e-minicard-label.c
index 35b0525e51..6b01750a87 100644
--- a/addressbook/gui/widgets/e-minicard-label.c
+++ b/addressbook/gui/widgets/e-minicard-label.c
@@ -33,6 +33,9 @@
#include <misc/e-canvas-utils.h>
#include <gdk/gdkkeysyms.h>
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
static void e_minicard_label_init (EMinicardLabel *card);
static void e_minicard_label_class_init (EMinicardLabelClass *klass);
static void e_minicard_label_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
@@ -349,7 +352,7 @@ e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event)
switch (event->type) {
case GDK_KEY_PRESS:
- if (event->key.keyval == GDK_Escape) {
+ if (event->key.keyval == GDK_KEY_Escape) {
GnomeCanvasItem *parent;
e_text_cancel_editing (E_TEXT (e_minicard_label->field));
diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c
index 5f542ae66e..d3a05e53a6 100644
--- a/addressbook/gui/widgets/e-minicard-view.c
+++ b/addressbook/gui/widgets/e-minicard-view.c
@@ -36,6 +36,9 @@
#include "e-util/e-util.h"
#include "ea-addressbook.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
static void e_minicard_view_drag_data_get (GtkWidget *widget,
GdkDragContext *context,
GtkSelectionData *selection_data,
@@ -402,7 +405,7 @@ e_minicard_view_event (GnomeCanvasItem *item, GdkEvent *event)
break;
case GDK_KEY_PRESS:
if (event->key.keyval & GDK_SHIFT_MASK &&
- event->key.keyval == GDK_F10) {
+ event->key.keyval == GDK_KEY_F10) {
e_minicard_view_right_click (view, event);
}
break;
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index e5b5fa8310..5c2da9de01 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -40,6 +40,9 @@
#include <libebook/e-destination.h>
#include "ea-addressbook.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
static void e_minicard_init (EMinicard *card);
static void e_minicard_class_init (EMinicardClass *class);
static void e_minicard_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
@@ -637,9 +640,9 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
}
break;
case GDK_KEY_PRESS:
- if (event->key.keyval == GDK_Tab ||
- event->key.keyval == GDK_KP_Tab ||
- event->key.keyval == GDK_ISO_Left_Tab) {
+ if (event->key.keyval == GDK_KEY_Tab ||
+ event->key.keyval == GDK_KEY_KP_Tab ||
+ event->key.keyval == GDK_KEY_ISO_Left_Tab) {
EMinicardView *view = E_MINICARD_VIEW (item->parent);
EReflow *reflow = E_REFLOW (view);
@@ -701,8 +704,8 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
}
}
}
- else if (event->key.keyval == GDK_Return ||
- event->key.keyval == GDK_KP_Enter) {
+ else if (event->key.keyval == GDK_KEY_Return ||
+ event->key.keyval == GDK_KEY_KP_Enter) {
e_minicard_activate_editor (e_minicard);
return TRUE;
}