diff --git a/ChangeLog b/ChangeLog index 67dce3f4f..3841080b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ 2006-10-09 Don Allingham + * src/Selectors/_SelectPerson.py: enable toggle button to display all + * src/glade/gramps.glade: add toggle button * src/Editors/_EditPerson.py: add person's name to title * src/RelLib/_Name.py: add empty check diff --git a/src/Selectors/_SelectPerson.py b/src/Selectors/_SelectPerson.py index 7e3e63550..ba3263ba9 100644 --- a/src/Selectors/_SelectPerson.py +++ b/src/Selectors/_SelectPerson.py @@ -65,19 +65,39 @@ class SelectPerson(ManagedWindow.ManagedWindow): self.db = dbstate.db self.glade = gtk.glade.XML(const.gladeFile,"select_person","gramps") self.plist = self.glade.get_widget('plist') + self.showall = self.glade.get_widget('showall') self.notebook = self.glade.get_widget('notebook') window = self.glade.get_widget('select_person') title_label = self.glade.get_widget('title') self.set_window(window,title_label,self.title) + + self.filter = filter + if self.filter: + self.showall.show() + + self.skip = skip + self.model = PeopleModel(self.db, (PeopleModel.FAST, filter), skip=skip) self.add_columns(self.plist) self.plist.set_model(self.model) + self.showall.connect('toggled',self.show_toggle) self.show() + def show_toggle(self, obj): + if obj.get_active(): + filt = None + else: + filt = self.filter + + self.model = PeopleModel(self.db, + (PeopleModel.FAST, filt), + skip=self.skip) + self.plist.set_model(self.model) + def build_menu_names(self,obj): return (self.title, None) diff --git a/src/glade/gramps.glade b/src/glade/gramps.glade index d5929e687..5e8c23d5c 100644 --- a/src/glade/gramps.glade +++ b/src/glade/gramps.glade @@ -2494,6 +2494,24 @@ True + + + + True + Show all + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + 0