* src/PlaceView.py: select correct column for sorting
* src/SourceView.py: select correct column for sorting svn: r4605
This commit is contained in:
parent
41fef8d7d6
commit
a662f3717b
@ -1,4 +1,6 @@
|
||||
2005-05-16 Don Allingham <don@gramps-project.org>
|
||||
* src/PlaceView.py: select correct column for sorting
|
||||
* src/SourceView.py: select correct column for sorting
|
||||
* src/WriteGedcom.py: used 'replace' mode on iso-8859-1 string
|
||||
encoding conversion
|
||||
|
||||
|
@ -101,13 +101,16 @@ class PlaceView:
|
||||
self.model = DisplayModels.PlaceModel(self.parent.db,
|
||||
self.sort_col,order)
|
||||
self.list.set_model(self.model)
|
||||
|
||||
colmap = self.parent.db.get_place_column_order()
|
||||
|
||||
if handle:
|
||||
path = self.model.on_get_path(handle)
|
||||
self.selection.select_path(path)
|
||||
self.list.scroll_to_cell(path,None,1,0.5,0)
|
||||
for i in range(0,len(self.columns)):
|
||||
self.columns[i].set_sort_indicator(i==data)
|
||||
self.columns[data].set_sort_order(order)
|
||||
self.columns[i].set_sort_indicator(i==colmap[data][1]-1)
|
||||
self.columns[self.sort_col].set_sort_order(order)
|
||||
|
||||
def build_columns(self):
|
||||
for column in self.columns:
|
||||
@ -121,6 +124,7 @@ class PlaceView:
|
||||
self.list.append_column(column)
|
||||
self.columns = [column]
|
||||
|
||||
index = 1
|
||||
for pair in self.parent.db.get_place_column_order():
|
||||
if not pair[0]:
|
||||
continue
|
||||
@ -129,7 +133,8 @@ class PlaceView:
|
||||
column.set_resizable(True)
|
||||
column.set_min_width(75)
|
||||
column.set_clickable(True)
|
||||
column.connect('clicked',self.column_clicked,pair[1])
|
||||
column.connect('clicked',self.column_clicked,index)
|
||||
index += 1
|
||||
self.columns.append(column)
|
||||
self.list.append_column(column)
|
||||
|
||||
|
@ -99,13 +99,15 @@ class SourceView:
|
||||
self.model = DisplayModels.SourceModel(self.parent.db,
|
||||
self.sort_col,order)
|
||||
self.list.set_model(self.model)
|
||||
colmap = self.parent.db.get_place_column_order()
|
||||
|
||||
if handle:
|
||||
path = self.model.on_get_path(handle)
|
||||
self.selection.select_path(path)
|
||||
self.list.scroll_to_cell(path,None,1,0.5,0)
|
||||
for i in range(0,len(self.columns)):
|
||||
self.columns[i].set_sort_indicator(i==data)
|
||||
self.columns[data].set_sort_order(order)
|
||||
self.columns[i].set_sort_indicator(i==colmap[data][1]-1)
|
||||
self.columns[self.sort_col].set_sort_order(order)
|
||||
|
||||
def build_columns(self):
|
||||
for column in self.columns:
|
||||
@ -125,7 +127,7 @@ class SourceView:
|
||||
continue
|
||||
name = column_names[pair[1]]
|
||||
column = gtk.TreeViewColumn(name, self.renderer, text=pair[1])
|
||||
column.connect('clicked',self.column_clicked,pair[1])
|
||||
column.connect('clicked',self.column_clicked,index)
|
||||
column.set_resizable(True)
|
||||
column.set_min_width(75)
|
||||
column.set_clickable(True)
|
||||
|
Loading…
Reference in New Issue
Block a user