[Xfce4-commits] <midori:master> Hide panel toolbooks when there is only a controls button in there
Christian Dywan
noreply at xfce.org
Fri Jan 8 01:46:01 CET 2010
Updating branch refs/heads/master
to 9db458ba9ce83992ff289cafde9b48538ed23ffa (commit)
from 317eefa1c8ad5b4e36ddab84dbdd7041b07e27e9 (commit)
commit 9db458ba9ce83992ff289cafde9b48538ed23ffa
Author: Christian Dywan <christian at twotoasts.de>
Date: Fri Jan 8 01:43:33 2010 +0100
Hide panel toolbooks when there is only a controls button in there
midori/midori-panel.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/midori/midori-panel.c b/midori/midori-panel.c
index 4f5c097..c927aef 100644
--- a/midori/midori-panel.c
+++ b/midori/midori-panel.c
@@ -986,11 +986,19 @@ midori_panel_set_current_page (MidoriPanel* panel,
if ((viewable = midori_panel_get_nth_page (panel, n)))
{
+ GtkWidget* toolbar;
+ GList* items;
const gchar* label;
if (!GTK_WIDGET_VISIBLE (viewable))
return;
+
gtk_notebook_set_current_page (GTK_NOTEBOOK (panel->toolbook), n);
+ toolbar = gtk_notebook_get_nth_page (GTK_NOTEBOOK (panel->toolbook), n);
+ items = gtk_container_get_children (GTK_CONTAINER (toolbar));
+ sokoke_widget_set_visible (panel->toolbook,
+ g_list_nth_data (items, 1) != NULL);
+ g_list_free (items);
gtk_notebook_set_current_page (GTK_NOTEBOOK (panel->notebook), n);
label = midori_viewable_get_label (MIDORI_VIEWABLE (viewable));
g_object_set (panel->toolbar_label, "label", label, NULL);
More information about the Xfce4-commits
mailing list