[epiphany] EphyEmbed: reset the alignment of the statusbar when hidden



commit b0772af83253244ab94f8842d35ea3bda830bd27
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Thu Dec 15 20:23:27 2011 +0200

    EphyEmbed: reset the alignment of the statusbar when hidden
    
    So that it shows to the left by default. The double get_parent()
    is ugly and we should probably hide the implementation details
    of the statusbar in a separate class.

 embed/ephy-embed.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index 3ae0b01..d7366cc 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -436,9 +436,10 @@ _ephy_embed_set_statusbar_label (EphyEmbed *embed, const char *label)
   if (parent == NULL)
     return;
 
-  if (label == NULL || label[0] == '\0')
+  if (label == NULL || label[0] == '\0') {
     gtk_widget_hide (parent);
-  else
+    gtk_widget_set_halign (gtk_widget_get_parent (parent), GTK_ALIGN_START);
+  } else
     gtk_widget_show (parent);
 }
 



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