* src/SourceView.py: handle column sorting properly
* src/PlaceView.py: handle column sorting properly svn: r2740
This commit is contained in:
parent
ef4419b8a0
commit
6080ab594e
@ -83,8 +83,11 @@ class PlaceView:
|
||||
column.set_visible(gtk.TRUE)
|
||||
column.set_sort_column_id(title[1])
|
||||
column.set_min_width(title[2])
|
||||
column.connect('clicked',self.on_click)
|
||||
self.list.append_column(column)
|
||||
|
||||
self.click_col = None
|
||||
|
||||
self.model = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING,
|
||||
gobject.TYPE_STRING, gobject.TYPE_STRING,
|
||||
gobject.TYPE_STRING, gobject.TYPE_STRING,
|
||||
@ -97,6 +100,9 @@ class PlaceView:
|
||||
self.list.connect('button-press-event',self.button_press)
|
||||
self.topWindow = self.glade.get_widget("gramps")
|
||||
|
||||
def on_click(self,column):
|
||||
self.click_col = column
|
||||
|
||||
def change_db(self,db):
|
||||
self.db = db
|
||||
|
||||
@ -127,6 +133,8 @@ class PlaceView:
|
||||
12, val[12]
|
||||
)
|
||||
self.list.set_model(self.model)
|
||||
if self.click_col:
|
||||
self.click_col.clicked()
|
||||
|
||||
def goto(self,id):
|
||||
self.selection.unselect_all()
|
||||
|
@ -83,14 +83,20 @@ class SourceView:
|
||||
column.set_visible(gtk.TRUE)
|
||||
column.set_sort_column_id(title[1])
|
||||
column.set_min_width(title[2])
|
||||
column.connect('clicked',self.on_click)
|
||||
self.list.append_column(column)
|
||||
|
||||
self.click_col = None
|
||||
|
||||
self.model = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING,
|
||||
gobject.TYPE_STRING, gobject.TYPE_STRING,
|
||||
gobject.TYPE_STRING)
|
||||
self.list.set_model(self.model)
|
||||
self.topWindow = self.glade.get_widget("gramps")
|
||||
|
||||
def on_click(self,column):
|
||||
self.click_col = column
|
||||
|
||||
def change_db(self,db):
|
||||
self.db = db
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user