a selected patch list at the bottom + handling of clicking on patches in rhs

This commit is contained in:
Jon Dowland 2008-01-29 23:40:35 +00:00
parent d39e8b00ba
commit 554baa539c
2 changed files with 34 additions and 3 deletions

View file

@ -44,8 +44,12 @@ class HellowWorldGTK:
def rhs_callback(self, rhs):
offs,col = rhs.get_cursor()
row = rhs.get_model()[offs[0]][0]
model = rhs.get_model()
row = model[offs[0]][0]
selected_patches = self.wTree.get_widget("selected_patches")
model.append(None, [ row ])
print row
print type(model)
def set_texture(self, name):
# parse the example texture, fetch the width,height;
@ -106,6 +110,16 @@ class HellowWorldGTK:
column.add_attribute(cell, "text", 0)
lhs.connect("cursor-changed", self.lhs_callback)
# prepare the patch list
patch_list = self.wTree.get_widget("selected_patches")
treestore = gtk.TreeStore(str)
column = gtk.TreeViewColumn('Patch name')
patch_list.set_model(treestore)
patch_list.append_column(column)
cell = gtk.CellRendererText()
column.pack_start(cell, False)
column.add_attribute(cell, "text", 0)
# populate the RHS list with patch names
# yes, I learnt perl once.
patches = {}