[gtk+/treeview-refactor-staging] Fixed some glitches in GtkCellAreaBox keynav from my last commit.



commit e4ccaa701ef850c28006aea71b7bf2fc723f530b
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Thu Dec 9 18:29:36 2010 +0900

    Fixed some glitches in GtkCellAreaBox keynav from my last commit.

 gtk/gtkcellareabox.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkcellareabox.c b/gtk/gtkcellareabox.c
index 8199fcc..286c670 100644
--- a/gtk/gtkcellareabox.c
+++ b/gtk/gtkcellareabox.c
@@ -1779,25 +1779,25 @@ gtk_cell_area_box_focus (GtkCellArea      *area,
       cycle = priv->rtl ? FOCUS_NEXT : FOCUS_PREV;
       break;
     case GTK_DIR_UP: 
-      if (priv->orientation == GTK_ORIENTATION_VERTICAL)
+      if (priv->orientation == GTK_ORIENTATION_VERTICAL || !priv->last_focus_cell)
 	cycle = FOCUS_PREV;
       else if (!focus_cell)
 	cycle = FOCUS_LAST_CELL;
       break;
     case GTK_DIR_DOWN:
-      if (priv->orientation == GTK_ORIENTATION_VERTICAL)
-	cycle = FOCUS_PREV;
+      if (priv->orientation == GTK_ORIENTATION_VERTICAL || !priv->last_focus_cell)
+	cycle = FOCUS_NEXT;
       else if (!focus_cell)
 	cycle = FOCUS_LAST_CELL;
       break;
     case GTK_DIR_LEFT:
-      if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
+      if (priv->orientation == GTK_ORIENTATION_HORIZONTAL || !priv->last_focus_cell)
 	cycle = priv->rtl ? FOCUS_NEXT : FOCUS_PREV;
       else if (!focus_cell)
 	cycle = FOCUS_LAST_CELL;
       break;
     case GTK_DIR_RIGHT:
-      if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
+      if (priv->orientation == GTK_ORIENTATION_HORIZONTAL || !priv->last_focus_cell)
 	cycle = priv->rtl ? FOCUS_PREV : FOCUS_NEXT;
       else if (!focus_cell)
 	cycle = FOCUS_LAST_CELL;



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