Re: gtk_container_focus



Jonathan Blandford <jrb redhat com> writes:

> If it's not a problem, I can write up a patch to make this change.

Not that anyone is likely to test it, but here's the patch.  I'll commit
to gtk-2-0 and HEAD soon, unless someone has a strong opinion on it.

Thanks,
-Jonathan

? gdk--2.0.pc
? gtk+--2.0.pc
? gtk/fornalin.xbm
? gtk/gtk.defs
? gtk/gtktreeview.c.pre_k_
? gtk/gtktypebuiltins_evals.c
? gtk/gtktypebuiltins_ids.c
? gtk/gtktypebuiltins_vars.c
? gtk/realize
? gtk/stamp-gtk.defs
? tests/.xvpics
? tests/out
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtk+/ChangeLog,v
retrieving revision 1.3338
diff -u -r1.3338 ChangeLog
--- ChangeLog	14 Apr 2002 15:04:59 -0000	1.3338
+++ ChangeLog	15 Apr 2002 20:17:38 -0000
@@ -1,3 +1,10 @@
+Mon Apr 15 15:41:56 2002  Jonathan Blandford  <jrb redhat com>
+
+	* gtk/gtkcontainer.c (gtk_container_focus): include internal
+	children when doing focus.
+	(gtk_container_get_all_children): new static function to include
+	internal children when making a list of them.
+
 Sun Apr 14 16:56:59 2002  Kristian Rietveld  <kris gtk org>
 
 	* gtk/gtktreeprivate.h: add _gtk_tree_view_column_get_editable_cell and
Index: gtk/gtkcontainer.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkcontainer.c,v
retrieving revision 1.109
diff -u -r1.109 gtkcontainer.c
--- gtk/gtkcontainer.c	9 Apr 2002 23:32:34 -0000	1.109
+++ gtk/gtkcontainer.c	15 Apr 2002 20:17:38 -0000
@@ -1389,6 +1389,20 @@
   return g_object_get_data (G_OBJECT (container), "gtk-container-focus-chain");
 }
 
+/* same as gtk_container_get_children, except it includes internals
+ */
+static GList *
+gtk_container_get_all_children (GtkContainer *container)
+{
+  GList *children = NULL;
+
+  gtk_container_forall (container,
+			 gtk_container_children_callback,
+			 &children);
+
+  return children;
+}
+
 static gboolean
 gtk_container_focus (GtkWidget        *widget,
                      GtkDirectionType  direction)
@@ -1420,7 +1434,7 @@
       if (container->has_focus_chain)
 	children = g_list_copy (get_focus_chain (container));
       else
-	children = gtk_container_get_children (container);
+	children = gtk_container_get_all_children (container);
 
       if (container->has_focus_chain &&
 	  (direction == GTK_DIR_TAB_FORWARD ||


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