[gedit/gnome-3-0] quickopen: check that the filebrowser has registered the message bus
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/gnome-3-0] quickopen: check that the filebrowser has registered the message bus
- Date: Sun, 3 Jul 2011 16:49:28 +0000 (UTC)
commit 01d0682cb4c73fa3a8df0f653ba2f124e5da7eaa
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]