aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/e-account-manager.c5
-rw-r--r--widgets/misc/e-attachment-view.c6
-rw-r--r--widgets/misc/e-buffer-tagger.c11
-rw-r--r--widgets/misc/e-calendar-item.c15
-rw-r--r--widgets/misc/e-canvas-vbox.c23
-rw-r--r--widgets/misc/e-combo-cell-editable.c13
-rw-r--r--widgets/misc/e-dateedit.c19
-rw-r--r--widgets/misc/e-image-chooser.c2
-rw-r--r--widgets/misc/e-import-assistant.c5
-rw-r--r--widgets/misc/e-map.c11
-rw-r--r--widgets/misc/e-preferences-window.c5
-rw-r--r--widgets/misc/e-preview-pane.c5
-rw-r--r--widgets/misc/e-search-bar.c5
-rw-r--r--widgets/misc/e-selection-model.c27
-rw-r--r--widgets/misc/e-signature-manager.c5
-rw-r--r--widgets/table/e-cell-combo.c17
-rw-r--r--widgets/table/e-cell-date-edit.c5
-rw-r--r--widgets/table/e-cell-popup.c5
-rw-r--r--widgets/table/e-cell-text.c9
-rw-r--r--widgets/table/e-cell-toggle.c5
-rw-r--r--widgets/table/e-table-click-to-add.c19
-rw-r--r--widgets/table/e-table-group-container.c29
-rw-r--r--widgets/table/e-table-header-item.c12
-rw-r--r--widgets/table/e-table-item.c77
-rw-r--r--widgets/table/e-table.c31
-rw-r--r--widgets/table/e-tree.c35
-rw-r--r--widgets/table/gal-a11y-e-cell-popup.c5
-rw-r--r--widgets/table/gal-a11y-e-table.c5
-rw-r--r--widgets/table/gal-a11y-e-tree.c5
-rw-r--r--widgets/text/e-reflow.c2
-rw-r--r--widgets/text/e-text.c6
31 files changed, 253 insertions, 171 deletions
diff --git a/widgets/misc/e-account-manager.c b/widgets/misc/e-account-manager.c
index 3186e6ffbc..b3b7f1861f 100644
--- a/widgets/misc/e-account-manager.c
+++ b/widgets/misc/e-account-manager.c
@@ -26,6 +26,9 @@
#include "e-util/e-binding.h"
#include "e-account-tree-view.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define E_ACCOUNT_MANAGER_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_ACCOUNT_MANAGER, EAccountManagerPrivate))
@@ -81,7 +84,7 @@ static gboolean
account_manager_key_press_event_cb (EAccountManager *manager,
GdkEventKey *event)
{
- if (event->keyval == GDK_Delete) {
+ if (event->keyval == GDK_KEY_Delete) {
e_account_manager_delete_account (manager);
return TRUE;
}
diff --git a/widgets/misc/e-attachment-view.c b/widgets/misc/e-attachment-view.c
index a80fe32ec0..f641f76f1d 100644
--- a/widgets/misc/e-attachment-view.c
+++ b/widgets/misc/e-attachment-view.c
@@ -29,12 +29,14 @@
#include "e-util/e-selection.h"
#include "e-util/e-ui-manager.h"
#include "e-util/e-util.h"
-#include "e-util/gtk-compat.h"
#include "e-attachment-dialog.h"
#include "e-attachment-handler-image.h"
#include "e-attachment-handler-sendto.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
enum {
UPDATE_ACTIONS,
LAST_SIGNAL
@@ -1323,7 +1325,7 @@ e_attachment_view_key_press_event (EAttachmentView *view,
editable = e_attachment_view_get_editable (view);
- if (event->keyval == GDK_Delete && editable) {
+ if (event->keyval == GDK_KEY_Delete && editable) {
e_attachment_view_remove_selected (view, TRUE);
return TRUE;
}
diff --git a/widgets/misc/e-buffer-tagger.c b/widgets/misc/e-buffer-tagger.c
index 217ffdb05b..55a9e34e57 100644
--- a/widgets/misc/e-buffer-tagger.c
+++ b/widgets/misc/e-buffer-tagger.c
@@ -29,6 +29,9 @@
#include "e-util/e-util.h"
#include "e-buffer-tagger.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
enum EBufferTaggerState
{
E_BUFFER_TAGGER_STATE_NONE = 0,
@@ -378,8 +381,8 @@ textview_key_press_event (GtkWidget *text_view, GdkEventKey *event)
return FALSE;
switch (event->keyval) {
- case GDK_Return:
- case GDK_KP_Enter:
+ case GDK_KEY_Return:
+ case GDK_KEY_KP_Enter:
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view));
gtk_text_buffer_get_iter_at_mark (buffer, &iter, gtk_text_buffer_get_insert (buffer));
if (invoke_link_if_present (buffer, &iter))
@@ -427,8 +430,8 @@ textview_event_after (GtkTextView *textview, GdkEvent *ev)
GdkEventKey *event_key = (GdkEventKey *)ev;
switch (event_key->keyval) {
- case GDK_Control_L:
- case GDK_Control_R:
+ case GDK_KEY_Control_L:
+ case GDK_KEY_Control_R:
update_ctrl_state (textview, ev->type == GDK_KEY_PRESS);
break;
}
diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c
index f362046ee3..f5d2f870af 100644
--- a/widgets/misc/e-calendar-item.c
+++ b/widgets/misc/e-calendar-item.c
@@ -38,6 +38,9 @@
#include <e-util/e-util.h>
#include <e-util/e-extensible.h>
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
static const gint e_calendar_item_days_in_month[12] = {
31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
};
@@ -1869,24 +1872,24 @@ e_calendar_item_key_press_event (ECalendarItem *calitem, GdkEvent *event)
multi_selection = event->key.state & GDK_SHIFT_MASK;
switch (keyval) {
- case GDK_Up:
+ case GDK_KEY_Up:
e_calendar_item_selection_add_days (calitem, -7,
multi_selection);
break;
- case GDK_Down:
+ case GDK_KEY_Down:
e_calendar_item_selection_add_days (calitem, 7,
multi_selection);
break;
- case GDK_Left:
+ case GDK_KEY_Left:
e_calendar_item_selection_add_days (calitem, -1,
multi_selection);
break;
- case GDK_Right:
+ case GDK_KEY_Right:
e_calendar_item_selection_add_days (calitem, 1,
multi_selection);
break;
- case GDK_space:
- case GDK_Return:
+ case GDK_KEY_space:
+ case GDK_KEY_Return:
e_calendar_item_stop_selecting (calitem, event->key.time);
break;
default:
diff --git a/widgets/misc/e-canvas-vbox.c b/widgets/misc/e-canvas-vbox.c
index a49f7e93be..c41cac160f 100644
--- a/widgets/misc/e-canvas-vbox.c
+++ b/widgets/misc/e-canvas-vbox.c
@@ -34,6 +34,9 @@
#include "e-canvas-utils.h"
#include "e-canvas-vbox.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
static void e_canvas_vbox_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
static void e_canvas_vbox_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
static void e_canvas_vbox_dispose (GObject *object);
@@ -207,16 +210,16 @@ e_canvas_vbox_event (GnomeCanvasItem *item, GdkEvent *event)
switch (event->type) {
case GDK_KEY_PRESS:
switch (event->key.keyval) {
- case GDK_Left:
- case GDK_KP_Left:
- case GDK_Right:
- case GDK_KP_Right:
- case GDK_Down:
- case GDK_KP_Down:
- case GDK_Up:
- case GDK_KP_Up:
- case GDK_Return:
- case GDK_KP_Enter:
+ case GDK_KEY_Left:
+ case GDK_KEY_KP_Left:
+ case GDK_KEY_Right:
+ case GDK_KEY_KP_Right:
+ case GDK_KEY_Down:
+ case GDK_KEY_KP_Down:
+ case GDK_KEY_Up:
+ case GDK_KEY_KP_Up:
+ case GDK_KEY_Return:
+ case GDK_KEY_KP_Enter:
return_val = TRUE;
break;
default:
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);
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index 8c870bb7ad..b976355801 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -44,6 +44,9 @@
#include <e-util/e-extensible.h>
#include "e-calendar.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define E_DATE_EDIT_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_DATE_EDIT, EDateEditPrivate))
@@ -1496,7 +1499,7 @@ on_date_popup_key_press (GtkWidget *widget,
window = gtk_widget_get_window (dedit->priv->cal_popup);
- if (event->keyval != GDK_Escape) {
+ if (event->keyval != GDK_KEY_Escape) {
gdk_keyboard_grab (window, TRUE, GDK_CURRENT_TIME);
return FALSE;
}
@@ -1714,8 +1717,8 @@ on_date_entry_key_press (GtkWidget *widget,
EDateEdit *dedit)
{
if (event->state & GDK_MOD1_MASK
- && (event->keyval == GDK_Up || event->keyval == GDK_Down
- || event->keyval == GDK_Return)) {
+ && (event->keyval == GDK_KEY_Up || event->keyval == GDK_KEY_Down
+ || event->keyval == GDK_KEY_Return)) {
g_signal_stop_emission_by_name (widget,
"key_press_event");
e_date_edit_show_date_popup (dedit);
@@ -1724,7 +1727,7 @@ on_date_entry_key_press (GtkWidget *widget,
/* If the user hits the return key emit a "date_changed" signal if
needed. But let the signal carry on. */
- if (event->keyval == GDK_Return) {
+ if (event->keyval == GDK_KEY_Return) {
e_date_edit_check_date_changed (dedit);
return FALSE;
}
@@ -1745,9 +1748,9 @@ on_time_entry_key_press (GtkWidget *widget,
but the combo steals any Up/Down keys, so we use Alt+Return. */
#if 0
if (event->state & GDK_MOD1_MASK
- && (event->keyval == GDK_Up || event->keyval == GDK_Down)) {
+ && (event->keyval == GDK_KEY_Up || event->keyval == GDK_KEY_Down)) {
#else
- if (event->state & GDK_MOD1_MASK && event->keyval == GDK_Return) {
+ if (event->state & GDK_MOD1_MASK && event->keyval == GDK_KEY_Return) {
#endif
g_signal_stop_emission_by_name (widget, "key_press_event");
g_signal_emit_by_name (child, "activate", 0);
@@ -1756,7 +1759,7 @@ on_time_entry_key_press (GtkWidget *widget,
/* Stop the return key from emitting the activate signal, and check
if we need to emit a "time_changed" signal. */
- if (event->keyval == GDK_Return) {
+ if (event->keyval == GDK_KEY_Return) {
g_signal_stop_emission_by_name (widget,
"key_press_event");
e_date_edit_check_time_changed (dedit);
@@ -1780,7 +1783,7 @@ on_time_entry_key_release (GtkWidget *widget,
GdkEventKey *event,
EDateEdit *dedit)
{
- if (event->keyval == GDK_Up || event->keyval == GDK_Down) {
+ if (event->keyval == GDK_KEY_Up || event->keyval == GDK_KEY_Down) {
g_signal_stop_emission_by_name (widget,
"key_release_event");
e_date_edit_check_time_changed (dedit);
diff --git a/widgets/misc/e-image-chooser.c b/widgets/misc/e-image-chooser.c
index 0ddf08ccde..c01f35b3d7 100644
--- a/widgets/misc/e-image-chooser.c
+++ b/widgets/misc/e-image-chooser.c
@@ -29,6 +29,8 @@
#include "e-image-chooser.h"
#include "e-util/e-util.h"
#include "e-util/e-icon-factory.h"
+
+/* backward-compatibility cruft */
#include "e-util/gtk-compat.h"
#define E_IMAGE_CHOOSER_GET_PRIVATE(obj) \
diff --git a/widgets/misc/e-import-assistant.c b/widgets/misc/e-import-assistant.c
index 896e1fffa7..6a1e1f4787 100644
--- a/widgets/misc/e-import-assistant.c
+++ b/widgets/misc/e-import-assistant.c
@@ -33,6 +33,9 @@
#include <e-util/e-extensible.h>
#include <e-util/e-util-private.h>
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define E_IMPORT_ASSISTANT_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_IMPORT_ASSISTANT, EImportAssistantPrivate))
@@ -1166,7 +1169,7 @@ import_assistant_key_press_event (GtkWidget *widget,
{
GtkWidgetClass *parent_class;
- if (event->keyval == GDK_Escape) {
+ if (event->keyval == GDK_KEY_Escape) {
g_signal_emit_by_name (widget, "cancel");
return TRUE;
}
diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c
index 62e3571984..9167e85a86 100644
--- a/widgets/misc/e-map.c
+++ b/widgets/misc/e-map.c
@@ -33,6 +33,9 @@
#include "e-map.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
/* Scroll step increment */
#define SCROLL_STEP_SIZE 32
@@ -473,25 +476,25 @@ e_map_key_press (GtkWidget *widget, GdkEventKey *event)
switch (event->keyval)
{
- case GDK_Up:
+ case GDK_KEY_Up:
do_scroll = TRUE;
xofs = 0;
yofs = -SCROLL_STEP_SIZE;
break;
- case GDK_Down:
+ case GDK_KEY_Down:
do_scroll = TRUE;
xofs = 0;
yofs = SCROLL_STEP_SIZE;
break;
- case GDK_Left:
+ case GDK_KEY_Left:
do_scroll = TRUE;
xofs = -SCROLL_STEP_SIZE;
yofs = 0;
break;
- case GDK_Right:
+ case GDK_KEY_Right:
do_scroll = TRUE;
xofs = SCROLL_STEP_SIZE;
yofs = 0;
diff --git a/widgets/misc/e-preferences-window.c b/widgets/misc/e-preferences-window.c
index 5e9a28ede8..20f1c7a068 100644
--- a/widgets/misc/e-preferences-window.c
+++ b/widgets/misc/e-preferences-window.c
@@ -25,6 +25,9 @@
#include <gdk/gdkkeysyms.h>
#include <e-util/e-util.h>
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define SWITCH_PAGE_INTERVAL 250
#define E_PREFERENCES_WINDOW_GET_PRIVATE(obj) \
@@ -353,7 +356,7 @@ e_preferences_window_init (EPreferencesWindow *window)
accel_group = gtk_accel_group_new ();
gtk_widget_add_accelerator (
widget, "activate", accel_group,
- GDK_Escape, (GdkModifierType) 0,
+ GDK_KEY_Escape, (GdkModifierType) 0,
GTK_ACCEL_VISIBLE);
gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
gtk_widget_grab_default (widget);
diff --git a/widgets/misc/e-preview-pane.c b/widgets/misc/e-preview-pane.c
index 973de3bdb0..bbbb94f81b 100644
--- a/widgets/misc/e-preview-pane.c
+++ b/widgets/misc/e-preview-pane.c
@@ -23,6 +23,9 @@
#include <gdk/gdkkeysyms.h>
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define E_PREVIEW_PANE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_PREVIEW_PANE, EPreviewPanePrivate))
@@ -205,7 +208,7 @@ e_preview_pane_class_init (EPreviewPaneClass *class)
binding_set = gtk_binding_set_by_class (class);
gtk_binding_entry_add_signal (
- binding_set, GDK_f, GDK_SHIFT_MASK | GDK_CONTROL_MASK,
+ binding_set, GDK_KEY_f, GDK_SHIFT_MASK | GDK_CONTROL_MASK,
"show-search-bar", 0);
}
diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c
index c0b2d43e97..9846576a5e 100644
--- a/widgets/misc/e-search-bar.c
+++ b/widgets/misc/e-search-bar.c
@@ -27,6 +27,9 @@
#include "e-util/e-binding.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define E_SEARCH_BAR_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_SEARCH_BAR, ESearchBarPrivate))
@@ -416,7 +419,7 @@ search_bar_key_press_event (GtkWidget *widget,
{
GtkWidgetClass *widget_class;
- if (event->keyval == GDK_Escape) {
+ if (event->keyval == GDK_KEY_Escape) {
gtk_widget_hide (widget);
return TRUE;
}
diff --git a/widgets/misc/e-selection-model.c b/widgets/misc/e-selection-model.c
index f1b2c9bbf1..44a22d6eb3 100644
--- a/widgets/misc/e-selection-model.c
+++ b/widgets/misc/e-selection-model.c
@@ -29,6 +29,9 @@
#include "e-selection-model.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
G_DEFINE_TYPE (
ESelectionModel,
e_selection_model,
@@ -704,14 +707,14 @@ e_selection_model_key_press (ESelectionModel *selection,
selection->old_selection = -1;
switch (key->keyval) {
- case GDK_Up:
- case GDK_KP_Up:
+ case GDK_KEY_Up:
+ case GDK_KEY_KP_Up:
return move_selection (selection, TRUE, key->state);
- case GDK_Down:
- case GDK_KP_Down:
+ case GDK_KEY_Down:
+ case GDK_KEY_KP_Down:
return move_selection (selection, FALSE, key->state);
- case GDK_space:
- case GDK_KP_Space:
+ case GDK_KEY_space:
+ case GDK_KEY_KP_Space:
if (selection->mode != GTK_SELECTION_SINGLE) {
gint row = e_selection_model_cursor_row (selection);
gint col = e_selection_model_cursor_col (selection);
@@ -725,8 +728,8 @@ e_selection_model_key_press (ESelectionModel *selection,
return TRUE;
}
break;
- case GDK_Return:
- case GDK_KP_Enter:
+ case GDK_KEY_Return:
+ case GDK_KEY_KP_Enter:
if (selection->mode != GTK_SELECTION_SINGLE) {
gint row = e_selection_model_cursor_row (selection);
gint col = e_selection_model_cursor_col (selection);
@@ -737,8 +740,8 @@ e_selection_model_key_press (ESelectionModel *selection,
return TRUE;
}
break;
- case GDK_Home:
- case GDK_KP_Home:
+ case GDK_KEY_Home:
+ case GDK_KEY_KP_Home:
if (selection->cursor_mode == E_CURSOR_LINE) {
gint row = 0;
gint cursor_col = e_selection_model_cursor_col (selection);
@@ -748,8 +751,8 @@ e_selection_model_key_press (ESelectionModel *selection,
return TRUE;
}
break;
- case GDK_End:
- case GDK_KP_End:
+ case GDK_KEY_End:
+ case GDK_KEY_KP_End:
if (selection->cursor_mode == E_CURSOR_LINE) {
gint row = e_selection_model_row_count (selection) - 1;
gint cursor_col = e_selection_model_cursor_col (selection);
diff --git a/widgets/misc/e-signature-manager.c b/widgets/misc/e-signature-manager.c
index e9a04b8641..d6d021cd3d 100644
--- a/widgets/misc/e-signature-manager.c
+++ b/widgets/misc/e-signature-manager.c
@@ -28,6 +28,9 @@
#include "e-signature-tree-view.h"
#include "e-signature-script-dialog.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define E_SIGNATURE_MANAGER_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_SIGNATURE_MANAGER, ESignatureManagerPrivate))
@@ -81,7 +84,7 @@ static gboolean
signature_manager_key_press_event_cb (ESignatureManager *manager,
GdkEventKey *event)
{
- if (event->keyval == GDK_Delete) {
+ if (event->keyval == GDK_KEY_Delete) {
e_signature_manager_remove_signature (manager);
return TRUE;
}
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);
diff --git a/widgets/table/e-cell-date-edit.c b/widgets/table/e-cell-date-edit.c
index 4080172058..73a5d946b2 100644
--- a/widgets/table/e-cell-date-edit.c
+++ b/widgets/table/e-cell-date-edit.c
@@ -48,6 +48,9 @@
/* This depends on ECalendar which is why I didn't put it in gal. */
#include <misc/e-calendar.h>
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
static void e_cell_date_edit_get_property (GObject *object,
guint property_id,
GValue *value,
@@ -726,7 +729,7 @@ e_cell_date_edit_key_press (GtkWidget *popup_window,
ECellDateEdit *ecde)
{
/* If the Escape key is pressed we hide the popup. */
- if (event->keyval != GDK_Escape)
+ if (event->keyval != GDK_KEY_Escape)
return FALSE;
e_cell_date_edit_hide_popup (ecde);
diff --git a/widgets/table/e-cell-popup.c b/widgets/table/e-cell-popup.c
index e918e7fcc2..5b98a205f2 100644
--- a/widgets/table/e-cell-popup.c
+++ b/widgets/table/e-cell-popup.c
@@ -41,6 +41,9 @@
#include "e-table-item.h"
#include <gtk/gtk.h>
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define E_CELL_POPUP_ARROW_WIDTH 16
#define E_CELL_POPUP_ARROW_XPAD 3
#define E_CELL_POPUP_ARROW_YPAD 3
@@ -340,7 +343,7 @@ ecp_event (ECellView *ecv, GdkEvent *event, gint model_col, gint view_col,
case GDK_KEY_PRESS:
if (e_table_model_is_cell_editable (ecv->e_table_model, model_col, row) &&
event->key.state & GDK_MOD1_MASK
- && event->key.keyval == GDK_Down) {
+ && event->key.keyval == GDK_KEY_Down) {
return e_cell_popup_do_popup (ecp_view, event, row, view_col);
}
break;
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index 51188aa101..011e334b21 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -54,11 +54,14 @@
#include "e-util/e-util.h"
#include "misc/e-canvas.h"
#include "e-util/e-unicode.h"
-#include "e-util/gtk-compat.h"
#include "e-table.h"
#include "e-cell-text.h"
#include "e-table-item.h"
+
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define d(x)
#define DO_SELECTION 1
#define VIEW_TO_CELL(view) E_CELL_TEXT (((ECellView *)view)->ecell)
@@ -974,7 +977,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col
return 1;
}
- if (event->key.keyval == GDK_Escape) {
+ if (event->key.keyval == GDK_KEY_Escape) {
/* if not changed, then pass this even to parent */
return_val = text_view->edit != NULL && text_view->edit->text && text_view->edit->old_text && 0 != strcmp (text_view->edit->text, text_view->edit->old_text);
ect_cancel_edit (text_view);
@@ -992,7 +995,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col
if (edit_display) {
GdkEventKey key = event->key;
if (key.type == GDK_KEY_PRESS &&
- (key.keyval == GDK_KP_Enter || key.keyval == GDK_Return)) {
+ (key.keyval == GDK_KEY_KP_Enter || key.keyval == GDK_KEY_Return)) {
/* stop editing when it's only GDK_KEY_PRESS event */
e_table_item_leave_edit_ (text_view->cell_view.e_table_item_view);
} else {
diff --git a/widgets/table/e-cell-toggle.c b/widgets/table/e-cell-toggle.c
index 35e06fbe79..2ae69c2ba4 100644
--- a/widgets/table/e-cell-toggle.c
+++ b/widgets/table/e-cell-toggle.c
@@ -38,6 +38,9 @@
#include "e-cell-toggle.h"
#include "e-table-item.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define E_CELL_TOGGLE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_CELL_TOGGLE, ECellTogglePrivate))
@@ -271,7 +274,7 @@ cell_toggle_event (ECellView *ecell_view,
switch (event->type) {
case GDK_KEY_PRESS:
- if (event->key.keyval != GDK_space)
+ if (event->key.keyval != GDK_KEY_space)
return FALSE;
/* Fall through */
case GDK_BUTTON_PRESS:
diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c
index 3d5a374382..ca564cbbcd 100644
--- a/widgets/table/e-table-click-to-add.c
+++ b/widgets/table/e-table-click-to-add.c
@@ -41,6 +41,9 @@
#include "e-table-header.h"
#include "e-table-one.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
enum {
CURSOR_CHANGE,
STYLE_SET,
@@ -330,10 +333,10 @@ item_key_press (ETableItem *item,
ETableClickToAdd *etcta)
{
switch (event->key.keyval) {
- case GDK_Return:
- case GDK_KP_Enter:
- case GDK_ISO_Enter:
- case GDK_3270_Enter:
+ case GDK_KEY_Return:
+ case GDK_KEY_KP_Enter:
+ case GDK_KEY_ISO_Enter:
+ case GDK_KEY_3270_Enter:
finish_editing (etcta);
return TRUE;
}
@@ -436,14 +439,14 @@ etcta_event (GnomeCanvasItem *item, GdkEvent *e)
case GDK_KEY_PRESS:
switch (e->key.keyval) {
- case GDK_Tab:
- case GDK_KP_Tab:
- case GDK_ISO_Left_Tab:
+ case GDK_KEY_Tab:
+ case GDK_KEY_KP_Tab:
+ case GDK_KEY_ISO_Left_Tab:
finish_editing (etcta);
break;
default:
return FALSE;
- case GDK_Escape:
+ case GDK_KEY_Escape:
if (etcta->row) {
e_table_item_leave_edit (E_TABLE_ITEM (etcta->row));
etcta_drop_one (etcta);
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index ba6ddf9476..a2b7be785c 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -39,6 +39,9 @@
#include "e-table-item.h"
#include "e-table-sorting-utils.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define TITLE_HEIGHT 16
/* workaround for avoiding API breakage */
@@ -212,37 +215,37 @@ etgc_event (GnomeCanvasItem *item, GdkEvent *event)
switch (event->type) {
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) {
change_focus = TRUE;
use_col = TRUE;
start_col = (event->key.state & GDK_SHIFT_MASK) ? -1 : 0;
direction = (event->key.state & GDK_SHIFT_MASK) ? E_FOCUS_END : E_FOCUS_START;
- } else if (event->key.keyval == GDK_Left ||
- event->key.keyval == GDK_KP_Left) {
+ } else if (event->key.keyval == GDK_KEY_Left ||
+ event->key.keyval == GDK_KEY_KP_Left) {
change_focus = TRUE;
use_col = TRUE;
start_col = -1;
direction = E_FOCUS_END;
- } else if (event->key.keyval == GDK_Right ||
- event->key.keyval == GDK_KP_Right) {
+ } else if (event->key.keyval == GDK_KEY_Right ||
+ event->key.keyval == GDK_KEY_KP_Right) {
change_focus = TRUE;
use_col = TRUE;
start_col = 0;
direction = E_FOCUS_START;
- } else if (event->key.keyval == GDK_Down ||
- event->key.keyval == GDK_KP_Down) {
+ } else if (event->key.keyval == GDK_KEY_Down ||
+ event->key.keyval == GDK_KEY_KP_Down) {
change_focus = TRUE;
use_col = FALSE;
direction = E_FOCUS_START;
- } else if (event->key.keyval == GDK_Up ||
- event->key.keyval == GDK_KP_Up) {
+ } else if (event->key.keyval == GDK_KEY_Up ||
+ event->key.keyval == GDK_KEY_KP_Up) {
change_focus = TRUE;
use_col = FALSE;
direction = E_FOCUS_END;
- } 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) {
change_focus = TRUE;
use_col = FALSE;
direction = E_FOCUS_START;
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index 14597c943b..a550bbdda5 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -37,7 +37,6 @@
#include <glib/gi18n.h>
#include "e-util/e-util.h"
#include "e-util/e-xml-utils.h"
-#include "e-util/gtk-compat.h"
#include "misc/e-canvas.h"
#include "misc/e-popup-menu.h"
@@ -56,6 +55,9 @@
#include "arrow-up.xpm"
#include "arrow-down.xpm"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
enum {
BUTTON_PRESSED,
LAST_SIGNAL
@@ -1939,7 +1941,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
break;
}
case GDK_KEY_PRESS:
- if ((e->key.keyval == GDK_F10) && (e->key.state & GDK_SHIFT_MASK)) {
+ if ((e->key.keyval == GDK_KEY_F10) && (e->key.state & GDK_SHIFT_MASK)) {
EthiHeaderInfo *info = g_new (EthiHeaderInfo, 1);
ETableCol *ecol;
GtkMenu *popup;
@@ -1962,12 +1964,12 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
GTK_MENU (popup),
NULL, NULL, NULL, NULL,
0, GDK_CURRENT_TIME);
- } else if (e->key.keyval == GDK_space) {
+ } else if (e->key.keyval == GDK_KEY_space) {
ETableCol *ecol;
ecol = e_table_header_get_column (ethi->eth, ethi->selected_col);
ethi_change_sort_state (ethi, ecol);
- } else if ((e->key.keyval == GDK_Right) || (e->key.keyval == GDK_KP_Right)) {
+ } else if ((e->key.keyval == GDK_KEY_Right) || (e->key.keyval == GDK_KEY_KP_Right)) {
ETableCol *ecol;
if ((ethi->selected_col < 0) || (ethi->selected_col >= ethi->eth->col_count - 1))
@@ -1976,7 +1978,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
ethi->selected_col++;
ecol = e_table_header_get_column (ethi->eth, ethi->selected_col);
ethi_change_sort_state (ethi, ecol);
- } else if ((e->key.keyval == GDK_Left) || (e->key.keyval == GDK_KP_Left)) {
+ } else if ((e->key.keyval == GDK_KEY_Left) || (e->key.keyval == GDK_KEY_KP_Left)) {
ETableCol *ecol;
if ((ethi->selected_col <= 0) || (ethi->selected_col >= ethi->eth->col_count))
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index 48c51d8f75..390c207727 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -48,6 +48,9 @@
#include "e-table-item.h"
#include "e-table-subset.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
/* workaround for avoiding API breakage */
#define eti_get_type e_table_item_get_type
G_DEFINE_TYPE (ETableItem, eti, GNOME_TYPE_CANVAS_ITEM)
@@ -2524,8 +2527,8 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
eti->in_key_press = TRUE;
switch (e->key.keyval) {
- case GDK_Left:
- case GDK_KP_Left:
+ case GDK_KEY_Left:
+ case GDK_KEY_KP_Left:
if (eti_editing (eti)) {
handled = FALSE;
break;
@@ -2540,8 +2543,8 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
return_val = 1;
break;
- case GDK_Right:
- case GDK_KP_Right:
+ case GDK_KEY_Right:
+ case GDK_KEY_KP_Right:
if (eti_editing (eti)) {
handled = FALSE;
break;
@@ -2556,12 +2559,12 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
return_val = 1;
break;
- case GDK_Up:
- case GDK_KP_Up:
- case GDK_Down:
- case GDK_KP_Down:
+ case GDK_KEY_Up:
+ case GDK_KEY_KP_Up:
+ case GDK_KEY_Down:
+ case GDK_KEY_KP_Down:
if ((e->key.state & GDK_MOD1_MASK)
- && ((e->key.keyval == GDK_Down ) || (e->key.keyval == GDK_KP_Down))) {
+ && ((e->key.keyval == GDK_KEY_Down ) || (e->key.keyval == GDK_KEY_KP_Down))) {
gint view_col = model_to_view_col (eti, cursor_col);
if ((view_col >= 0) && (view_col < eti->cols))
@@ -2570,8 +2573,8 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
} else
return_val = e_selection_model_key_press (E_SELECTION_MODEL (eti->selection), (GdkEventKey *) e);
break;
- case GDK_Home:
- case GDK_KP_Home:
+ case GDK_KEY_Home:
+ case GDK_KEY_KP_Home:
if (eti_editing (eti)) {
handled = FALSE;
break;
@@ -2583,8 +2586,8 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
} else
return_val = e_selection_model_key_press (E_SELECTION_MODEL (eti->selection), (GdkEventKey *) e);
break;
- case GDK_End:
- case GDK_KP_End:
+ case GDK_KEY_End:
+ case GDK_KEY_KP_End:
if (eti_editing (eti)) {
handled = FALSE;
break;
@@ -2596,9 +2599,9 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
} else
return_val = e_selection_model_key_press (E_SELECTION_MODEL (eti->selection), (GdkEventKey *) e);
break;
- case GDK_Tab:
- case GDK_KP_Tab:
- case GDK_ISO_Left_Tab:
+ case GDK_KEY_Tab:
+ case GDK_KEY_KP_Tab:
+ case GDK_KEY_ISO_Left_Tab:
if ((e->key.state & GDK_CONTROL_MASK) != 0) {
return_val = FALSE;
break;
@@ -2636,10 +2639,10 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
break;
}
- case GDK_Return:
- case GDK_KP_Enter:
- case GDK_ISO_Enter:
- case GDK_3270_Enter:
+ case GDK_KEY_Return:
+ case GDK_KEY_KP_Enter:
+ case GDK_KEY_ISO_Enter:
+ case GDK_KEY_3270_Enter:
if (eti_editing (eti)) {
ecell_view = eti->cell_views[eti->editing_col];
return_val = eti_e_cell_event (eti, ecell_view, e, e->key.time,
@@ -2661,23 +2664,23 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
if (!handled) {
switch (e->key.keyval) {
- case GDK_Scroll_Lock:
- case GDK_Sys_Req:
- case GDK_Shift_L:
- case GDK_Shift_R:
- case GDK_Control_L:
- case GDK_Control_R:
- case GDK_Caps_Lock:
- case GDK_Shift_Lock:
- case GDK_Meta_L:
- case GDK_Meta_R:
- case GDK_Alt_L:
- case GDK_Alt_R:
- case GDK_Super_L:
- case GDK_Super_R:
- case GDK_Hyper_L:
- case GDK_Hyper_R:
- case GDK_ISO_Lock:
+ case GDK_KEY_Scroll_Lock:
+ case GDK_KEY_Sys_Req:
+ case GDK_KEY_Shift_L:
+ case GDK_KEY_Shift_R:
+ case GDK_KEY_Control_L:
+ case GDK_KEY_Control_R:
+ case GDK_KEY_Caps_Lock:
+ case GDK_KEY_Shift_Lock:
+ case GDK_KEY_Meta_L:
+ case GDK_KEY_Meta_R:
+ case GDK_KEY_Alt_L:
+ case GDK_KEY_Alt_R:
+ case GDK_KEY_Super_L:
+ case GDK_KEY_Super_R:
+ case GDK_KEY_Hyper_L:
+ case GDK_KEY_Hyper_R:
+ case GDK_KEY_ISO_Lock:
break;
default:
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 254ea47046..23640b2d9f 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -53,6 +53,9 @@
#include "e-table-subset.h"
#include "e-table-utils.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define COLUMN_HEADER_HEIGHT 16
#define d(x)
@@ -845,8 +848,8 @@ group_key_press (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *
adjustment = gtk_layout_get_vadjustment (layout);
switch (key->keyval) {
- case GDK_Page_Down:
- case GDK_KP_Page_Down:
+ case GDK_KEY_Page_Down:
+ case GDK_KEY_KP_Page_Down:
page_size = gtk_adjustment_get_page_size (adjustment);
upper = gtk_adjustment_get_value (adjustment);
value = gtk_adjustment_get_value (adjustment);
@@ -865,8 +868,8 @@ group_key_press (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *
row_local, col_local, key->state);
return_val = 1;
break;
- case GDK_Page_Up:
- case GDK_KP_Page_Up:
+ case GDK_KEY_Page_Up:
+ case GDK_KEY_KP_Page_Up:
page_size = gtk_adjustment_get_page_size (adjustment);
upper = gtk_adjustment_get_upper (adjustment);
value = gtk_adjustment_get_value (adjustment);
@@ -885,7 +888,7 @@ group_key_press (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *
row_local, col_local, key->state);
return_val = 1;
break;
- case GDK_BackSpace:
+ case GDK_KEY_BackSpace:
init_search (et);
if (e_table_search_backspace (et->search))
return TRUE;
@@ -895,9 +898,9 @@ group_key_press (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *
if ((key->state & ~(GDK_SHIFT_MASK | GDK_LOCK_MASK |
GDK_MOD1_MASK | GDK_MOD2_MASK | GDK_MOD3_MASK |
GDK_MOD4_MASK | GDK_MOD5_MASK)) == 0
- && ((key->keyval >= GDK_a && key->keyval <= GDK_z) ||
- (key->keyval >= GDK_A && key->keyval <= GDK_Z) ||
- (key->keyval >= GDK_0 && key->keyval <= GDK_9)))
+ && ((key->keyval >= GDK_KEY_a && key->keyval <= GDK_KEY_z) ||
+ (key->keyval >= GDK_KEY_A && key->keyval <= GDK_KEY_Z) ||
+ (key->keyval >= GDK_KEY_0 && key->keyval <= GDK_KEY_9)))
e_table_search_input_character (et->search, key->keyval);
g_signal_emit (G_OBJECT (et), et_signals[KEY_PRESS], 0,
row, col, event, &return_val);
@@ -1223,9 +1226,9 @@ canvas_vbox_event (ECanvasVbox *vbox, GdkEventKey *key, ETable *etable)
return FALSE;
}
switch (key->keyval) {
- case GDK_Tab:
- case GDK_KP_Tab:
- case GDK_ISO_Left_Tab:
+ case GDK_KEY_Tab:
+ case GDK_KEY_KP_Tab:
+ case GDK_KEY_ISO_Left_Tab:
if ((key->state & GDK_CONTROL_MASK) && etable->click_to_add) {
gnome_canvas_item_grab_focus (etable->click_to_add);
break;
@@ -1245,9 +1248,9 @@ click_to_add_event (ETableClickToAdd *etcta, GdkEventKey *key, ETable *etable)
return FALSE;
}
switch (key->keyval) {
- case GDK_Tab:
- case GDK_KP_Tab:
- case GDK_ISO_Left_Tab:
+ case GDK_KEY_Tab:
+ case GDK_KEY_KP_Tab:
+ case GDK_KEY_ISO_Left_Tab:
if (key->state & GDK_CONTROL_MASK) {
if (etable->group) {
if (e_table_model_row_count (etable->model) > 0)
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index be1f8937a6..b85475248a 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -52,6 +52,9 @@
#include "e-tree.h"
#include "e-tree-table-adapter.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define COLUMN_HEADER_HEIGHT 16
#define d(x)
@@ -938,8 +941,8 @@ item_key_press (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
value = gtk_adjustment_get_value (adjustment);
switch (key->keyval) {
- case GDK_Page_Down:
- case GDK_KP_Page_Down:
+ case GDK_KEY_Page_Down:
+ case GDK_KEY_KP_Page_Down:
y = CLAMP (value + (2 * page_size - 50), 0, upper);
y -= value;
e_tree_get_cell_at (et, 30, y, &row_local, &col_local);
@@ -956,8 +959,8 @@ item_key_press (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
return_val = 1;
break;
- case GDK_Page_Up:
- case GDK_KP_Page_Up:
+ case GDK_KEY_Page_Up:
+ case GDK_KEY_KP_Page_Up:
y = CLAMP (value - (page_size - 50), 0, upper);
y -= value;
e_tree_get_cell_at (et, 30, y, &row_local, &col_local);
@@ -974,10 +977,10 @@ item_key_press (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
return_val = 1;
break;
- case GDK_plus:
- case GDK_KP_Add:
- case GDK_Right:
- case GDK_KP_Right:
+ case GDK_KEY_plus:
+ case GDK_KEY_KP_Add:
+ case GDK_KEY_Right:
+ case GDK_KEY_KP_Right:
/* Only allow if the Shift modifier is used.
* eg. Ctrl-Equal shouldn't be handled. */
if ((key->state & (GDK_SHIFT_MASK | GDK_LOCK_MASK |
@@ -990,10 +993,10 @@ item_key_press (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
}
return_val = 1;
break;
- case GDK_underscore:
- case GDK_KP_Subtract:
- case GDK_Left:
- case GDK_KP_Left:
+ case GDK_KEY_underscore:
+ case GDK_KEY_KP_Subtract:
+ case GDK_KEY_Left:
+ case GDK_KEY_KP_Left:
/* Only allow if the Shift modifier is used.
* eg. Ctrl-Minus shouldn't be handled. */
if ((key->state & (GDK_SHIFT_MASK | GDK_LOCK_MASK |
@@ -1006,7 +1009,7 @@ item_key_press (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
}
return_val = 1;
break;
- case GDK_BackSpace:
+ case GDK_KEY_BackSpace:
if (e_table_search_backspace (et->priv->search))
return TRUE;
/* Fallthrough */
@@ -1014,9 +1017,9 @@ item_key_press (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
if ((key->state & ~(GDK_SHIFT_MASK | GDK_LOCK_MASK |
GDK_MOD1_MASK | GDK_MOD2_MASK | GDK_MOD3_MASK |
GDK_MOD4_MASK | GDK_MOD5_MASK)) == 0
- && ((key->keyval >= GDK_a && key->keyval <= GDK_z) ||
- (key->keyval >= GDK_A && key->keyval <= GDK_Z) ||
- (key->keyval >= GDK_0 && key->keyval <= GDK_9))) {
+ && ((key->keyval >= GDK_KEY_a && key->keyval <= GDK_KEY_z) ||
+ (key->keyval >= GDK_KEY_A && key->keyval <= GDK_KEY_Z) ||
+ (key->keyval >= GDK_KEY_0 && key->keyval <= GDK_KEY_9))) {
e_table_search_input_character (et->priv->search, key->keyval);
}
path = e_tree_table_adapter_node_at_row (et->priv->etta, row);
diff --git a/widgets/table/gal-a11y-e-cell-popup.c b/widgets/table/gal-a11y-e-cell-popup.c
index 755325d4f3..92ee3a8322 100644
--- a/widgets/table/gal-a11y-e-cell-popup.c
+++ b/widgets/table/gal-a11y-e-cell-popup.c
@@ -32,6 +32,9 @@
#include "gal-a11y-e-cell-popup.h"
#include "gal-a11y-e-cell-registry.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
static AtkObjectClass *parent_class = NULL;
#define PARENT_TYPE (gal_a11y_e_cell_get_type ())
@@ -142,7 +145,7 @@ popup_cell_action (GalA11yECell *cell)
event.key.send_event = TRUE;
event.key.time = GDK_CURRENT_TIME;
event.key.state = GDK_MOD1_MASK;
- event.key.keyval = GDK_Down;
+ event.key.keyval = GDK_KEY_Down;
g_signal_emit_by_name (cell->item, "event", &event, &finished);
}
diff --git a/widgets/table/gal-a11y-e-table.c b/widgets/table/gal-a11y-e-table.c
index 6c68842415..1bf522767b 100644
--- a/widgets/table/gal-a11y-e-table.c
+++ b/widgets/table/gal-a11y-e-table.c
@@ -22,8 +22,6 @@
#include <config.h>
-#include "e-util/gtk-compat.h"
-
#include "a11y/gal-a11y-util.h"
#include "table/e-table.h"
#include "table/e-table-click-to-add.h"
@@ -35,6 +33,9 @@
#include "gal-a11y-e-table-factory.h"
#include "gal-a11y-e-table-item.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yETableClass))
static AtkObjectClass *parent_class;
static GType parent_type;
diff --git a/widgets/table/gal-a11y-e-tree.c b/widgets/table/gal-a11y-e-tree.c
index c65ed543c8..87dc8f1618 100644
--- a/widgets/table/gal-a11y-e-tree.c
+++ b/widgets/table/gal-a11y-e-tree.c
@@ -22,8 +22,6 @@
#include <config.h>
-#include "e-util/gtk-compat.h"
-
#include "a11y/gal-a11y-util.h"
#include "table/e-table-item.h"
#include "table/e-tree.h"
@@ -32,6 +30,9 @@
#include "gal-a11y-e-tree.h"
#include "gal-a11y-e-tree-factory.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yETreeClass))
static AtkObjectClass *parent_class;
static GType parent_type;
diff --git a/widgets/text/e-reflow.c b/widgets/text/e-reflow.c
index 7a0f7ad121..99b35f9225 100644
--- a/widgets/text/e-reflow.c
+++ b/widgets/text/e-reflow.c
@@ -927,7 +927,7 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event)
break;
#if 0
if (event->key.keyval == GDK_Tab ||
- event->key.keyval == GDK_KP_Tab ||
+ event->key.keyval == GDK_KEY_KP_Tab ||
event->key.keyval == GDK_ISO_Left_Tab) {
gint i;
gint count;
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index 979cae72e0..67e29a84be 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -53,10 +53,12 @@
#include <glib/gi18n.h>
#include "e-util/e-text-event-processor-emacs-like.h"
#include "e-util/e-util.h"
-#include "e-util/gtk-compat.h"
#include "e-text.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
G_DEFINE_TYPE (EText, e_text, GNOME_TYPE_CANVAS_ITEM)
#define BORDER_INDENT 3
@@ -2113,7 +2115,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
/* Handle S-F10 key binding here. */
- if (event->key.keyval == GDK_F10
+ if (event->key.keyval == GDK_KEY_F10
&& (event->key.state & GDK_SHIFT_MASK)
&& text->handle_popup ) {