[gnome-photos] header-bar: Fix regressions after move to GtkHeaderBar
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] header-bar: Fix regressions after move to GtkHeaderBar
- Date: Tue, 30 Jul 2013 05:51:40 +0000 (UTC)
commit 481b810714f838aa892e3998859162bd5622c05e
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Jul 30 01:11:36 2013 +0200
header-bar: Fix regressions after move to GtkHeaderBar
Unlike its Gd counterpart, GtkHeaderBar does not consider the
custom_title widget as an internal child. Hence it is exposed in
gtk_container_get_children, and is affected by gtk_widget_show_all
being applied to the header bar.
Ensure that the stack_switcher is not destroyed when the header bar
is cleared. Also, it should not be affected by show_all, otherwise
buttons corresponding to private children might show up.
src/photos-header-bar.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-header-bar.c b/src/photos-header-bar.c
index 5001f80..6e87961 100644
--- a/src/photos-header-bar.c
+++ b/src/photos-header-bar.c
@@ -74,6 +74,8 @@ photos_header_bar_init (PhotosHeaderBar *self)
priv = self->priv;
priv->stack_switcher = g_object_ref_sink (gtk_stack_switcher_new ());
+ gtk_widget_show (priv->stack_switcher);
+ gtk_widget_set_no_show_all (priv->stack_switcher, TRUE);
}
@@ -103,7 +105,9 @@ photos_header_bar_clear (PhotosHeaderBar *self)
GList *children;
GList *l;
- photos_header_bar_set_mode (self, PHOTOS_HEADER_BAR_MODE_NORMAL);
+ self->priv->mode = PHOTOS_HEADER_BAR_MODE_NONE;
+ gtk_header_bar_set_custom_title (GTK_HEADER_BAR (self), NULL);
+
children = gtk_container_get_children (GTK_CONTAINER (self));
for (l = children; l != NULL; l = l->next)
gtk_widget_destroy (GTK_WIDGET (l->data));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]