From d526d508ce5eca03befb89cfb39094e0f0d7f90d Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Fri, 2 Sep 2005 02:59:09 +0000 Subject: [PATCH] * src/Plugins.py: sort submenu entries properly svn: r5167 --- gramps2/ChangeLog | 1 + gramps2/src/Plugins.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 873dad643..6c220f1d8 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,4 +1,5 @@ 2005-09-01 Don Allingham + * src/Plugins.py: sort submenu entries properly * src/PeopleView.py: replace unique string with one already translated * src/gramps_main.py: replace unique string with one already translated * src/plugins/Ancestors.py: replace unique string with one already translated diff --git a/gramps2/src/Plugins.py b/gramps2/src/Plugins.py index 9225cf88c..b18032521 100644 --- a/gramps2/src/Plugins.py +++ b/gramps2/src/Plugins.py @@ -484,7 +484,7 @@ def build_report_menu(top_menu,callback): submenu.show() entry.set_submenu(submenu) lst = hash_data[key] - lst.sort() + lst.sort(by_menu_name) for name in lst: subentry = gtk.MenuItem("%s..." % name[2]) subentry.show() @@ -493,6 +493,9 @@ def build_report_menu(top_menu,callback): top_menu.set_submenu(report_menu) +def by_menu_name(a,b): + return cmp(a[2],b[2]) + #------------------------------------------------------------------------- # # build_tools_menu