From df4db6ed3c97ea149fb922cc43d49b04d7f5a5c9 Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Sun, 3 Feb 2008 12:32:10 +0000 Subject: [PATCH] add columns for x/y offsets to patch list --- tools/cleanroom/tmp_cleanui.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/cleanroom/tmp_cleanui.py b/tools/cleanroom/tmp_cleanui.py index b91f8d46..f8666d95 100644 --- a/tools/cleanroom/tmp_cleanui.py +++ b/tools/cleanroom/tmp_cleanui.py @@ -62,7 +62,7 @@ class HellowWorldGTK: row = model[path[0]][0] selected_patches = self.wTree.get_widget("selected_patches") model = selected_patches.get_model() - model.append(None, [ row ]) + model.append(None, [ row, 0, 0 ]) # redraw the rhs. a bit hacky lhs = self.wTree.get_widget("texture_list") offs,col = lhs.get_cursor() @@ -197,7 +197,7 @@ class HellowWorldGTK: # prepare the patch list patch_list = self.wTree.get_widget("selected_patches") - treestore = gtk.TreeStore(str) + treestore = gtk.TreeStore(str,int,int) column = gtk.TreeViewColumn('Patch name') patch_list.set_model(treestore) patch_list.append_column(column) @@ -205,6 +205,16 @@ class HellowWorldGTK: column.pack_start(cell, False) column.add_attribute(cell, "text", 0) + column = gtk.TreeViewColumn('X offset') + patch_list.append_column(column) + column.pack_start(cell, False) + column.add_attribute(cell, "text", 1) # ? + + column = gtk.TreeViewColumn('Y offset') + patch_list.append_column(column) + column.pack_start(cell, False) + column.add_attribute(cell, "text", 2) # ? + # populate the RHS list with patch names # yes, I learnt perl once. patches = {}