diff options
author | Matt Wilson <msw@redhat.com> | 2001-10-19 03:28:50 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2001-10-19 03:28:50 +0000 |
commit | af88b7fed9bc7a24194108688cb3b3db65716b98 (patch) | |
tree | 32aea983c8b0201e7b6b2aaff6ecd42bbe71b0da /iw | |
parent | c2c9c9d1dca8cc5e65840b2dce67287a5de72677 (diff) | |
download | anaconda-af88b7fed9bc7a24194108688cb3b3db65716b98.tar.gz anaconda-af88b7fed9bc7a24194108688cb3b3db65716b98.tar.xz anaconda-af88b7fed9bc7a24194108688cb3b3db65716b98.zip |
set cursor instead of hack
Diffstat (limited to 'iw')
-rw-r--r-- | iw/timezone_map_gui.py | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/iw/timezone_map_gui.py b/iw/timezone_map_gui.py index 1fd0ec19d..b43109680 100644 --- a/iw/timezone_map_gui.py +++ b/iw/timezone_map_gui.py @@ -101,7 +101,6 @@ class TimezoneMap(gtk.VBox): self.listStore.set_sort_column_id(self.columns.TZ, gtk.SORT_ASCENDING) self.listView = gtk.TreeView(self.listStore) - self.listView.connect("size-allocate", self.listScroll) selection = self.listView.get_selection() selection.connect("changed", self.selectionChanged) self.listView.set_property("headers-visible", gtk.FALSE) @@ -130,17 +129,6 @@ class TimezoneMap(gtk.VBox): tz = self.listStore.get_value(iter, self.columns.TZ) self.setCurrent(self.zonetab.findEntryByTZ(tz), skipList=1) - def listScroll(self, widget, *args): - # recenter the list - rc = self.listView.get_selection().get_selected() - if rc is None: - return - model, iter = rc - - path = self.listStore.get_path(iter) - col = self.listView.get_column(0) - self.listView.scroll_to_cell(path, col, gtk.TRUE, 0.5, 0.5) - def mapEvent(self, widget, event=None): if event.type == gtk.gdk.MOTION_NOTIFY: x1, y1 = self.canvas.root().w2i(event.x, event.y) @@ -182,6 +170,7 @@ class TimezoneMap(gtk.VBox): selection.select_iter(iter) path = self.listStore.get_path(iter) col = self.listView.get_column(0) + self.listView.set_cursor(path, col, gtk.FALSE) self.listView.scroll_to_cell(path, col, gtk.TRUE, 0.5, 0.5) break next = self.listStore.iter_next(iter) |