changeset 1524:d46ba9e7f837

Update action list with timeline names of current component.
author Thinker K.F. Li <thinker@codemud.net>
date Mon, 22 Aug 2011 14:53:55 +0800
parents 66c672d8f267
children 701a568f6949
files pyink/FSM_window.py
diffstat 1 files changed, 22 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pyink/FSM_window.py	Mon Aug 22 14:28:12 2011 +0800
+++ b/pyink/FSM_window.py	Mon Aug 22 14:53:55 2011 +0800
@@ -25,6 +25,10 @@
     def switch_component(self, comp_name):
         self._comp_name = comp_name
         pass
+    
+    def all_actions(self):
+        action_names = self._domview.all_timeline_names()
+        return action_names
 
     def all_state_names(self):
         return self._domview.all_state_names(self._comp_name)
@@ -201,6 +205,7 @@
     _action_picker = None
     _picked_action = None
     _picked_action_txt = None
+    _action_list = None
     _action_store = None
     
     def __init__(self):
@@ -2182,6 +2187,23 @@
         view.setResize(True, 800, 600)
         pass
 
+    def _update_action_store(self):
+        action_store = self._action_store
+        compview = self._compview
+        
+        action_store.clear()
+        
+        action_names = compview.all_actions()
+        for action_name in action_names:
+            action_store.append((action_name,))
+            pass
+        pass
+
+    def show_action_picker(self):
+        self._update_action_store()
+        super(FSM_window, self).show_action_picker()
+        pass
+
     def on_close_window_activate(self, *args):
         self._emit_leave_mode()
         self._close_cb()