From 516d836ea0df1c65a62ae75e1ab6ca6315c4c640 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Mon, 9 Oct 2006 23:04:52 +0000 Subject: [PATCH] * src/Selectors/_SelectPerson.py: enable toggle button to display all * src/glade/gramps.glade: add toggle button svn: r7379 --- gramps2/ChangeLog | 2 ++ gramps2/src/Selectors/_SelectPerson.py | 20 ++++++++++++++++++++ gramps2/src/glade/gramps.glade | 18 ++++++++++++++++++ 3 files changed, 40 insertions(+) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 67dce3f4f..3841080b9 100644 --- a/gramps2/ChangeLog +++ b/gramps2/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/gramps2/src/Selectors/_SelectPerson.py b/gramps2/src/Selectors/_SelectPerson.py index 7e3e63550..ba3263ba9 100644 --- a/gramps2/src/Selectors/_SelectPerson.py +++ b/gramps2/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/gramps2/src/glade/gramps.glade b/gramps2/src/glade/gramps.glade index d5929e687..5e8c23d5c 100644 --- a/gramps2/src/glade/gramps.glade +++ b/gramps2/src/glade/gramps.glade @@ -2494,6 +2494,24 @@ True + + + + True + Show all + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + 0