[rhythmbox] source-header: reset state properly when there's no source (bug #605038)



commit 3b9cb9ea380d1403249c2490293602c4ecb1c5d7
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sun Dec 20 15:45:14 2009 +1000

    source-header: reset state properly when there's no source (bug #605038)
    
    When there's no selected source (such as when showing visualization in
    the main window), none of the source header should be modifiable.
    Notably, the browser toggle remains visible since it's in the toolbar.

 shell/rb-source-header.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/shell/rb-source-header.c b/shell/rb-source-header.c
index ca77a50..7f5fa01 100644
--- a/shell/rb-source-header.c
+++ b/shell/rb-source-header.c
@@ -532,6 +532,11 @@ rb_source_header_set_source_internal (RBSourceHeader *header,
 	} else {
 		/* no selected source -> hide source header */
 		gtk_widget_hide (GTK_WIDGET (header));
+		header->priv->have_browser = FALSE;
+		header->priv->disclosed = FALSE;
+
+		g_free (header->priv->browser_key);
+		header->priv->browser_key = NULL;
 	}
 
 	rb_source_header_refresh_search_bar (header);



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