* src/Selectors/_SelectPerson.py: enable toggle button to display all

* src/glade/gramps.glade: add toggle button


svn: r7379
This commit is contained in:
Don Allingham 2006-10-09 23:04:52 +00:00
parent 4cb0b4c919
commit 516d836ea0
3 changed files with 40 additions and 0 deletions

View File

@ -1,4 +1,6 @@
2006-10-09 Don Allingham <don@gramps-project.org> 2006-10-09 Don Allingham <don@gramps-project.org>
* 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/Editors/_EditPerson.py: add person's name to title
* src/RelLib/_Name.py: add empty check * src/RelLib/_Name.py: add empty check

View File

@ -65,19 +65,39 @@ class SelectPerson(ManagedWindow.ManagedWindow):
self.db = dbstate.db self.db = dbstate.db
self.glade = gtk.glade.XML(const.gladeFile,"select_person","gramps") self.glade = gtk.glade.XML(const.gladeFile,"select_person","gramps")
self.plist = self.glade.get_widget('plist') self.plist = self.glade.get_widget('plist')
self.showall = self.glade.get_widget('showall')
self.notebook = self.glade.get_widget('notebook') self.notebook = self.glade.get_widget('notebook')
window = self.glade.get_widget('select_person') window = self.glade.get_widget('select_person')
title_label = self.glade.get_widget('title') title_label = self.glade.get_widget('title')
self.set_window(window,title_label,self.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, self.model = PeopleModel(self.db,
(PeopleModel.FAST, filter), (PeopleModel.FAST, filter),
skip=skip) skip=skip)
self.add_columns(self.plist) self.add_columns(self.plist)
self.plist.set_model(self.model) self.plist.set_model(self.model)
self.showall.connect('toggled',self.show_toggle)
self.show() 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): def build_menu_names(self,obj):
return (self.title, None) return (self.title, None)

View File

@ -2494,6 +2494,24 @@
<property name="fill">True</property> <property name="fill">True</property>
</packing> </packing>
</child> </child>
<child>
<widget class="GtkCheckButton" id="showall">
<property name="can_focus">True</property>
<property name="label" translatable="yes">Show all</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget> </widget>
<packing> <packing>
<property name="padding">0</property> <property name="padding">0</property>