[epiphany] ephy-statusbar: avoid widget surgery hacks with newer GTK+s



commit c29cb6688dd71a282ac8079657076415ae3d05a8
Author: Xan Lopez <xan gnome org>
Date:   Tue Dec 8 17:53:11 2009 +0200

    ephy-statusbar: avoid widget surgery hacks with newer GTK+s
    
    Bug #602130

 src/ephy-statusbar.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/ephy-statusbar.c b/src/ephy-statusbar.c
index af2b234..b60c72e 100644
--- a/src/ephy-statusbar.c
+++ b/src/ephy-statusbar.c
@@ -161,13 +161,19 @@ ephy_statusbar_init (EphyStatusbar *t)
 
 	gtk_statusbar_set_has_resize_grip (gstatusbar, TRUE);
 
+#if GTK_CHECK_VERSION (2, 19, 1)
 	priv->hbox = gtk_hbox_new (FALSE, 4);
-
+#else
+	priv->hbox = gtk_statusbar_get_message_area (gstatusbar);
+#endif
 	priv->icon_container = gtk_hbox_new (FALSE, 4);
 	gtk_box_pack_start (GTK_BOX (priv->hbox), priv->icon_container,
 			    FALSE, FALSE, 0);
 	gtk_widget_show (priv->icon_container);
 
+#if GTK_CHECK_VERSION (2, 19, 1)
+	gtk_box_reorder_child (GTK_BOX (priv->hbox), priv->icon_container, 0);
+#else
 	/* Put the label in the hbox, and substitute the hbox into the frame */
 	g_object_ref (gstatusbar->label);
 	gtk_container_remove (GTK_CONTAINER (gstatusbar->frame), gstatusbar->label);
@@ -175,6 +181,7 @@ ephy_statusbar_init (EphyStatusbar *t)
 	g_object_unref (gstatusbar->label);
 	gtk_container_add (GTK_CONTAINER (gstatusbar->frame), priv->hbox);
 	gtk_widget_show (priv->hbox);
+#endif
 
 	/* Create security icon */
 	create_icon_frame (t,



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