changeset 1330:c2a693a27eb9

Double click to switch component and timeline
author Thinker K.F. Li <thinker@codemud.net>
date Mon, 31 Jan 2011 14:08:47 +0800
parents 2b051e474b0f
children 5da64f67d00d
files pyink/comp_dock.py pyink/component_dock.glade
diffstat 2 files changed, 8 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/pyink/comp_dock.py	Mon Jan 31 13:24:02 2011 +0800
+++ b/pyink/comp_dock.py	Mon Jan 31 14:08:47 2011 +0800
@@ -66,12 +66,7 @@
         
         all_comp_names = self._domview_ui.all_comp_names()
         for comp_name in all_comp_names:
-            if comp_name == 'main':
-                editable = False
-            else:
-                editable = True
-                pass
-            
+            editable = False
             components_model.append((comp_name, editable))
             pass
         
@@ -90,7 +85,7 @@
 
         all_timeline_names = self._domview_ui.all_timeline_names()
         for timeline_name in all_timeline_names:
-            timelines_model.append((timeline_name, True))
+            timelines_model.append((timeline_name, False))
             pass
 
         cur_tl_name = self._domview_ui.get_current_timeline()
@@ -107,7 +102,7 @@
 
     def dom_add_component(self, name):
         model = self._components_model
-        model.append((name, True))
+        model.append((name, False))
         pass
 
     def dom_rm_component(self, name):
@@ -127,7 +122,7 @@
 
     def dom_add_timeline(self, name):
         model = self._timelines_model
-        model.append((name, True))
+        model.append((name, False))
         pass
 
     def dom_rm_timeline(self, name):
@@ -255,7 +250,7 @@
         self._rm_component()
         pass
 
-    def on_treeview_components_cursor_changed(self, *args):
+    def on_treeview_components_row_activated(self, *args):
         domview_ui = self._domview_ui
         
         comp_name = self._current_component()
@@ -279,7 +274,7 @@
         self._rm_timeline()
         pass
 
-    def on_treeview_timelines_cursor_changed(self, *args):
+    def on_treeview_timelines_row_activated(self, *args):
         domview_ui = self._domview_ui
         
         timeline_name = self._current_timeline()
--- a/pyink/component_dock.glade	Mon Jan 31 13:24:02 2011 +0800
+++ b/pyink/component_dock.glade	Mon Jan 31 14:08:47 2011 +0800
@@ -33,7 +33,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="model">components_model</property>
-                <signal name="cursor_changed" handler="on_treeview_components_cursor_changed"/>
+                <signal name="row_activated" handler="on_treeview_components_row_activated"/>
                 <child>
                   <object class="GtkTreeViewColumn" id="treeviewcolumn1">
                     <property name="sizing">autosize</property>
@@ -127,7 +127,7 @@
                 <property name="search_column">1</property>
                 <property name="level_indentation">9</property>
                 <property name="enable_grid_lines">horizontal</property>
-                <signal name="cursor_changed" handler="on_treeview_timelines_cursor_changed"/>
+                <signal name="row_activated" handler="on_treeview_timelines_row_activated"/>
                 <child>
                   <object class="GtkTreeViewColumn" id="treeviewcolumn2">
                     <property name="title">Action/Timeline Name</property>