gnome-games r7181 - trunk/aisleriot



Author: chpe
Date: Sun Jan 13 22:07:54 2008
New Revision: 7181
URL: http://svn.gnome.org/viewvc/gnome-games?rev=7181&view=rev

Log:
When we don't have focus yet, we set the focus to the first/last card.
If we moved left/right, we set the focus as if it had been on the first/
last card.


Modified:
   trunk/aisleriot/board.c

Modified: trunk/aisleriot/board.c
==============================================================================
--- trunk/aisleriot/board.c	(original)
+++ trunk/aisleriot/board.c	Sun Jan 13 22:07:54 2008
@@ -2168,10 +2168,17 @@
                         step == GTK_MOVEMENT_BUFFER_ENDS, FALSE);
 
   /* No focus? Set focus to the first/last slot */
-  /* FIXMEchpe: only if !shift ? */
   /* This will always return TRUE, no need for keynav-failed handling */
-  if (!priv->focus_slot)
-    return aisleriot_board_move_cursor_start_end_by_slot (board, -count);
+  if (!priv->focus_slot) {
+    switch (step) {
+      case GTK_MOVEMENT_LOGICAL_POSITIONS:
+      case GTK_MOVEMENT_VISUAL_POSITIONS:
+        /* Move as if we'd been on the last/first slot */
+        return aisleriot_board_move_cursor_start_end_by_slot (board, -count);
+      default:
+        return aisleriot_board_move_cursor_start_end_by_slot (board, count);
+    }
+  }
 
 //  if (!priv->show_focus)
     // show it; return



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]