From b39daf09b11be95185fff6cafa351ee4a140af5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Tue, 1 Apr 2014 12:00:10 +0200 Subject: [PATCH] 7572: Do not hide categorysidebar from Plugins Manager, do not try to restore hidden gramplets, typo on grampletbar (LOG.warning) --- gramps/gui/navigator.py | 5 ++++- gramps/gui/widgets/grampletbar.py | 2 +- gramps/gui/widgets/grampletpane.py | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gramps/gui/navigator.py b/gramps/gui/navigator.py index ef0741876..15caf2a84 100644 --- a/gramps/gui/navigator.py +++ b/gramps/gui/navigator.py @@ -237,7 +237,10 @@ class Navigator(object): self.merge_ids.append(mergeid) # Call the view_changed method for the active sidebar - sidebar = self.pages[self.notebook.get_current_page()][1] + try: + sidebar = self.pages[self.notebook.get_current_page()][1] + except IndexError: + return sidebar.view_changed(cat_num, view_num) def cb_view_clicked(self, radioaction, current, cat_num): diff --git a/gramps/gui/widgets/grampletbar.py b/gramps/gui/widgets/grampletbar.py index 064c467af..c677de5a1 100644 --- a/gramps/gui/widgets/grampletbar.py +++ b/gramps/gui/widgets/grampletbar.py @@ -291,7 +291,7 @@ class GrampletBar(Gtk.Notebook): gramplet = make_requested_gramplet(TabGramplet, self, all_opts, self.dbstate, self.uistate) if not gramplet: - LOG.warning("Problem creating ", gname) + LOG.warning("Problem creating '%s'", gname) return page_num = self.__add_tab(gramplet) diff --git a/gramps/gui/widgets/grampletpane.py b/gramps/gui/widgets/grampletpane.py index 271c136eb..6974288a1 100644 --- a/gramps/gui/widgets/grampletpane.py +++ b/gramps/gui/widgets/grampletpane.py @@ -173,6 +173,9 @@ def make_requested_gramplet(gui_class, pane, opts, dbstate, uistate): """ Make a GUI gramplet given its name. """ + if opts == None: + return None + if "name" in opts: name = opts["name"] if name in AVAILABLE_GRAMPLETS():