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 75f62ea5b9
commit 2ec9de511a
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

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