Allow gramplets to be displayed in the dashboard only

Add a new navigation type of 'Dashboard' in gramplet definitions.
Define the dashboard To Do gramplet to be dashboard-only.
This commit is contained in:
Nick Hall 2014-08-12 18:42:22 +01:00
parent 9eacd472da
commit 1ad6634888
2 changed files with 3 additions and 1 deletions

View File

@ -1429,7 +1429,8 @@ class GrampletPane(Gtk.ScrolledWindow):
qr_menu = ag_menu.get_submenu()
qr_menu = Gtk.Menu()
names = [gplug.name for gplug in PLUGMAN.get_reg_gramplets()
if gplug.navtypes == []]
if gplug.navtypes == []
or 'Dashboard' in gplug.navtypes]
names.sort()
for name in names:
add_menuitem(qr_menu, name, None,

View File

@ -275,6 +275,7 @@ register(GRAMPLET,
gramplet_title=_("gramplet|To Do"),
version="1.0.0",
gramps_target_version="4.1",
navtypes=["Dashboard"],
)
register(GRAMPLET,