From 2ec9de511afcb02183067b57add81c919a8f8422 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 965e157eb..034c88f90 100644 --- a/gramps/plugins/gramplet/gramplet.gpr.py +++ b/gramps/plugins/gramplet/gramplet.gpr.py @@ -277,6 +277,7 @@ register(GRAMPLET, gramplet_title=_("gramplet|To Do"), version="1.0.0", gramps_target_version=MODULE_VERSION, + navtypes=["Dashboard"], ) register(GRAMPLET,