diff options
Diffstat (limited to 'eel/eel-gtk-container.c')
-rw-r--r-- | eel/eel-gtk-container.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/eel/eel-gtk-container.c b/eel/eel-gtk-container.c index 247d7eb13..08056d979 100644 --- a/eel/eel-gtk-container.c +++ b/eel/eel-gtk-container.c @@ -77,7 +77,7 @@ eel_gtk_container_child_map (GtkContainer *container, g_return_if_fail (child->parent == GTK_WIDGET (container)); - if (GTK_WIDGET_VISIBLE (child) && !GTK_WIDGET_MAPPED (child)) { + if (gtk_widget_get_visible (child) && !gtk_widget_get_mapped (child)) { gtk_widget_map (child); } } @@ -103,7 +103,7 @@ eel_gtk_container_child_unmap (GtkContainer *container, g_return_if_fail (child->parent == GTK_WIDGET (container)); - if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_MAPPED (child)) { + if (gtk_widget_get_visible (child) && gtk_widget_get_mapped (child)) { gtk_widget_unmap (child); } } @@ -122,17 +122,22 @@ void eel_gtk_container_child_add (GtkContainer *container, GtkWidget *child) { + GtkWidget *widget; + g_return_if_fail (GTK_IS_CONTAINER (container)); g_return_if_fail (GTK_IS_WIDGET (child)); + + widget = GTK_WIDGET (container); - gtk_widget_set_parent (child, GTK_WIDGET (container)); + gtk_widget_set_parent (child, widget); - if (GTK_WIDGET_REALIZED (container)) { + if (gtk_widget_get_realized (widget)) { gtk_widget_realize (child); } - if (GTK_WIDGET_VISIBLE (container) && GTK_WIDGET_VISIBLE (child)) { - if (GTK_WIDGET_MAPPED (container)) { + if (gtk_widget_get_mapped (widget) + && gtk_widget_get_visible (child)) { + if (gtk_widget_get_mapped (widget)) { gtk_widget_map (child); } @@ -160,7 +165,7 @@ eel_gtk_container_child_remove (GtkContainer *container, g_return_if_fail (GTK_IS_WIDGET (child)); g_return_if_fail (child->parent == GTK_WIDGET (container)); - child_was_visible = GTK_WIDGET_VISIBLE (child); + child_was_visible = gtk_widget_get_visible (child); gtk_widget_unparent (child); |