Sort by gender
svn: r544
This commit is contained in:
parent
24b0a0a4c7
commit
625059bf44
@ -979,16 +979,73 @@
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<class>GtkHBox</class>
|
||||
<child_name>CList:title</child_name>
|
||||
<name>label5</name>
|
||||
<label>Gender</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<name>hbox67</name>
|
||||
<homogeneous>True</homogeneous>
|
||||
<spacing>0</spacing>
|
||||
|
||||
<widget>
|
||||
<class>GtkHBox</class>
|
||||
<child_name>CList:title</child_name>
|
||||
<name>hbox68</name>
|
||||
<homogeneous>True</homogeneous>
|
||||
<spacing>0</spacing>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>False</fill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkHBox</class>
|
||||
<name>hbox69</name>
|
||||
<homogeneous>False</homogeneous>
|
||||
<spacing>0</spacing>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>False</fill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<child_name>CList:title</child_name>
|
||||
<name>label292</name>
|
||||
<label>Gender</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>False</fill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkArrow</class>
|
||||
<name>genderSort</name>
|
||||
<width>10</width>
|
||||
<height>10</height>
|
||||
<visible>False</visible>
|
||||
<arrow_type>GTK_ARROW_DOWN</arrow_type>
|
||||
<shadow_type>GTK_SHADOW_OUT</shadow_type>
|
||||
<xalign>0.5</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<child>
|
||||
<padding>5</padding>
|
||||
<expand>False</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
|
@ -105,6 +105,7 @@ notebook = None
|
||||
person_list = None
|
||||
database = None
|
||||
nameArrow = None
|
||||
genderArrow = None
|
||||
idArrow = None
|
||||
deathArrow = None
|
||||
dateArrow = None
|
||||
@ -733,6 +734,8 @@ def on_person_list_click_column(obj,column):
|
||||
change_sort(5,nameArrow)
|
||||
elif column == 1:
|
||||
change_sort(1,idArrow)
|
||||
elif column == 2:
|
||||
change_sort(2,genderArrow)
|
||||
elif column == 3:
|
||||
change_sort(6,dateArrow)
|
||||
elif column == 4:
|
||||
@ -754,7 +757,7 @@ def change_sort(column,arrow):
|
||||
global sort_direct
|
||||
global sort_column
|
||||
|
||||
for a in [ nameArrow, deathArrow, dateArrow, idArrow ]:
|
||||
for a in [ nameArrow, genderArrow, deathArrow, dateArrow, idArrow ]:
|
||||
if arrow != a:
|
||||
a.hide()
|
||||
arrow.show()
|
||||
@ -1850,7 +1853,7 @@ def main(arg):
|
||||
global statusbar,notebook
|
||||
global person_list
|
||||
global topWindow, preview, merge_button
|
||||
global nameArrow, dateArrow, deathArrow, idArrow
|
||||
global nameArrow, dateArrow, deathArrow, idArrow, genderArrow
|
||||
global cNameArrow, cDateArrow
|
||||
|
||||
rc_parse(const.gtkrcFile)
|
||||
@ -1874,6 +1877,7 @@ def main(arg):
|
||||
filter_list = gtop.get_widget("filter_list")
|
||||
notebook = gtop.get_widget(NOTEBOOK)
|
||||
nameArrow = gtop.get_widget("nameSort")
|
||||
genderArrow = gtop.get_widget("genderSort")
|
||||
idArrow = gtop.get_widget("idSort")
|
||||
dateArrow = gtop.get_widget("dateSort")
|
||||
deathArrow = gtop.get_widget("deathSort")
|
||||
|
Loading…
Reference in New Issue
Block a user