From 4968f9a9dea791db8a06baababe764d8ad0ba6f6 Mon Sep 17 00:00:00 2001 From: monsta Date: Tue, 14 Jul 2015 13:14:41 +0300 Subject: quickopen plugin: remove wrong version check inherited from gedit this should make quickopen dialog (Ctrl-Alt-O) recognize the files from the currently selected dir in filebrowser plugin. --- plugins/quickopen/quickopen/windowhelper.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/plugins/quickopen/quickopen/windowhelper.py b/plugins/quickopen/quickopen/windowhelper.py index dd1f8e90..57ec414f 100755 --- a/plugins/quickopen/quickopen/windowhelper.py +++ b/plugins/quickopen/quickopen/windowhelper.py @@ -88,23 +88,22 @@ class WindowHelper: paths.append(gfile.get_parent()) # File browser root directory - if pluma.version[0] > 2 or (pluma.version[0] == 2 and (pluma.version[1] > 26 or (pluma.version[1] == 26 and pluma.version[2] >= 2))): - bus = self._window.get_message_bus() + bus = self._window.get_message_bus() - try: - msg = bus.send_sync('/plugins/filebrowser', 'get_root') + try: + msg = bus.send_sync('/plugins/filebrowser', 'get_root') - if msg: - uri = msg.get_value('uri') + if msg: + uri = msg.get_value('uri') - if uri: - gfile = gio.File(uri) + if uri: + gfile = gio.File(uri) - if gfile.is_native(): - paths.append(gfile) + if gfile.is_native(): + paths.append(gfile) - except StandardError: - pass + except StandardError: + pass # Recent documents paths.append(RecentDocumentsDirectory(screen=self._window.get_screen())) -- cgit v1.2.1