diff --git a/gramps2/src/PlaceView.py b/gramps2/src/PlaceView.py index cc6ca6734..63541fd7e 100644 --- a/gramps2/src/PlaceView.py +++ b/gramps2/src/PlaceView.py @@ -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() diff --git a/gramps2/src/SourceView.py b/gramps2/src/SourceView.py index 1d169887c..db433fdf6 100644 --- a/gramps2/src/SourceView.py +++ b/gramps2/src/SourceView.py @@ -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