From 36ac62e9813905344c916f1ca63d32dedcf73759 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sat, 23 Apr 2011 02:32:10 +0000 Subject: [PATCH] Limit gramplets showing on Gramplet View, and made add list faster svn: r17215 --- src/gui/widgets/grampletpane.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/gui/widgets/grampletpane.py b/src/gui/widgets/grampletpane.py index 1a3d77c78..9c5651b91 100644 --- a/src/gui/widgets/grampletpane.py +++ b/src/gui/widgets/grampletpane.py @@ -1369,12 +1369,8 @@ class GrampletPane(gtk.ScrolledWindow): if ag_menu: qr_menu = ag_menu.get_submenu() qr_menu = gtk.Menu() - names = [] - for name in AVAILABLE_GRAMPLETS(): - if (GET_AVAILABLE_GRAMPLETS(name)["navtypes"] == [] or - self.pageview.navigation_type() in GET_AVAILABLE_GRAMPLETS(name)["navtypes"] or - self.pageview.navigation_type() is None): - names.append(GET_AVAILABLE_GRAMPLETS(name)["tname"]) + names = [gplug.name for gplug in PLUGMAN.get_reg_gramplets() + if gplug.navtypes == []] names.sort() for name in names: add_menuitem(qr_menu, name, None, self.add_gramplet)