From 1ad6634888fd6852e33f777236b68139e90a90db Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Tue, 12 Aug 2014 18:42:22 +0100 Subject: [PATCH] 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. --- gramps/gui/widgets/grampletpane.py | 3 ++- gramps/plugins/gramplet/gramplet.gpr.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gramps/gui/widgets/grampletpane.py b/gramps/gui/widgets/grampletpane.py index b4b31718a..de1f39250 100644 --- a/gramps/gui/widgets/grampletpane.py +++ b/gramps/gui/widgets/grampletpane.py @@ -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, diff --git a/gramps/plugins/gramplet/gramplet.gpr.py b/gramps/plugins/gramplet/gramplet.gpr.py index e264d9f71..52c0c0347 100644 --- a/gramps/plugins/gramplet/gramplet.gpr.py +++ b/gramps/plugins/gramplet/gramplet.gpr.py @@ -275,6 +275,7 @@ register(GRAMPLET, gramplet_title=_("gramplet|To Do"), version="1.0.0", gramps_target_version="4.1", + navtypes=["Dashboard"], ) register(GRAMPLET,