[gedit] quickopen: check that the filebrowser has registered the message bus



commit 8f3b24117ef83e53d52b792bca7b79a68d4758e9
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Sun Jul 3 13:37:31 2011 +0200

    quickopen: check that the filebrowser has registered the message bus
    
    This avoids a warning when trying to use quickopen without filebrowser

 plugins/quickopen/quickopen/__init__.py |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/plugins/quickopen/quickopen/__init__.py b/plugins/quickopen/quickopen/__init__.py
index e1d75aa..4844cca 100644
--- a/plugins/quickopen/quickopen/__init__.py
+++ b/plugins/quickopen/quickopen/__init__.py
@@ -92,7 +92,7 @@ class QuickOpenPlugin(GObject.Object, Gedit.WindowActivatable):
         # File browser root directory
         bus = self.window.get_message_bus()
 
-        try:
+        if bus.is_registered('/plugins/filebrowser', 'get_root'):
             msg = bus.send_sync('/plugins/filebrowser', 'get_root')
 
             if msg:
@@ -101,9 +101,6 @@ class QuickOpenPlugin(GObject.Object, Gedit.WindowActivatable):
                 if gfile and gfile.is_native():
                     paths.append(gfile)
 
-        except StandardError as e:
-            print e
-
         # Recent documents
         paths.append(RecentDocumentsDirectory())
 



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