[rhythmbox] shell: sync ViewStatusbar action state along with statusbar (bug #611772)



commit 9a75a94d837ddc10ca25acc5c2bed70ebe738cd3
Author: Ricardo Cruz <rpmcruz alunos dcc fc up pt>
Date:   Thu Mar 4 22:05:43 2010 +1000

    shell: sync ViewStatusbar action state along with statusbar (bug #611772)

 shell/rb-shell.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/shell/rb-shell.c b/shell/rb-shell.c
index e09e3e6..5906186 100644
--- a/shell/rb-shell.c
+++ b/shell/rb-shell.c
@@ -2584,10 +2584,16 @@ rb_shell_sync_smalldisplay (RBShell *shell)
 static void
 rb_shell_sync_statusbar_visibility (RBShell *shell)
 {
-	if (shell->priv->statusbar_hidden || shell->priv->window_small)
-		gtk_widget_hide (GTK_WIDGET (shell->priv->statusbar));
-	else
-		gtk_widget_show (GTK_WIDGET (shell->priv->statusbar));
+	gboolean visible;
+	GtkAction *action;
+
+	visible = !shell->priv->statusbar_hidden;
+
+	action = gtk_action_group_get_action (shell->priv->actiongroup, "ViewStatusbar");
+	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), visible);
+
+	gtk_widget_set_visible (GTK_WIDGET (shell->priv->statusbar),
+				visible && !shell->priv->window_small);
 }
 
 static void



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