mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-02 07:25:45 -04:00
select the top-most texture in the lhs on start
This commit is contained in:
parent
6463348d3f
commit
361270d89a
1 changed files with 4 additions and 2 deletions
|
@ -38,6 +38,7 @@ class HellowWorldGTK:
|
||||||
|
|
||||||
def lhs_callback(self, treeview):
|
def lhs_callback(self, treeview):
|
||||||
offs,col = treeview.get_cursor()
|
offs,col = treeview.get_cursor()
|
||||||
|
print offs
|
||||||
# TODO: sanity check the insane subscripting here
|
# TODO: sanity check the insane subscripting here
|
||||||
row = treeview.get_model()[offs[0]][0]
|
row = treeview.get_model()[offs[0]][0]
|
||||||
self.set_texture(row)
|
self.set_texture(row)
|
||||||
|
@ -113,6 +114,9 @@ class HellowWorldGTK:
|
||||||
column.add_attribute(cell, "text", 0)
|
column.add_attribute(cell, "text", 0)
|
||||||
lhs.connect("cursor-changed", self.lhs_callback)
|
lhs.connect("cursor-changed", self.lhs_callback)
|
||||||
|
|
||||||
|
# select the top-most item
|
||||||
|
lhs.set_cursor( (0,) , None, False)
|
||||||
|
|
||||||
# prepare the patch list
|
# prepare the patch list
|
||||||
patch_list = self.wTree.get_widget("selected_patches")
|
patch_list = self.wTree.get_widget("selected_patches")
|
||||||
treestore = gtk.TreeStore(str)
|
treestore = gtk.TreeStore(str)
|
||||||
|
@ -150,8 +154,6 @@ class HellowWorldGTK:
|
||||||
bar.set_fraction(float(done) / len(self.textures))
|
bar.set_fraction(float(done) / len(self.textures))
|
||||||
bar.set_text("%d/%d" % (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("window1").connect("destroy", gtk.main_quit)
|
||||||
self.wTree.get_widget("quit_menu_item").connect("activate", gtk.main_quit)
|
self.wTree.get_widget("quit_menu_item").connect("activate", gtk.main_quit)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue