Commit 55022c39 authored by Paolo Bacchilega's avatar Paolo Bacchilega

Numeric keypad nav keys don't work

[bug #667390]
parent aa74b2b2
......@@ -5807,20 +5807,24 @@ gth_browser_viewer_key_press_cb (GthBrowser *browser,
if ((event->state & modifiers) == 0) {
switch (event->keyval) {
case GDK_KEY_Page_Up:
case GDK_KEY_KP_Page_Up:
case GDK_KEY_BackSpace:
gth_browser_show_prev_image (browser, FALSE, FALSE);
return TRUE;
case GDK_KEY_Page_Down:
case GDK_KEY_KP_Page_Down:
case GDK_KEY_space:
gth_browser_show_next_image (browser, FALSE, FALSE);
return TRUE;
case GDK_KEY_Home:
case GDK_KEY_KP_Home:
gth_browser_show_first_image (browser, FALSE, FALSE);
return TRUE;
case GDK_KEY_End:
case GDK_KEY_KP_End:
gth_browser_show_last_image (browser, FALSE, FALSE);
return TRUE;
......
......@@ -3849,6 +3849,15 @@ gth_grid_view_class_init (GthGridViewClass *grid_view_class)
_gtk_binding_entry_add_move_cursor_signals (binding_set, GDK_KEY_Home, GTH_CURSOR_MOVE_BEGIN);
_gtk_binding_entry_add_move_cursor_signals (binding_set, GDK_KEY_End, GTH_CURSOR_MOVE_END);
_gtk_binding_entry_add_move_cursor_signals (binding_set, GDK_KEY_KP_Right, GTH_CURSOR_MOVE_RIGHT);
_gtk_binding_entry_add_move_cursor_signals (binding_set, GDK_KEY_KP_Left, GTH_CURSOR_MOVE_LEFT);
_gtk_binding_entry_add_move_cursor_signals (binding_set, GDK_KEY_KP_Down, GTH_CURSOR_MOVE_DOWN);
_gtk_binding_entry_add_move_cursor_signals (binding_set, GDK_KEY_KP_Up, GTH_CURSOR_MOVE_UP);
_gtk_binding_entry_add_move_cursor_signals (binding_set, GDK_KEY_KP_Page_Up, GTH_CURSOR_MOVE_PAGE_UP);
_gtk_binding_entry_add_move_cursor_signals (binding_set, GDK_KEY_KP_Page_Down, GTH_CURSOR_MOVE_PAGE_DOWN);
_gtk_binding_entry_add_move_cursor_signals (binding_set, GDK_KEY_KP_Home, GTH_CURSOR_MOVE_BEGIN);
_gtk_binding_entry_add_move_cursor_signals (binding_set, GDK_KEY_KP_End, GTH_CURSOR_MOVE_END);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_space, 0,
"select-cursor-item", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Space, 0,
......
......@@ -1418,6 +1418,25 @@ gth_image_viewer_class_init (GthImageViewerClass *class)
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_NONE,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_UP);
/* For scrolling (Keypad) */
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Right, 0,
"scroll", 2,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_RIGHT,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_NONE);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Left, 0,
"scroll", 2,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_LEFT,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_NONE);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Down, 0,
"scroll", 2,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_NONE,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_DOWN);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Up, 0,
"scroll", 2,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_NONE,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_UP);
/* Zoom in */
gtk_binding_entry_add_signal (binding_set, GDK_KEY_plus, 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment