diff options
Diffstat (limited to 'widgets/misc')
-rw-r--r-- | widgets/misc/e-account-manager.c | 5 | ||||
-rw-r--r-- | widgets/misc/e-attachment-view.c | 6 | ||||
-rw-r--r-- | widgets/misc/e-buffer-tagger.c | 11 | ||||
-rw-r--r-- | widgets/misc/e-calendar-item.c | 15 | ||||
-rw-r--r-- | widgets/misc/e-canvas-vbox.c | 23 | ||||
-rw-r--r-- | widgets/misc/e-combo-cell-editable.c | 13 | ||||
-rw-r--r-- | widgets/misc/e-dateedit.c | 19 | ||||
-rw-r--r-- | widgets/misc/e-image-chooser.c | 2 | ||||
-rw-r--r-- | widgets/misc/e-import-assistant.c | 5 | ||||
-rw-r--r-- | widgets/misc/e-map.c | 11 | ||||
-rw-r--r-- | widgets/misc/e-preferences-window.c | 5 | ||||
-rw-r--r-- | widgets/misc/e-preview-pane.c | 5 | ||||
-rw-r--r-- | widgets/misc/e-search-bar.c | 5 | ||||
-rw-r--r-- | widgets/misc/e-selection-model.c | 27 | ||||
-rw-r--r-- | widgets/misc/e-signature-manager.c | 5 |
15 files changed, 100 insertions, 57 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; } |