pspp-sheet-view: Make Ctrl+Up and Ctrl+Down go to top and bottom. 20130303031902/pspp 20130304031653/pspp 20130305031845/pspp 20130306031859/pspp 20130307031905/pspp 20130308031859/pspp 20130309031907/pspp 20130310031857/pspp 20130311031859/pspp 20130312031842/pspp
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 3 Mar 2013 06:28:35 +0000 (22:28 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 3 Mar 2013 06:46:24 +0000 (22:46 -0800)
These keybindings match those implemented by Gnumeric.

Suggested by John Darrington.

src/ui/gui/pspp-sheet-view.c

index 8f18f78561d2b6a8668bb27af737dd8d9d922c25..534409ebb583cbabce8d709bd6590182a7fe9b55 100644 (file)
@@ -924,6 +924,14 @@ pspp_sheet_view_class_init (PsppSheetViewClass *class)
                                         GTK_MOVEMENT_PAGES, 1);
 
 
                                         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);
       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;
 
             return FALSE;
           break;
 
+        case GDK_Up:        case GDK_KP_Up:
+        case GDK_Down:      case GDK_KP_Down:
+          break;
+
         default:
           return FALSE;
         }
         default:
           return FALSE;
         }