[rhythmbox] context: when being deactivated, don't remove the widget if hidden



commit 7a0d1ccbd01541a592c95b15f0b9bb02f152955a
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sun Jan 17 18:53:05 2010 +1000

    context: when being deactivated, don't remove the widget if hidden
    
    This fixes a few warnings/criticals when removing the plugin or quitting
    rhythmbox.

 plugins/context/context/ContextView.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/plugins/context/context/ContextView.py b/plugins/context/context/ContextView.py
index a5f77d2..8d19650 100644
--- a/plugins/context/context/ContextView.py
+++ b/plugins/context/context/ContextView.py
@@ -106,7 +106,9 @@ class ContextView (gobject.GObject):
         self.plugin = None
         self.top_five = None
         self.tab = None
-        shell.remove_widget (self.vbox, rb.SHELL_UI_LOCATION_RIGHT_SIDEBAR)
+        if self.visible:
+            shell.remove_widget (self.vbox, rb.SHELL_UI_LOCATION_RIGHT_SIDEBAR)
+            self.visible = False
         uim = shell.get_ui_manager ()
         uim.remove_ui (self.ui_id)
         uim.remove_action_group (self.action_group)



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