[evince/rendering-cleanup: 4/8] [libview] Use changed gdk keysym names
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/rendering-cleanup: 4/8] [libview] Use changed gdk keysym names
- Date: Sat, 11 Sep 2010 22:20:42 +0000 (UTC)
commit 25d9f4975c32e3ae255a9c619c61a3976a429656
Author: Christian Persch <chpe gnome org>
Date: Sat Sep 11 23:48:26 2010 +0200
[libview] Use changed gdk keysym names
libview/ev-view-presentation.c | 62 ++++++++++++++++++++--------------------
libview/ev-view.c | 26 ++++++++--------
2 files changed, 44 insertions(+), 44 deletions(-)
---
diff --git a/libview/ev-view-presentation.c b/libview/ev-view-presentation.c
index 0a11ce1..5caf78f 100644
--- a/libview/ev-view-presentation.c
+++ b/libview/ev-view-presentation.c
@@ -534,7 +534,7 @@ ev_view_presentation_previous_page (EvViewPresentation *pview)
/* Goto Window */
#define KEY_IS_NUMERIC(keyval) \
- ((keyval >= GDK_0 && keyval <= GDK_9) || (keyval >= GDK_KP_0 && keyval <= GDK_KP_9))
+ ((keyval >= GDK_KEY_0 && keyval <= GDK_KEY_9) || (keyval >= GDK_KEY_KP_0 && keyval <= GDK_KEY_KP_9))
/* Cut and paste from gtkwindow.c */
static void
@@ -579,17 +579,17 @@ ev_view_presentation_goto_window_key_press_event (GtkWidget *widget,
EvViewPresentation *pview)
{
switch (event->keyval) {
- case GDK_Escape:
- case GDK_Tab:
- case GDK_KP_Tab:
- case GDK_ISO_Left_Tab:
+ case GDK_KEY_Escape:
+ case GDK_KEY_Tab:
+ case GDK_KEY_KP_Tab:
+ case GDK_KEY_ISO_Left_Tab:
ev_view_presentation_goto_window_hide (pview);
return TRUE;
- case GDK_Return:
- case GDK_KP_Enter:
- case GDK_ISO_Enter:
- case GDK_BackSpace:
- case GDK_Delete:
+ case GDK_KEY_Return:
+ case GDK_KEY_KP_Enter:
+ case GDK_KEY_ISO_Enter:
+ case GDK_KEY_BackSpace:
+ case GDK_KEY_Delete:
return FALSE;
default:
if (!KEY_IS_NUMERIC (event->keyval))
@@ -1075,31 +1075,31 @@ ev_view_presentation_key_press_event (GtkWidget *widget,
return gtk_bindings_activate_event (GTK_OBJECT (widget), event);
switch (event->keyval) {
- case GDK_b:
- case GDK_B:
- case GDK_period:
- case GDK_KP_Decimal:
+ case GDK_KEY_b:
+ case GDK_KEY_B:
+ case GDK_KEY_period:
+ case GDK_KEY_KP_Decimal:
if (pview->state == EV_PRESENTATION_BLACK)
ev_view_presentation_set_normal (pview);
else
ev_view_presentation_set_black (pview);
return TRUE;
- case GDK_w:
- case GDK_W:
+ case GDK_KEY_w:
+ case GDK_KEY_W:
if (pview->state == EV_PRESENTATION_WHITE)
ev_view_presentation_set_normal (pview);
else
ev_view_presentation_set_white (pview);
return TRUE;
- case GDK_Home:
+ case GDK_KEY_Home:
if (pview->state == EV_PRESENTATION_NORMAL) {
ev_view_presentation_update_current_page (pview, 0);
return TRUE;
}
break;
- case GDK_End:
+ case GDK_KEY_End:
if (pview->state == EV_PRESENTATION_NORMAL) {
gint page;
@@ -1303,7 +1303,7 @@ add_change_page_binding_keypad (GtkBindingSet *binding_set,
GdkModifierType modifiers,
GtkScrollType scroll)
{
- guint keypad_keyval = keyval - GDK_Left + GDK_KP_Left;
+ guint keypad_keyval = keyval - GDK_KEY_Left + GDK_KEY_KP_Left;
gtk_binding_entry_add_signal (binding_set, keyval, modifiers,
"change_page", 1,
@@ -1438,32 +1438,32 @@ ev_view_presentation_class_init (EvViewPresentationClass *klass)
G_TYPE_NONE);
binding_set = gtk_binding_set_by_class (klass);
- add_change_page_binding_keypad (binding_set, GDK_Left, 0, GTK_SCROLL_PAGE_BACKWARD);
- add_change_page_binding_keypad (binding_set, GDK_Right, 0, GTK_SCROLL_PAGE_FORWARD);
- add_change_page_binding_keypad (binding_set, GDK_Up, 0, GTK_SCROLL_PAGE_BACKWARD);
- add_change_page_binding_keypad (binding_set, GDK_Down, 0, GTK_SCROLL_PAGE_FORWARD);
- gtk_binding_entry_add_signal (binding_set, GDK_space, 0,
+ add_change_page_binding_keypad (binding_set, GDK_KEY_Left, 0, GTK_SCROLL_PAGE_BACKWARD);
+ add_change_page_binding_keypad (binding_set, GDK_KEY_Right, 0, GTK_SCROLL_PAGE_FORWARD);
+ add_change_page_binding_keypad (binding_set, GDK_KEY_Up, 0, GTK_SCROLL_PAGE_BACKWARD);
+ add_change_page_binding_keypad (binding_set, GDK_KEY_Down, 0, GTK_SCROLL_PAGE_FORWARD);
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_space, 0,
"change_page", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_FORWARD);
- gtk_binding_entry_add_signal (binding_set, GDK_BackSpace, 0,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_BackSpace, 0,
"change_page", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_BACKWARD);
- gtk_binding_entry_add_signal (binding_set, GDK_Page_Down, 0,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_Page_Down, 0,
"change_page", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_FORWARD);
- gtk_binding_entry_add_signal (binding_set, GDK_Page_Up, 0,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_Page_Up, 0,
"change_page", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_BACKWARD);
- gtk_binding_entry_add_signal (binding_set, GDK_J, 0,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_J, 0,
"change_page", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_FORWARD);
- gtk_binding_entry_add_signal (binding_set, GDK_H, 0,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_H, 0,
"change_page", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_BACKWARD);
- gtk_binding_entry_add_signal (binding_set, GDK_L, 0,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_L, 0,
"change_page", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_FORWARD);
- gtk_binding_entry_add_signal (binding_set, GDK_K, 0,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_K, 0,
"change_page", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_BACKWARD);
}
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 5eb21d8..20bb572 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -789,7 +789,7 @@ add_scroll_binding_keypad (GtkBindingSet *binding_set,
GtkScrollType scroll,
gboolean horizontal)
{
- guint keypad_keyval = keyval - GDK_Left + GDK_KP_Left;
+ guint keypad_keyval = keyval - GDK_KEY_Left + GDK_KEY_KP_Left;
gtk_binding_entry_add_signal (binding_set, keyval, modifiers,
"binding_activated", 2,
@@ -4683,21 +4683,21 @@ ev_view_class_init (EvViewClass *class)
binding_set = gtk_binding_set_by_class (class);
- add_scroll_binding_keypad (binding_set, GDK_Left, 0, GTK_SCROLL_STEP_BACKWARD, TRUE);
- add_scroll_binding_keypad (binding_set, GDK_Right, 0, GTK_SCROLL_STEP_FORWARD, TRUE);
- add_scroll_binding_keypad (binding_set, GDK_Left, GDK_MOD1_MASK, GTK_SCROLL_STEP_DOWN, TRUE);
- add_scroll_binding_keypad (binding_set, GDK_Right, GDK_MOD1_MASK, GTK_SCROLL_STEP_UP, TRUE);
- add_scroll_binding_keypad (binding_set, GDK_Up, 0, GTK_SCROLL_STEP_BACKWARD, FALSE);
- add_scroll_binding_keypad (binding_set, GDK_Down, 0, GTK_SCROLL_STEP_FORWARD, FALSE);
- add_scroll_binding_keypad (binding_set, GDK_Up, GDK_MOD1_MASK, GTK_SCROLL_STEP_DOWN, FALSE);
- add_scroll_binding_keypad (binding_set, GDK_Down, GDK_MOD1_MASK, GTK_SCROLL_STEP_UP, FALSE);
- gtk_binding_entry_add_signal (binding_set, GDK_H, 0, "binding_activated", 2, GTK_TYPE_SCROLL_TYPE,
+ add_scroll_binding_keypad (binding_set, GDK_KEY_Left, 0, GTK_SCROLL_STEP_BACKWARD, TRUE);
+ add_scroll_binding_keypad (binding_set, GDK_KEY_Right, 0, GTK_SCROLL_STEP_FORWARD, TRUE);
+ add_scroll_binding_keypad (binding_set, GDK_KEY_Left, GDK_MOD1_MASK, GTK_SCROLL_STEP_DOWN, TRUE);
+ add_scroll_binding_keypad (binding_set, GDK_KEY_Right, GDK_MOD1_MASK, GTK_SCROLL_STEP_UP, TRUE);
+ add_scroll_binding_keypad (binding_set, GDK_KEY_Up, 0, GTK_SCROLL_STEP_BACKWARD, FALSE);
+ add_scroll_binding_keypad (binding_set, GDK_KEY_Down, 0, GTK_SCROLL_STEP_FORWARD, FALSE);
+ add_scroll_binding_keypad (binding_set, GDK_KEY_Up, GDK_MOD1_MASK, GTK_SCROLL_STEP_DOWN, FALSE);
+ add_scroll_binding_keypad (binding_set, GDK_KEY_Down, GDK_MOD1_MASK, GTK_SCROLL_STEP_UP, FALSE);
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_H, 0, "binding_activated", 2, GTK_TYPE_SCROLL_TYPE,
GTK_SCROLL_STEP_BACKWARD, G_TYPE_BOOLEAN, TRUE);
- gtk_binding_entry_add_signal (binding_set, GDK_J, 0, "binding_activated", 2, GTK_TYPE_SCROLL_TYPE,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_J, 0, "binding_activated", 2, GTK_TYPE_SCROLL_TYPE,
GTK_SCROLL_STEP_FORWARD, G_TYPE_BOOLEAN, FALSE);
- gtk_binding_entry_add_signal (binding_set, GDK_K, 0, "binding_activated", 2, GTK_TYPE_SCROLL_TYPE,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_K, 0, "binding_activated", 2, GTK_TYPE_SCROLL_TYPE,
GTK_SCROLL_STEP_BACKWARD, G_TYPE_BOOLEAN, FALSE);
- gtk_binding_entry_add_signal (binding_set, GDK_L, 0, "binding_activated", 2, GTK_TYPE_SCROLL_TYPE,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_L, 0, "binding_activated", 2, GTK_TYPE_SCROLL_TYPE,
GTK_SCROLL_STEP_FORWARD, G_TYPE_BOOLEAN, TRUE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]