Fix initial sort value
svn: r1020
This commit is contained in:
parent
305917f9b3
commit
b7a0b76edc
@ -41,8 +41,8 @@ class Sorter:
|
|||||||
self.column_map = column_map
|
self.column_map = column_map
|
||||||
self.key = key
|
self.key = key
|
||||||
self.top_window = top_window
|
self.top_window = top_window
|
||||||
(self.col,self.sort) = GrampsCfg.get_sort_cols(self.key,0,GTK.SORT_DESCENDING)
|
(self.col,self.sort) = GrampsCfg.get_sort_cols(self.key,0,GTK.SORT_ASCENDING)
|
||||||
self.change_sort(0)
|
self.change_sort(self.col,0)
|
||||||
self.clist.connect('click-column',self.click)
|
self.clist.connect('click-column',self.click)
|
||||||
|
|
||||||
def sort_col(self):
|
def sort_col(self):
|
||||||
@ -86,16 +86,12 @@ class Sorter:
|
|||||||
(sort_col,arrow) = self.column_map[column]
|
(sort_col,arrow) = self.column_map[column]
|
||||||
except:
|
except:
|
||||||
return
|
return
|
||||||
|
|
||||||
for (i,a) in self.column_map:
|
for (i,a) in self.column_map:
|
||||||
if arrow != a:
|
if arrow != a:
|
||||||
a.hide()
|
a.hide()
|
||||||
arrow.show()
|
arrow.show()
|
||||||
|
|
||||||
self.clist.set_sort_column(sort_col)
|
|
||||||
self.clist.set_sort_type(self.sort)
|
|
||||||
|
|
||||||
self.sort_list()
|
|
||||||
|
|
||||||
if change:
|
if change:
|
||||||
if self.col == column:
|
if self.col == column:
|
||||||
if self.sort == GTK.SORT_DESCENDING:
|
if self.sort == GTK.SORT_DESCENDING:
|
||||||
@ -107,6 +103,12 @@ class Sorter:
|
|||||||
else:
|
else:
|
||||||
self.sort = GTK.SORT_ASCENDING
|
self.sort = GTK.SORT_ASCENDING
|
||||||
arrow.set(GTK.ARROW_DOWN,2)
|
arrow.set(GTK.ARROW_DOWN,2)
|
||||||
|
|
||||||
|
self.clist.set_sort_column(sort_col)
|
||||||
|
self.clist.set_sort_type(self.sort)
|
||||||
|
|
||||||
|
self.sort_list()
|
||||||
|
|
||||||
self.col = column
|
self.col = column
|
||||||
|
|
||||||
if len(self.clist.selection) > 1:
|
if len(self.clist.selection) > 1:
|
||||||
|
@ -1630,12 +1630,17 @@ class Gramps:
|
|||||||
GrampsCfg.save_last_file(name)
|
GrampsCfg.save_last_file(name)
|
||||||
self.gtop.get_widget("filter").set_text("")
|
self.gtop.get_widget("filter").set_text("")
|
||||||
|
|
||||||
|
self.statusbar.set_progress(1.0)
|
||||||
|
self.full_update()
|
||||||
|
|
||||||
person = self.db.getDefaultPerson()
|
person = self.db.getDefaultPerson()
|
||||||
if person:
|
if person:
|
||||||
self.active_person = person
|
self.active_person = person
|
||||||
|
elif self.person_list.rows > 0:
|
||||||
|
id = self.person_list.get_row_data(0)
|
||||||
|
self.active_person = self.db.getPerson(id)
|
||||||
|
|
||||||
self.statusbar.set_progress(1.0)
|
self.goto_active_person()
|
||||||
self.full_update()
|
|
||||||
self.statusbar.set_progress(0.0)
|
self.statusbar.set_progress(0.0)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user