aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
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 /calendar/gui
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 'calendar/gui')
-rw-r--r--calendar/gui/dialogs/comp-editor.c5
-rw-r--r--calendar/gui/dialogs/event-page.c7
-rw-r--r--calendar/gui/dialogs/task-page.c7
-rw-r--r--calendar/gui/e-calendar-view.c5
-rw-r--r--calendar/gui/e-day-view-main-item.c1
-rw-r--r--calendar/gui/e-day-view.c53
-rw-r--r--calendar/gui/e-week-view-event-item.c1
-rw-r--r--calendar/gui/e-week-view.c37
-rw-r--r--calendar/gui/ea-cal-view.c1
-rw-r--r--calendar/gui/ea-day-view.c1
-rw-r--r--calendar/gui/ea-gnome-calendar.c1
-rw-r--r--calendar/gui/ea-week-view.c1
-rw-r--r--calendar/gui/gnome-cal.c37
-rw-r--r--calendar/gui/weekday-picker.c15
14 files changed, 100 insertions, 72 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 69cb2f2479..6c3179cf2c 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -59,6 +59,9 @@
#include "e-util/e-alert-dialog.h"
#include "e-util/e-ui-manager.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define COMP_EDITOR_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), TYPE_COMP_EDITOR, CompEditorPrivate))
@@ -1456,7 +1459,7 @@ comp_editor_key_press_event (GtkWidget *widget,
editor = COMP_EDITOR (widget);
- if (event->keyval == GDK_Escape) {
+ if (event->keyval == GDK_KEY_Escape) {
commit_all_fields (editor);
if (prompt_and_save_changes (editor, TRUE))
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index e4e034fd16..bcbaf7cc3a 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -59,6 +59,9 @@
#include "event-page.h"
#include "e-send-options-utils.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define EVENT_PAGE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), TYPE_EVENT_PAGE, EventPagePrivate))
@@ -1996,12 +1999,12 @@ list_view_event (EMeetingListView *list_view, GdkEvent *event, EventPage *epage)
static gboolean
list_key_press (EMeetingListView *list_view, GdkEventKey *event, EventPage *epage)
{
- if (event->keyval == GDK_Delete) {
+ if (event->keyval == GDK_KEY_Delete) {
remove_clicked_cb (NULL, epage);
return TRUE;
- } else if (event->keyval == GDK_Insert) {
+ } else if (event->keyval == GDK_KEY_Insert) {
add_clicked_cb (NULL, epage);
return TRUE;
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index 7777f23dd0..0596d0d12c 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -55,6 +55,9 @@
#include "../e-meeting-store.h"
#include "../e-meeting-list-view.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define TASK_PAGE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), TYPE_TASK_PAGE, TaskPagePrivate))
@@ -1288,12 +1291,12 @@ list_view_event (EMeetingListView *list_view, GdkEvent *event, TaskPage *page) {
static gboolean
list_key_press (EMeetingListView *list_view, GdkEventKey *event, TaskPage *page)
{
- if (event->keyval == GDK_Delete) {
+ if (event->keyval == GDK_KEY_Delete) {
remove_clicked_cb (NULL, page);
return TRUE;
- } else if (event->keyval == GDK_Insert) {
+ } else if (event->keyval == GDK_KEY_Insert) {
add_clicked_cb (NULL, page);
return TRUE;
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 4555ef9a81..5b047999cf 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -62,6 +62,9 @@
#include "goto.h"
#include "misc.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define E_CALENDAR_VIEW_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_CALENDAR_VIEW, ECalendarViewPrivate))
@@ -875,7 +878,7 @@ e_calendar_view_class_init (ECalendarViewClass *class)
binding_set = gtk_binding_set_by_class (class);
gtk_binding_entry_add_signal (
- binding_set, GDK_o, GDK_CONTROL_MASK, "open-event", 0);
+ binding_set, GDK_KEY_o, GDK_CONTROL_MASK, "open-event", 0);
/* init the accessibility support for e_day_view */
e_cal_view_a11y_init ();
diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c
index 7914fc06b5..148843b397 100644
--- a/calendar/gui/e-day-view-main-item.c
+++ b/calendar/gui/e-day-view-main-item.c
@@ -41,6 +41,7 @@
#include "comp-util.h"
#include "calendar-config.h"
+/* backward-compatibility cruft */
#include "e-util/gtk-compat.h"
#define E_DAY_VIEW_MAIN_ITEM_GET_PRIVATE(obj) \
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index b685210a6e..25527765e1 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -62,6 +62,9 @@
#include "misc.h"
#include <e-util/e-icon-factory.h>
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
/* The minimum amount of space wanted on each side of the date string. */
#define E_DAY_VIEW_DATE_X_PAD 4
@@ -5307,7 +5310,7 @@ e_day_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
/* The Escape key aborts a resize operation. */
if (day_view->resize_drag_pos != E_CALENDAR_VIEW_POS_NONE) {
- if (keyval == GDK_Escape) {
+ if (keyval == GDK_KEY_Escape) {
gdk_pointer_ungrab (event->time);
e_day_view_abort_resize (day_view);
}
@@ -5318,25 +5321,25 @@ e_day_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
if (((event->state & GDK_SHIFT_MASK) != GDK_SHIFT_MASK)
&&((event->state & GDK_CONTROL_MASK) != GDK_CONTROL_MASK)
&&((event->state & GDK_MOD1_MASK) == GDK_MOD1_MASK)) {
- if (keyval == GDK_Up || keyval == GDK_KP_Up)
+ if (keyval == GDK_KEY_Up || keyval == GDK_KEY_KP_Up)
return e_day_view_event_move ((ECalendarView *) day_view, E_CAL_VIEW_MOVE_UP);
- else if (keyval == GDK_Down || keyval == GDK_KP_Down)
+ else if (keyval == GDK_KEY_Down || keyval == GDK_KEY_KP_Down)
return e_day_view_event_move ((ECalendarView *) day_view, E_CAL_VIEW_MOVE_DOWN);
- else if (keyval == GDK_Left || keyval == GDK_KP_Left)
+ else if (keyval == GDK_KEY_Left || keyval == GDK_KEY_KP_Left)
return e_day_view_event_move ((ECalendarView *) day_view, E_CAL_VIEW_MOVE_LEFT);
- else if (keyval == GDK_Right || keyval == GDK_KP_Right)
+ else if (keyval == GDK_KEY_Right || keyval == GDK_KEY_KP_Right)
return e_day_view_event_move ((ECalendarView *) day_view, E_CAL_VIEW_MOVE_RIGHT);
}
/*Go to the start/end of a work day*/
- if ((keyval == GDK_Home)
+ if ((keyval == GDK_KEY_Home)
&&((event->state & GDK_SHIFT_MASK) != GDK_SHIFT_MASK)
&&((event->state & GDK_CONTROL_MASK) != GDK_CONTROL_MASK)
&&((event->state & GDK_MOD1_MASK) != GDK_MOD1_MASK)) {
e_day_view_goto_start_of_work_day (day_view);
return TRUE;
}
- if ((keyval == GDK_End)
+ if ((keyval == GDK_KEY_End)
&&((event->state & GDK_SHIFT_MASK) != GDK_SHIFT_MASK)
&&((event->state & GDK_CONTROL_MASK) != GDK_CONTROL_MASK)
&&((event->state & GDK_MOD1_MASK) != GDK_MOD1_MASK)) {
@@ -5345,14 +5348,14 @@ e_day_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
}
/* In DayView, Shift+Home/End, Change the duration to the time that begins/ends the current work day */
- if ((keyval == GDK_Home)
+ if ((keyval == GDK_KEY_Home)
&&((event->state & GDK_SHIFT_MASK) == GDK_SHIFT_MASK)
&&((event->state & GDK_CONTROL_MASK) != GDK_CONTROL_MASK)
&&((event->state & GDK_MOD1_MASK) != GDK_MOD1_MASK)) {
e_day_view_change_duration_to_start_of_work_day (day_view);
return TRUE;
}
- if ((keyval == GDK_End)
+ if ((keyval == GDK_KEY_End)
&&((event->state & GDK_SHIFT_MASK) == GDK_SHIFT_MASK)
&&((event->state & GDK_CONTROL_MASK) != GDK_CONTROL_MASK)
&&((event->state & GDK_MOD1_MASK) != GDK_MOD1_MASK)) {
@@ -5364,16 +5367,16 @@ e_day_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
stop_emission = TRUE;
if (event->state & GDK_SHIFT_MASK) {
switch (keyval) {
- case GDK_Up:
+ case GDK_KEY_Up:
e_day_view_cursor_key_up_shifted (day_view, event);
break;
- case GDK_Down:
+ case GDK_KEY_Down:
e_day_view_cursor_key_down_shifted (day_view, event);
break;
- case GDK_Left:
+ case GDK_KEY_Left:
e_day_view_cursor_key_left_shifted (day_view, event);
break;
- case GDK_Right:
+ case GDK_KEY_Right:
e_day_view_cursor_key_right_shifted (day_view, event);
break;
default:
@@ -5382,22 +5385,22 @@ e_day_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
}
} else if (!(event->state & GDK_MOD1_MASK)) {
switch (keyval) {
- case GDK_Up:
+ case GDK_KEY_Up:
e_day_view_cursor_key_up (day_view, event);
break;
- case GDK_Down:
+ case GDK_KEY_Down:
e_day_view_cursor_key_down (day_view, event);
break;
- case GDK_Left:
+ case GDK_KEY_Left:
e_day_view_cursor_key_left (day_view, event);
break;
- case GDK_Right:
+ case GDK_KEY_Right:
e_day_view_cursor_key_right (day_view, event);
break;
- case GDK_Page_Up:
+ case GDK_KEY_Page_Up:
e_day_view_scroll (day_view, E_DAY_VIEW_PAGE_STEP);
break;
- case GDK_Page_Down:
+ case GDK_KEY_Page_Down:
e_day_view_scroll (day_view, -E_DAY_VIEW_PAGE_STEP);
break;
default:
@@ -5415,11 +5418,11 @@ e_day_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
/* We only want to start an edit with a return key or a simple
character. */
- if ((keyval != GDK_Return) &&
+ if ((keyval != GDK_KEY_Return) &&
(((keyval >= 0x20) && (keyval <= 0xFF)
&& (event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK)))
|| (event->length == 0)
- || (keyval == GDK_Tab))) {
+ || (keyval == GDK_KEY_Tab))) {
return FALSE;
}
@@ -6285,7 +6288,7 @@ e_day_view_on_text_item_event (GnomeCanvasItem *item,
switch (event->type) {
case GDK_KEY_PRESS:
tooltip_destroy (day_view, item);
- if (!E_TEXT (item)->preedit_len && event && event->key.keyval == GDK_Return) {
+ if (!E_TEXT (item)->preedit_len && event && event->key.keyval == GDK_KEY_Return) {
day_view->resize_event_num = -1;
/* We set the keyboard focus to the EDayView, so the
@@ -6296,19 +6299,19 @@ e_day_view_on_text_item_event (GnomeCanvasItem *item,
other events getting to the EText item. */
g_signal_stop_emission_by_name (item, "event");
return TRUE;
- } else if (event->key.keyval == GDK_Escape) {
+ } else if (event->key.keyval == GDK_KEY_Escape) {
cancel_editing (day_view);
g_signal_stop_emission_by_name (item, "event");
/* focus should go to day view when stop editing */
gtk_widget_grab_focus (GTK_WIDGET (day_view));
return TRUE;
- } else if ((event->key.keyval == GDK_Up)
+ } else if ((event->key.keyval == GDK_KEY_Up)
&& (event->key.state & GDK_SHIFT_MASK)
&& (event->key.state & GDK_CONTROL_MASK)
&& !(event->key.state & GDK_MOD1_MASK)) {
e_day_view_change_event_end_time_up (day_view);
return TRUE;
- } else if ((event->key.keyval == GDK_Down)
+ } else if ((event->key.keyval == GDK_KEY_Down)
&& (event->key.state & GDK_SHIFT_MASK)
&& (event->key.state & GDK_CONTROL_MASK)
&& !(event->key.state & GDK_MOD1_MASK)) {
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index 926bd1fe95..f2b3471e66 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -40,6 +40,7 @@
#include <text/e-text.h>
+/* backward-compatibility cruft */
#include "e-util/gtk-compat.h"
#define E_WEEK_VIEW_EVENT_ITEM_GET_PRIVATE(obj) \
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 83b9fa2d59..9219548c92 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -65,6 +65,9 @@
/* Images */
#include "art/jump.xpm"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define E_WEEK_VIEW_SMALL_FONT_PTSIZE 7
#define E_WEEK_VIEW_JUMP_BUTTON_WIDTH 16
@@ -3497,7 +3500,7 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item,
switch (gdkevent->type) {
case GDK_KEY_PRESS:
tooltip_destroy (week_view, item);
- if (!E_TEXT (item)->preedit_len && gdkevent && gdkevent->key.keyval == GDK_Return) {
+ if (!E_TEXT (item)->preedit_len && gdkevent && gdkevent->key.keyval == GDK_KEY_Return) {
/* We set the keyboard focus to the EDayView, so the
EText item loses it and stops the edit. */
gtk_widget_grab_focus (GTK_WIDGET (week_view));
@@ -3506,7 +3509,7 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item,
other events getting to the EText item. */
g_signal_stop_emission_by_name (GTK_OBJECT (item), "event");
return TRUE;
- } else if (gdkevent->key.keyval == GDK_Escape) {
+ } else if (gdkevent->key.keyval == GDK_KEY_Escape) {
cancel_editing (week_view);
g_signal_stop_emission_by_name (GTK_OBJECT (item), "event");
/* focus should go to week view when stop editing */
@@ -4368,7 +4371,7 @@ e_week_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
/* The Escape key aborts a resize operation. */
#if 0
if (week_view->resize_drag_pos != E_CALENDAR_VIEW_POS_NONE) {
- if (event->keyval == GDK_Escape) {
+ if (event->keyval == GDK_KEY_Escape) {
e_week_view_abort_resize (week_view, event->time);
}
return FALSE;
@@ -4381,28 +4384,28 @@ e_week_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
&& !(event->state & GDK_MOD1_MASK)) {
stop_emission = TRUE;
switch (keyval) {
- case GDK_Page_Up:
+ case GDK_KEY_Page_Up:
if (!week_view->multi_week_view)
e_week_view_scroll_a_step (week_view, E_CAL_VIEW_MOVE_UP);
else
e_week_view_scroll_a_step (week_view, E_CAL_VIEW_MOVE_PAGE_UP);
break;
- case GDK_Page_Down:
+ case GDK_KEY_Page_Down:
if (!week_view->multi_week_view)
e_week_view_scroll_a_step (week_view, E_CAL_VIEW_MOVE_DOWN);
else
e_week_view_scroll_a_step (week_view, E_CAL_VIEW_MOVE_PAGE_DOWN);
break;
- case GDK_Up:
+ case GDK_KEY_Up:
e_week_view_cursor_key_up (week_view);
break;
- case GDK_Down:
+ case GDK_KEY_Down:
e_week_view_cursor_key_down (week_view);
break;
- case GDK_Left:
+ case GDK_KEY_Left:
e_week_view_cursor_key_left (week_view);
break;
- case GDK_Right:
+ case GDK_KEY_Right:
e_week_view_cursor_key_right (week_view);
break;
default:
@@ -4417,13 +4420,13 @@ e_week_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
if (((event->state & GDK_SHIFT_MASK) != GDK_SHIFT_MASK)
&&((event->state & GDK_CONTROL_MASK) != GDK_CONTROL_MASK)
&&((event->state & GDK_MOD1_MASK) == GDK_MOD1_MASK)) {
- if (keyval == GDK_Up || keyval == GDK_KP_Up)
+ if (keyval == GDK_KEY_Up || keyval == GDK_KEY_KP_Up)
return e_week_view_event_move ((ECalendarView *) week_view, E_CAL_VIEW_MOVE_UP);
- else if (keyval == GDK_Down || keyval == GDK_KP_Down)
+ else if (keyval == GDK_KEY_Down || keyval == GDK_KEY_KP_Down)
return e_week_view_event_move ((ECalendarView *) week_view, E_CAL_VIEW_MOVE_DOWN);
- else if (keyval == GDK_Left || keyval == GDK_KP_Left)
+ else if (keyval == GDK_KEY_Left || keyval == GDK_KEY_KP_Left)
return e_week_view_event_move ((ECalendarView *) week_view, E_CAL_VIEW_MOVE_LEFT);
- else if (keyval == GDK_Right || keyval == GDK_KP_Right)
+ else if (keyval == GDK_KEY_Right || keyval == GDK_KEY_KP_Right)
return e_week_view_event_move ((ECalendarView *) week_view, E_CAL_VIEW_MOVE_RIGHT);
}
@@ -4432,12 +4435,12 @@ e_week_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
/* We only want to start an edit with a return key or a simple
character. */
- if (event->keyval == GDK_Return) {
+ if (event->keyval == GDK_KEY_Return) {
initial_text = NULL;
} else if (((event->keyval >= 0x20) && (event->keyval <= 0xFF)
&& (event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK)))
|| (event->length == 0)
- || (event->keyval == GDK_Tab)) {
+ || (event->keyval == GDK_KEY_Tab)) {
return FALSE;
} else
initial_text = e_utf8_from_gtk_event_key (widget, event->keyval, event->string);
@@ -4544,13 +4547,13 @@ e_week_view_on_jump_button_event (GnomeCanvasItem *item,
}
else if (event->type == GDK_KEY_PRESS) {
/* return, if Tab, Control or Alt is pressed */
- if ((event->key.keyval == GDK_Tab) ||
+ if ((event->key.keyval == GDK_KEY_Tab) ||
(event->key.state & (GDK_CONTROL_MASK | GDK_MOD1_MASK)))
return FALSE;
/* with a return key or a simple character (from 0x20 to 0xff),
* jump to the day
*/
- if ((event->key.keyval == GDK_Return) ||
+ if ((event->key.keyval == GDK_KEY_Return) ||
((event->key.keyval >= 0x20) &&
(event->key.keyval <= 0xFF))) {
e_week_view_jump_to_button_item (week_view, item);
diff --git a/calendar/gui/ea-cal-view.c b/calendar/gui/ea-cal-view.c
index 08dba44340..0d942f4a94 100644
--- a/calendar/gui/ea-cal-view.c
+++ b/calendar/gui/ea-cal-view.c
@@ -28,6 +28,7 @@
#include <glib.h>
#include <glib/gi18n.h>
+/* backward-compatibility cruft */
#include <e-util/gtk-compat.h>
static void ea_cal_view_class_init (EaCalViewClass *klass);
diff --git a/calendar/gui/ea-day-view.c b/calendar/gui/ea-day-view.c
index e34eaa6366..2a972847c1 100644
--- a/calendar/gui/ea-day-view.c
+++ b/calendar/gui/ea-day-view.c
@@ -28,6 +28,7 @@
#include <glib.h>
#include <glib/gi18n.h>
+/* backward-compatibility cruft */
#include <e-util/gtk-compat.h>
static void ea_day_view_class_init (EaDayViewClass *klass);
diff --git a/calendar/gui/ea-gnome-calendar.c b/calendar/gui/ea-gnome-calendar.c
index e7492a07ee..88c288c84d 100644
--- a/calendar/gui/ea-gnome-calendar.c
+++ b/calendar/gui/ea-gnome-calendar.c
@@ -29,6 +29,7 @@
#include <libedataserver/e-data-server-util.h>
#include <glib/gi18n.h>
+/* backward-compatibility cruft */
#include <e-util/gtk-compat.h>
static void ea_gnome_calendar_class_init (EaGnomeCalendarClass *klass);
diff --git a/calendar/gui/ea-week-view.c b/calendar/gui/ea-week-view.c
index e34894f9ce..c598c4289f 100644
--- a/calendar/gui/ea-week-view.c
+++ b/calendar/gui/ea-week-view.c
@@ -27,6 +27,7 @@
#include <text/e-text.h>
#include <glib/gi18n.h>
+/* backward-compatibility cruft */
#include <e-util/gtk-compat.h>
static void ea_week_view_class_init (EaWeekViewClass *klass);
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 8feaa3f850..985c47857b 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -69,6 +69,9 @@
#include "e-memo-table.h"
#include "e-task-table.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define d(x)
/* hash table define for non intrusive error dialog */
@@ -628,66 +631,66 @@ gnome_calendar_class_init (GnomeCalendarClass *class)
binding_set = gtk_binding_set_new (G_OBJECT_CLASS_NAME (class));
/* Alt+PageUp/PageDown, go to the first/last day of the month */
- gtk_binding_entry_add_signal (binding_set, GDK_Page_Up,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_Page_Up,
GDK_MOD1_MASK,
"goto_date", 1,
G_TYPE_ENUM,
GNOME_CAL_GOTO_FIRST_DAY_OF_MONTH);
- gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Up,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Page_Up,
GDK_MOD1_MASK,
"goto_date", 1,
G_TYPE_ENUM,
GNOME_CAL_GOTO_FIRST_DAY_OF_MONTH);
- gtk_binding_entry_add_signal (binding_set, GDK_Page_Down,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_Page_Down,
GDK_MOD1_MASK,
"goto_date", 1,
G_TYPE_ENUM,
GNOME_CAL_GOTO_LAST_DAY_OF_MONTH);
- gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Down,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Page_Down,
GDK_MOD1_MASK,
"goto_date", 1,
G_TYPE_ENUM,
GNOME_CAL_GOTO_LAST_DAY_OF_MONTH);
/* Alt+Home/End, go to the first/last day of the week */
- gtk_binding_entry_add_signal (binding_set, GDK_Home,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_Home,
GDK_MOD1_MASK,
"goto_date", 1,
G_TYPE_ENUM,
GNOME_CAL_GOTO_FIRST_DAY_OF_WEEK);
- gtk_binding_entry_add_signal (binding_set, GDK_End,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_End,
GDK_MOD1_MASK,
"goto_date", 1,
G_TYPE_ENUM,
GNOME_CAL_GOTO_LAST_DAY_OF_WEEK);
- gtk_binding_entry_add_signal (binding_set, GDK_KP_Home,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Home,
GDK_MOD1_MASK,
"goto_date", 1,
G_TYPE_ENUM,
GNOME_CAL_GOTO_FIRST_DAY_OF_WEEK);
- gtk_binding_entry_add_signal (binding_set, GDK_KP_End,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_End,
GDK_MOD1_MASK,
"goto_date", 1,
G_TYPE_ENUM,
GNOME_CAL_GOTO_LAST_DAY_OF_WEEK);
/*Alt+Left/Right, go to the same day of the previous/next week*/
- gtk_binding_entry_add_signal (binding_set,GDK_Left,
+ gtk_binding_entry_add_signal (binding_set,GDK_KEY_Left,
GDK_MOD1_MASK,
"goto_date",1,
G_TYPE_ENUM,
GNOME_CAL_GOTO_SAME_DAY_OF_PREVIOUS_WEEK);
- gtk_binding_entry_add_signal (binding_set,GDK_KP_Left,
+ gtk_binding_entry_add_signal (binding_set,GDK_KEY_KP_Left,
GDK_MOD1_MASK,
"goto_date",1,
G_TYPE_ENUM,
GNOME_CAL_GOTO_SAME_DAY_OF_PREVIOUS_WEEK);
- gtk_binding_entry_add_signal (binding_set,GDK_Right,
+ gtk_binding_entry_add_signal (binding_set,GDK_KEY_Right,
GDK_MOD1_MASK,
"goto_date",1,
G_TYPE_ENUM,
GNOME_CAL_GOTO_SAME_DAY_OF_NEXT_WEEK);
- gtk_binding_entry_add_signal (binding_set,GDK_KP_Right,
+ gtk_binding_entry_add_signal (binding_set,GDK_KEY_KP_Right,
GDK_MOD1_MASK,
"goto_date",1,
G_TYPE_ENUM,
@@ -695,27 +698,27 @@ gnome_calendar_class_init (GnomeCalendarClass *class)
/* Ctrl+Y/J/K/M/L to switch between
* DayView/WorkWeekView/WeekView/MonthView/ListView */
- gtk_binding_entry_add_signal (binding_set, GDK_y,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_y,
GDK_CONTROL_MASK,
"change_view", 1,
G_TYPE_ENUM,
GNOME_CAL_DAY_VIEW);
- gtk_binding_entry_add_signal (binding_set, GDK_j,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_j,
GDK_CONTROL_MASK,
"change_view", 1,
G_TYPE_ENUM,
GNOME_CAL_WORK_WEEK_VIEW);
- gtk_binding_entry_add_signal (binding_set, GDK_k,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_k,
GDK_CONTROL_MASK,
"change_view", 1,
G_TYPE_ENUM,
GNOME_CAL_WEEK_VIEW);
- gtk_binding_entry_add_signal (binding_set, GDK_m,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_m,
GDK_CONTROL_MASK,
"change_view", 1,
G_TYPE_ENUM,
GNOME_CAL_MONTH_VIEW);
- gtk_binding_entry_add_signal (binding_set, GDK_l,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_l,
GDK_CONTROL_MASK,
"change_view", 1,
G_TYPE_ENUM,
diff --git a/calendar/gui/weekday-picker.c b/calendar/gui/weekday-picker.c
index 699bfb21b9..025c9df1ea 100644
--- a/calendar/gui/weekday-picker.c
+++ b/calendar/gui/weekday-picker.c
@@ -35,7 +35,8 @@
#include <e-util/e-util.h>
#include "weekday-picker.h"
-
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
#define PADDING 2
@@ -393,16 +394,16 @@ handle_key_press_event (WeekdayPicker *wp, GdkEvent *event)
priv->focus_day = priv->week_start_day;
switch (keyval) {
- case GDK_Up:
- case GDK_Right:
+ case GDK_KEY_Up:
+ case GDK_KEY_Right:
priv->focus_day += 1;
break;
- case GDK_Down:
- case GDK_Left:
+ case GDK_KEY_Down:
+ case GDK_KEY_Left:
priv->focus_day -= 1;
break;
- case GDK_space:
- case GDK_Return:
+ case GDK_KEY_space:
+ case GDK_KEY_Return:
day_clicked (wp, priv->focus_day);
return TRUE;
default: