[gtk+/treeview-refactor] Fixed GtkCellAreaBox->focus() to not give focus to cells that are siblings of an intentional focus c



commit dbe026ed1eba1869970f6c2d8d399b1fd4246ac2
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Mon Nov 29 16:20:01 2010 +0900

    Fixed GtkCellAreaBox->focus() to not give focus to cells that are siblings of an intentional focus cell.

 gtk/gtkcellareabox.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcellareabox.c b/gtk/gtkcellareabox.c
index 5e25c8a..a95bc78 100644
--- a/gtk/gtkcellareabox.c
+++ b/gtk/gtkcellareabox.c
@@ -1871,10 +1871,10 @@ gtk_cell_area_box_focus (GtkCellArea      *area,
 
 	      if (info->renderer == focus_cell)
 		found_cell = TRUE;
-	      else if (found_cell)
+	      else if (found_cell && /* Dont give focus to cells that are siblings to a focus cell */
+		       gtk_cell_area_get_focus_from_sibling (area, info->renderer) == NULL)
 		{
                   gtk_cell_area_set_focus_cell (area, info->renderer);
-
                   cycled_focus = TRUE;
 		}
 	    }



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