From: Ben Pfaff Date: Sun, 3 Mar 2013 06:28:35 +0000 (-0800) Subject: pspp-sheet-view: Make Ctrl+Up and Ctrl+Down go to top and bottom. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed25e8236ce220a86c20c51636771ac160a07581;hp=aaffd4495cf2b0727a3d9ac22f1710e70343ce12;p=pspp pspp-sheet-view: Make Ctrl+Up and Ctrl+Down go to top and bottom. These keybindings match those implemented by Gnumeric. Suggested by John Darrington. --- diff --git a/src/ui/gui/pspp-sheet-view.c b/src/ui/gui/pspp-sheet-view.c index 8f18f78561..534409ebb5 100644 --- a/src/ui/gui/pspp-sheet-view.c +++ b/src/ui/gui/pspp-sheet-view.c @@ -924,6 +924,14 @@ pspp_sheet_view_class_init (PsppSheetViewClass *class) GTK_MOVEMENT_PAGES, 1); + gtk_binding_entry_add_signal (binding_set[i], GDK_Up, GDK_CONTROL_MASK, "move-cursor", 2, + G_TYPE_ENUM, GTK_MOVEMENT_BUFFER_ENDS, + G_TYPE_INT, -1); + + gtk_binding_entry_add_signal (binding_set[i], GDK_Down, GDK_CONTROL_MASK, "move-cursor", 2, + G_TYPE_ENUM, GTK_MOVEMENT_BUFFER_ENDS, + G_TYPE_INT, 1); + gtk_binding_entry_add_signal (binding_set[i], GDK_Right, 0, "move-cursor", 2, G_TYPE_ENUM, GTK_MOVEMENT_VISUAL_POSITIONS, G_TYPE_INT, 1); @@ -12432,6 +12440,10 @@ pspp_sheet_view_event (GtkWidget *widget, return FALSE; break; + case GDK_Up: case GDK_KP_Up: + case GDK_Down: case GDK_KP_Down: + break; + default: return FALSE; }