[rhythmbox] stop using shell.get_ui_manager in various plugins



commit fd59a75af65ec309fb09d6fbd25a809a29fa9a10
Author: Jonathan Matthew <jonathan d14n org>
Date:   Thu Sep 29 09:23:11 2011 +1000

    stop using shell.get_ui_manager in various plugins

 plugins/context/ContextView.py |    4 ++--
 plugins/lyrics/lyrics.py       |    4 ++--
 plugins/sendto/sendto.py       |   12 +++++++-----
 3 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/plugins/context/ContextView.py b/plugins/context/ContextView.py
index a0d8711..ec8d3b8 100644
--- a/plugins/context/ContextView.py
+++ b/plugins/context/ContextView.py
@@ -92,7 +92,7 @@ class ContextView (GObject.GObject):
                         self.toggle_visibility, True)
         self.action_group = Gtk.ActionGroup(name='ContextPluginActions')
         self.action_group.add_toggle_actions([self.action])
-        uim = self.shell.get_ui_manager()
+        uim = self.shell.props.ui_manager
         uim.insert_action_group (self.action_group, 0)
         self.ui_id = uim.add_ui_from_string(context_ui)
         uim.ensure_update()
@@ -117,7 +117,7 @@ class ContextView (GObject.GObject):
 	self.websettings = None
 	self.buttons = None
 	self.top_five_list = None
-        uim = shell.get_ui_manager ()
+        uim = shell.props.ui_manager
         uim.remove_ui (self.ui_id)
         uim.remove_action_group (self.action_group)
 
diff --git a/plugins/lyrics/lyrics.py b/plugins/lyrics/lyrics.py
index 9d427eb..8850d8c 100644
--- a/plugins/lyrics/lyrics.py
+++ b/plugins/lyrics/lyrics.py
@@ -348,7 +348,7 @@ class LyricsDisplayPlugin(GObject.Object, Peas.Activatable):
 		self.action_group = Gtk.ActionGroup (name='SongLyricsPluginActions')
 		self.action_group.add_action_with_accel (self.action, "<control>L")
 		
-		uim = shell.get_ui_manager ()
+		uim = shell.props.ui_manager
 		uim.insert_action_group (self.action_group, 0)
 		self.ui_id = uim.add_ui_from_string (ui_str)
 		uim.ensure_update ()
@@ -365,7 +365,7 @@ class LyricsDisplayPlugin(GObject.Object, Peas.Activatable):
 	def do_deactivate (self):
 		shell = self.object
 			
-		uim = shell.get_ui_manager()
+		uim = shell.props.ui_manager
 		uim.remove_ui (self.ui_id)
 		uim.remove_action_group (self.action_group)
 
diff --git a/plugins/sendto/sendto.py b/plugins/sendto/sendto.py
index 4c6ddea..1fae589 100644
--- a/plugins/sendto/sendto.py
+++ b/plugins/sendto/sendto.py
@@ -61,15 +61,17 @@ class SendToPlugin (GObject.Object, Peas.Activatable):
 
         self.__action_group = Gtk.ActionGroup(name='SendToActionGroup')
         self.__action_group.add_action(self.__action)
-        shell.get_ui_manager().insert_action_group(self.__action_group, -1)
 
-        self.__ui_id = shell.get_ui_manager().add_ui_from_string(ui_definition)
+	uim = shell.props.ui_manager
+        uim.insert_action_group(self.__action_group, -1)
+        uim.add_ui_from_string(ui_definition)
 
     def do_deactivate(self):
 	shell = self.object
-        shell.get_ui_manager().remove_action_group(self.__action_group)
-        shell.get_ui_manager().remove_ui(self.__ui_id)
-        shell.get_ui_manager().ensure_update()
+	uim = shell.props.ui_manager
+        uim.remove_action_group(self.__action_group)
+        uim.remove_ui(self.__ui_id)
+        uim.ensure_update()
 
         del self.__action_group
         del self.__action



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