mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-02 16:25:47 -04:00
populate RHS with list of patches
This commit is contained in:
parent
87dc4f5e7a
commit
999fb83c92
1 changed files with 19 additions and 0 deletions
|
@ -101,6 +101,25 @@ 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)
|
||||||
|
|
||||||
|
# populate the RHS list with patch names
|
||||||
|
# yes, I learnt perl once.
|
||||||
|
patches = {}
|
||||||
|
for texture in self.textures.values():
|
||||||
|
for patch in texture.patches:
|
||||||
|
patches[patch.name] = 1
|
||||||
|
patches = patches.keys()
|
||||||
|
rhs = self.wTree.get_widget("all_patch_tree")
|
||||||
|
treestore = gtk.TreeStore(str)
|
||||||
|
patches.sort()
|
||||||
|
for name in patches:
|
||||||
|
treestore.append(None, [ name ])
|
||||||
|
column = gtk.TreeViewColumn('Patch name')
|
||||||
|
rhs.set_model(treestore)
|
||||||
|
rhs.append_column(column)
|
||||||
|
cell = gtk.CellRendererText()
|
||||||
|
column.pack_start(cell, False)
|
||||||
|
column.add_attribute(cell, "text", 0)
|
||||||
|
|
||||||
# set the progress bar up
|
# set the progress bar up
|
||||||
# by default we've "done" all the 1-patch textures
|
# by default we've "done" all the 1-patch textures
|
||||||
bar = self.wTree.get_widget("progressbar1")
|
bar = self.wTree.get_widget("progressbar1")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue