summaryrefslogtreecommitdiff
path: root/gtk/gtkcontainer.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtkcontainer.c')
-rw-r--r--gtk/gtkcontainer.c35
1 files changed, 5 insertions, 30 deletions
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index 9fb6d81d9e..c7218b155e 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -148,8 +148,8 @@ static void gtk_container_remove_unimplemented (GtkContainer *container
static void gtk_container_compute_expand (GtkWidget *widget,
gboolean *hexpand_p,
gboolean *vexpand_p);
-static void gtk_container_real_set_focus_child (GtkContainer *container,
- GtkWidget *widget);
+static void gtk_container_set_focus_child (GtkWidget *widget,
+ GtkWidget *focus_child);
static void gtk_container_children_callback (GtkWidget *widget,
gpointer client_data);
@@ -277,11 +277,11 @@ gtk_container_class_init (GtkContainerClass *class)
widget_class->destroy = gtk_container_destroy;
widget_class->compute_expand = gtk_container_compute_expand;
widget_class->get_request_mode = gtk_container_get_request_mode;
+ widget_class->set_focus_child = gtk_container_set_focus_child;
class->add = gtk_container_add_unimplemented;
class->remove = gtk_container_remove_unimplemented;
class->forall = NULL;
- class->set_focus_child = gtk_container_real_set_focus_child;
class->child_type = NULL;
class->get_path_for_child = gtk_container_real_get_path_for_child;
@@ -1538,31 +1538,6 @@ gtk_container_foreach (GtkContainer *container,
}
/**
- * gtk_container_set_focus_child:
- * @container: a #GtkContainer
- * @child: (allow-none): a #GtkWidget, or %NULL
- *
- * Sets, or unsets if @child is %NULL, the focused child of @container.
- *
- * This function emits the GtkContainer::set_focus_child signal of
- * @container. Implementations of #GtkContainer can override the
- * default behaviour by overriding the class closure of this signal.
- *
- * This is function is mostly meant to be used by widgets. Applications can use
- * gtk_widget_grab_focus() to manually set the focus to a specific widget.
- */
-void
-gtk_container_set_focus_child (GtkContainer *container,
- GtkWidget *child)
-{
- g_return_if_fail (GTK_IS_CONTAINER (container));
- if (child)
- g_return_if_fail (GTK_IS_WIDGET (child));
-
- GTK_CONTAINER_GET_CLASS (container)->set_focus_child (container, child);
-}
-
-/**
* gtk_container_get_children:
* @container: a #GtkContainer
*
@@ -1616,8 +1591,8 @@ gtk_container_compute_expand (GtkWidget *widget,
}
static void
-gtk_container_real_set_focus_child (GtkContainer *container,
- GtkWidget *focus_child)
+gtk_container_set_focus_child (GtkWidget *container,
+ GtkWidget *focus_child)
{
g_return_if_fail (GTK_IS_CONTAINER (container));
g_return_if_fail (focus_child == NULL || GTK_IS_WIDGET (focus_child));