From 87a72111f7e9dc63abe9e5b7360e2aba68dcc3d3 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Fri, 28 Nov 2003 21:23:59 +0000 Subject: [PATCH] * src/PedView.py: add a '*' to the popup menu if the child has children svn: r2400 --- src/PedView.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/PedView.py b/src/PedView.py index c91d41f11..3b8f923cd 100644 --- a/src/PedView.py +++ b/src/PedView.py @@ -298,17 +298,23 @@ class PedigreeView: # button. The menu consists of the children of the current root # person of the tree. Attach a child to each menu item. - childlist = [] - for family in self.active_person.getFamilyList(): - for child in family.getChildList(): - childlist.append(child) + def find_children(p): + childlist = [] + for family in p.getFamilyList(): + for child in family.getChildList(): + childlist.append(child) + return childlist + childlist = find_children(self.active_person) if len(childlist) == 1: self.load_canvas(childlist[0]) elif len(childlist) > 1: myMenu = gtk.Menu() for child in childlist: - menuitem = gtk.MenuItem(GrampsCfg.nameof(child)) + cname = GrampsCfg.nameof(child) + if len(find_children(child)) > 0: + cname = cname + " *" + menuitem = gtk.MenuItem(cname) myMenu.append(menuitem) menuitem.set_data(_PERSON,child) menuitem.connect("activate",self.on_childmenu_changed)