[gnome-music/freeze-break: 68/107] grilo: Connect signals to registry first before loading plugins



commit 14cc43fa91c6e238a679cee213e749845d5b2908
Author: Arnel A. Borja <arnelborja src gnome org>
Date:   Thu Sep 5 00:06:56 2013 +0800

    grilo: Connect signals to registry first before loading plugins

 gnomemusic/grilo.py |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gnomemusic/grilo.py b/gnomemusic/grilo.py
index e2c48d2..bc2129b 100644
--- a/gnomemusic/grilo.py
+++ b/gnomemusic/grilo.py
@@ -58,19 +58,19 @@ class Grilo(GObject.GObject):
         self.options.set_flags(Grl.ResolutionFlags.FULL |
                                Grl.ResolutionFlags.IDLE_RELAY)
 
-        self.registry = Grl.Registry.get_default()
-        try:
-            self.registry.load_all_plugins()
-        except GLib.GError:
-            print('Failed to load plugins.')
-
         self.sources = {}
         self.tracker = None
         self.filesystem = None
 
+        self.registry = Grl.Registry.get_default()
         self.registry.connect('source_added', self._on_source_added)
         self.registry.connect('source_removed', self._on_source_removed)
 
+        try:
+            self.registry.load_all_plugins()
+        except GLib.GError:
+            print('Failed to load plugins.')
+
     def _on_source_added(self, pluginRegistry, mediaSource):
         id = mediaSource.get_id()
         if id == 'grl-tracker-source':


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