4772: Not all Gramplets make sense on all views (filter gramplet on Gramplets View); changed to using navigation_type rather than category

svn: r17209
This commit is contained in:
Doug Blank
2011-04-22 14:24:14 +00:00
parent 665779695c
commit 7f0ded5673
5 changed files with 56 additions and 46 deletions

View File

@@ -418,7 +418,8 @@ class GrampsBar(gtk.Notebook):
for name in AVAILABLE_GRAMPLETS():
if name not in skip:
if (GET_AVAILABLE_GRAMPLETS(name)["navtypes"] == [] or
self.pageview.category in GET_AVAILABLE_GRAMPLETS(name)["navtypes"]):
self.pageview.navigation_type() in GET_AVAILABLE_GRAMPLETS(name)["navtypes"] or
self.pageview.navigation_type() is None):
gramplet_list.append((GET_AVAILABLE_GRAMPLETS(name)["tname"],
name))
gramplet_list.sort()