3706: GRAMPS plugins selecting a local path produces an error

svn: r14848
This commit is contained in:
Benny Malengier 2010-03-16 08:54:35 +00:00
parent fee41a2cde
commit fbf86b4c2f

View File

@ -350,7 +350,10 @@ class PluginStatus(ManagedWindow.ManagedWindow):
scrolled_window.add(self.addon_list) scrolled_window.add(self.addon_list)
install_page.pack_start(scrolled_window) 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 = gtk.HButtonBox()
hbutbox.set_layout(gtk.BUTTONBOX_SPREAD) hbutbox.set_layout(gtk.BUTTONBOX_SPREAD)
@ -606,8 +609,14 @@ class PluginStatus(ManagedWindow.ManagedWindow):
gtk.RESPONSE_CANCEL, gtk.RESPONSE_CANCEL,
gtk.STOCK_OPEN, gtk.STOCK_OPEN,
gtk.RESPONSE_OK)) gtk.RESPONSE_OK))
name = os.path.abspath(self.install_addon_path.get_text()) name = self.install_addon_path.get_text()
fcd.set_current_name(name) 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: if name:
fcd.set_filename(name) fcd.set_filename(name)