[totem] grilo: Fix removing custom title widget



commit bb95df84d405199c6bbb15dc2b47b5bfc7b4f43c
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Jan 17 00:03:53 2014 +0100

    grilo: Fix removing custom title widget

 src/plugins/grilo/totem-main-toolbar.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/grilo/totem-main-toolbar.c b/src/plugins/grilo/totem-main-toolbar.c
index 6e63e5a..544ad68 100644
--- a/src/plugins/grilo/totem-main-toolbar.c
+++ b/src/plugins/grilo/totem-main-toolbar.c
@@ -807,7 +807,7 @@ totem_main_toolbar_set_custom_title (TotemMainToolbar *bar,
       GtkWidget *custom = priv->custom_title;
 
       priv->custom_title = NULL;
-      gtk_widget_unparent (custom);
+      gtk_container_remove (GTK_CONTAINER (bar->priv->stack), custom);
     }
 
   if (title_widget != NULL)
@@ -819,6 +819,10 @@ totem_main_toolbar_set_custom_title (TotemMainToolbar *bar,
 
       update_toolbar_state (bar);
     }
+  else
+    {
+      gtk_stack_set_visible_child_name (GTK_STACK (bar->priv->stack), DEFAULT_PAGE);
+    }
 
   g_object_notify (G_OBJECT (bar), "custom-title");
 }


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