From 21e99eb292cabd5f46d9ac4633ee79f52d7baa7e Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Tue, 16 Mar 2010 08:54:38 +0000 Subject: [PATCH] 3706: GRAMPS plugins selecting a local path produces an error svn: r14849 --- src/PluginUtils/_PluginWindows.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/PluginUtils/_PluginWindows.py b/src/PluginUtils/_PluginWindows.py index 8f9cb1803..a06941518 100644 --- a/src/PluginUtils/_PluginWindows.py +++ b/src/PluginUtils/_PluginWindows.py @@ -350,7 +350,10 @@ class PluginStatus(ManagedWindow.ManagedWindow): scrolled_window.add(self.addon_list) install_page.pack_start(scrolled_window) - install_page.pack_start(install_row, expand=True, fill=False) + #add some spce under the scrollbar + install_page.pack_start(gtk.Label(''), expand=False, fill=False) + #path to addon path line + install_page.pack_start(install_row, expand=False, fill=False) hbutbox = gtk.HButtonBox() hbutbox.set_layout(gtk.BUTTONBOX_SPREAD) @@ -606,8 +609,14 @@ class PluginStatus(ManagedWindow.ManagedWindow): gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN, gtk.RESPONSE_OK)) - name = os.path.abspath(self.install_addon_path.get_text()) - fcd.set_current_name(name) + name = self.install_addon_path.get_text() + dir = os.path.dirname(name) + if not os.path.isdir(dir): + dir = const.USER_HOME + name = '' + elif not os.path.isfile(name): + name = '' + fcd.set_current_folder(dir) if name: fcd.set_filename(name)