# HG changeset patch # User Thinker K.F. Li # Date 1295492067 -28800 # Node ID f2b1b22f7cbca883b395a141d59c372eee5c085a # Parent 49775feefbcfe185ee71fb5a8383d97cfc4698e0 Make comp_dock editable diff -r 49775feefbcf -r f2b1b22f7cbc pyink/comp_dock.py --- a/pyink/comp_dock.py Thu Jan 20 00:50:49 2011 +0800 +++ b/pyink/comp_dock.py Thu Jan 20 10:54:27 2011 +0800 @@ -23,6 +23,8 @@ dock_top = builder.get_object('component_dock_top') components_model = builder.get_object('components_model') timelines_model = builder.get_object('timelines_model') + components_treeview = builder.get_object('treeview_components') + timelines_treeview = builder.get_object('treeview_timelines') dock_top_parent = dock_top.get_parent() dock_top_parent.remove(dock_top) @@ -36,6 +38,11 @@ self._components_model = components_model self._timelines_model = timelines_model + self._components_treeview = components_treeview + self._timelines_treeview = timelines_treeview + + self._cur_component = -1 + self._cur_timeline = -1 pass def install_dock(self, desktop): @@ -59,14 +66,14 @@ components_model.clear() for comp_name in self._domview_ui.all_comp_names(): - components_model.append((comp_name,)) + components_model.append((comp_name, True)) pass timelines_model = self._timelines_model timelines_model.clear() for timeline_name in self._domview_ui.all_timeline_names(): - timelines_model.append((timeline_name,)) + timelines_model.append((timeline_name, True)) pass pass @@ -82,6 +89,11 @@ print args pass + def on_cellrenderer_comp_edited(self, renderer, path, + new_text, *args): + print '%s - %s' % (path, new_text) + pass + def on_add_timeline_clicked(self, *args): print args pass @@ -93,4 +105,9 @@ def on_treeview_timelines_cursor_changed(self, *args): print args pass + + def on_cellrenderer_timelines_edited(self, renderer, path, + new_text, *args): + print '%s - %s' % (path, new_text) + pass pass diff -r 49775feefbcf -r f2b1b22f7cbc pyink/component_dock.glade --- a/pyink/component_dock.glade Thu Jan 20 00:50:49 2011 +0800 +++ b/pyink/component_dock.glade Thu Jan 20 10:54:27 2011 +0800 @@ -6,12 +6,16 @@ + + + + @@ -36,8 +40,11 @@ Component Name True - + + + + 1 0 @@ -125,8 +132,11 @@ Action/Timeline Name - + + + + 1 0