forked from AuroraMiddleware/gtk
widget: Implement show_all
Do what gtk_container_forall did: show_all all children, then the widget itself.
This commit is contained in:
parent
8a55a6975c
commit
b15b9e028f
@ -322,7 +322,6 @@ static gboolean gtk_container_focus_move (GtkContainer *container
|
||||
GtkDirectionType direction);
|
||||
static void gtk_container_children_callback (GtkWidget *widget,
|
||||
gpointer client_data);
|
||||
static void gtk_container_show_all (GtkWidget *widget);
|
||||
static gint gtk_container_draw (GtkWidget *widget,
|
||||
cairo_t *cr);
|
||||
static void gtk_container_snapshot (GtkWidget *widget,
|
||||
@ -463,7 +462,6 @@ gtk_container_class_init (GtkContainerClass *class)
|
||||
|
||||
widget_class->destroy = gtk_container_destroy;
|
||||
widget_class->compute_expand = gtk_container_compute_expand;
|
||||
widget_class->show_all = gtk_container_show_all;
|
||||
widget_class->snapshot = gtk_container_snapshot;
|
||||
widget_class->draw = gtk_container_draw;
|
||||
widget_class->map = gtk_container_map;
|
||||
@ -2991,18 +2989,6 @@ gtk_container_get_focus_hadjustment (GtkContainer *container)
|
||||
return hadjustment;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gtk_container_show_all (GtkWidget *widget)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_CONTAINER (widget));
|
||||
|
||||
gtk_container_foreach (GTK_CONTAINER (widget),
|
||||
(GtkCallback) gtk_widget_show_all,
|
||||
NULL);
|
||||
gtk_widget_show (widget);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
GtkWidget *child;
|
||||
int window_depth;
|
||||
|
@ -944,6 +944,22 @@ gtk_widget_real_snapshot (GtkWidget *widget,
|
||||
/* nothing to do here */
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_widget_real_show_all (GtkWidget *widget)
|
||||
{
|
||||
GtkWidget *p;
|
||||
|
||||
for (p = gtk_widget_get_first_child (widget);
|
||||
p != NULL;
|
||||
p = gtk_widget_get_next_sibling (p))
|
||||
{
|
||||
if (!GTK_IS_POPOVER (p))
|
||||
gtk_widget_show_all (p);
|
||||
}
|
||||
|
||||
gtk_widget_show (widget);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_widget_class_init (GtkWidgetClass *klass)
|
||||
{
|
||||
@ -992,7 +1008,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
|
||||
klass->activate_signal = 0;
|
||||
klass->dispatch_child_properties_changed = gtk_widget_dispatch_child_properties_changed;
|
||||
klass->show = gtk_widget_real_show;
|
||||
klass->show_all = gtk_widget_show;
|
||||
klass->show_all = gtk_widget_real_show_all;
|
||||
klass->hide = gtk_widget_real_hide;
|
||||
klass->map = gtk_widget_real_map;
|
||||
klass->unmap = gtk_widget_real_unmap;
|
||||
|
Loading…
Reference in New Issue
Block a user