From 554baa539c3e88af2ebf681cde1d9a93e54a3fa3 Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Tue, 29 Jan 2008 23:40:35 +0000 Subject: [PATCH] a selected patch list at the bottom + handling of clicking on patches in rhs --- tools/cleanroom/cleanroom.glade | 21 +++++++++++++++++++-- tools/cleanroom/tmp_cleanui.py | 16 +++++++++++++++- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/tools/cleanroom/cleanroom.glade b/tools/cleanroom/cleanroom.glade index 1b1566a0..8a7fc995 100644 --- a/tools/cleanroom/cleanroom.glade +++ b/tools/cleanroom/cleanroom.glade @@ -1,6 +1,6 @@ - + True @@ -246,7 +246,24 @@ - + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + + + + + 4 + diff --git a/tools/cleanroom/tmp_cleanui.py b/tools/cleanroom/tmp_cleanui.py index 88ae3c3f..47e2574e 100644 --- a/tools/cleanroom/tmp_cleanui.py +++ b/tools/cleanroom/tmp_cleanui.py @@ -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 = {}