diff options
author | Carlos Garcia Campos <[email protected]> | 2013-07-12 12:08:36 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-09-06 18:25:34 +0200 |
commit | 0d7310f75da6d8a95bd8c212e8851d50eaa94c01 (patch) | |
tree | 219266f12d6bfead8de922957ebd9eb47c292e07 | |
parent | 69e48c6e36fdc46fdc31fd5dadefa584f36bd2cc (diff) | |
download | atril-0d7310f75da6d8a95bd8c212e8851d50eaa94c01.tar.bz2 atril-0d7310f75da6d8a95bd8c212e8851d50eaa94c01.tar.xz |
libview: Add more scroll key bindings to EvView
All keybindings currently used by EvWindow. Having them in the view
makes them available to other EvView users and they can be overriden by
the themes.
origin commit:
https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=660b741
Fix Return key bidings
Do not use the helper function for keypad keys since Return doesn't have
a key un the keypad.
https://bugzilla.gnome.org/show_bug.cgi?id=704154
-rw-r--r-- | libview/ev-view.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libview/ev-view.c b/libview/ev-view.c index 5d4c7e77..b9e79026 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -6332,6 +6332,14 @@ ev_view_class_init (EvViewClass *class) add_scroll_binding_keypad (binding_set, GDK_KEY_Down, 0, GTK_SCROLL_STEP_FORWARD, GTK_ORIENTATION_VERTICAL); add_scroll_binding_keypad (binding_set, GDK_KEY_Up, GDK_MOD1_MASK, GTK_SCROLL_STEP_DOWN, GTK_ORIENTATION_VERTICAL); add_scroll_binding_keypad (binding_set, GDK_KEY_Down, GDK_MOD1_MASK, GTK_SCROLL_STEP_UP, GTK_ORIENTATION_VERTICAL); + add_scroll_binding_keypad (binding_set, GDK_KEY_Page_Up, 0, GTK_SCROLL_PAGE_BACKWARD, GTK_ORIENTATION_VERTICAL); + add_scroll_binding_keypad (binding_set, GDK_KEY_Page_Down, 0, GTK_SCROLL_PAGE_FORWARD, GTK_ORIENTATION_VERTICAL); + gtk_binding_entry_add_signal (binding_set, GDK_KEY_Return, 0, "scroll", 2, + GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_FORWARD, + GTK_TYPE_ORIENTATION, GTK_ORIENTATION_VERTICAL); + gtk_binding_entry_add_signal (binding_set, GDK_KEY_Return, GDK_SHIFT_MASK, "scroll", 2, + GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_BACKWARD, + GTK_TYPE_ORIENTATION, GTK_ORIENTATION_VERTICAL); gtk_binding_entry_add_signal (binding_set, GDK_KEY_H, 0, "scroll", 2, GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_BACKWARD, GTK_TYPE_ORIENTATION, GTK_ORIENTATION_HORIZONTAL); @@ -6344,6 +6352,18 @@ ev_view_class_init (EvViewClass *class) gtk_binding_entry_add_signal (binding_set, GDK_KEY_L, 0, "scroll", 2, GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_FORWARD, GTK_TYPE_ORIENTATION, GTK_ORIENTATION_HORIZONTAL); + gtk_binding_entry_add_signal (binding_set, GDK_KEY_space, 0, "scroll", 2, + GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_FORWARD, + GTK_TYPE_ORIENTATION, GTK_ORIENTATION_VERTICAL); + gtk_binding_entry_add_signal (binding_set, GDK_KEY_space, GDK_SHIFT_MASK, "scroll", 2, + GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_BACKWARD, + GTK_TYPE_ORIENTATION, GTK_ORIENTATION_VERTICAL); + gtk_binding_entry_add_signal (binding_set, GDK_KEY_BackSpace, 0, "scroll", 2, + GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_BACKWARD, + GTK_TYPE_ORIENTATION, GTK_ORIENTATION_VERTICAL); + gtk_binding_entry_add_signal (binding_set, GDK_KEY_BackSpace, GDK_SHIFT_MASK, "scroll", 2, + GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_FORWARD, + GTK_TYPE_ORIENTATION, GTK_ORIENTATION_VERTICAL); } static void |