From 361270d89ad7cf9ff8acdccf2f704b9cb6831d23 Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Fri, 1 Feb 2008 20:34:19 +0000 Subject: [PATCH] select the top-most texture in the lhs on start --- tools/cleanroom/tmp_cleanui.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/cleanroom/tmp_cleanui.py b/tools/cleanroom/tmp_cleanui.py index 73c0acf6..a50d9700 100644 --- a/tools/cleanroom/tmp_cleanui.py +++ b/tools/cleanroom/tmp_cleanui.py @@ -38,6 +38,7 @@ class HellowWorldGTK: def lhs_callback(self, treeview): offs,col = treeview.get_cursor() + print offs # TODO: sanity check the insane subscripting here row = treeview.get_model()[offs[0]][0] self.set_texture(row) @@ -113,6 +114,9 @@ class HellowWorldGTK: column.add_attribute(cell, "text", 0) lhs.connect("cursor-changed", self.lhs_callback) + # select the top-most item + lhs.set_cursor( (0,) , None, False) + # prepare the patch list patch_list = self.wTree.get_widget("selected_patches") treestore = gtk.TreeStore(str) @@ -150,8 +154,6 @@ class HellowWorldGTK: bar.set_fraction(float(done) / len(self.textures)) bar.set_text("%d/%d" % (done, len(self.textures))) - self.set_texture(tmp_texnames[0]) - self.wTree.get_widget("window1").connect("destroy", gtk.main_quit) self.wTree.get_widget("quit_menu_item").connect("activate", gtk.main_quit)