# HG changeset patch # User Thinker K.F. Li # Date 1296487280 -28800 # Node ID 194c7a83108365f5e49187e4934b3143a27f861d # Parent 38403fdb0c6c5bc410c364360a4225adddb93ca5 Consistent checking for components and timelines diff -r 38403fdb0c6c -r 194c7a831083 pyink/comp_dock.py --- a/pyink/comp_dock.py Mon Jan 31 19:19:46 2011 +0800 +++ b/pyink/comp_dock.py Mon Jan 31 23:21:20 2011 +0800 @@ -266,10 +266,14 @@ def on_add_comp_clicked(self, *args): self._add_component() + self._desktop.doc().done("None", + "Add a new component") pass def on_remove_comp_clicked(self, *args): self._rm_component() + self._desktop.doc().done("None", + "Remove a component") pass def on_treeview_components_button_press_event(self, widget, event, *args): @@ -284,6 +288,8 @@ def on_treeview_components_row_activated(self, *args): self._switch_component() + self._desktop.doc().done("None", + "Switch to another component") pass ## \brief Handle of changing component name. @@ -299,6 +305,9 @@ model.set_value(itr, 1, False) self._domview_ui.rename_component(old_name, new_text) + + self._desktop.doc().done("None", + "Change name of a component") pass def on_rename_component_activate(self, *args): @@ -320,18 +329,27 @@ cur_layer_group = cur_layer_group_sp.repr self._domview_ui.link_to_component(comp_name, cur_layer_group) + + self._desktop.doc().done("None", + "Make a xlink of a component") pass def on_switch_component_activate(self, *args): self._switch_component() + self._desktop.doc().done("None", + "Switch to another component") pass def on_add_timeline_clicked(self, *args): self._add_timeline() + self._desktop.doc().done("None", + "Add a timeline") pass def on_remove_timeline_clicked(self, *args): self._rm_timeline() + self._desktop.doc().done("None", + "Remove a timeline") pass def on_treeview_timelines_button_press_event(self, widget, event, *args): @@ -346,6 +364,8 @@ def on_treeview_timelines_row_activated(self, *args): self._switch_timeline() + self._desktop.doc().done("None", + "Switch to another timeline") pass def on_cellrenderer_timelines_edited(self, renderer, path, @@ -359,6 +379,9 @@ model.set_value(itr, 1, False) self._domview_ui.rename_timeline(old_name, new_text) + + self._desktop.doc().done("None", + "Change name of a timeline") pass def on_rename_timeline_activate(self, *args): @@ -374,6 +397,8 @@ def on_switch_timeline_activate(self, *args): self._switch_timeline() + self._desktop.doc().done("None", + "Switch to another timeline") pass pass diff -r 38403fdb0c6c -r 194c7a831083 pyink/consistency.py --- a/pyink/consistency.py Mon Jan 31 19:19:46 2011 +0800 +++ b/pyink/consistency.py Mon Jan 31 23:21:20 2011 +0800 @@ -70,6 +70,9 @@ self._domviewui.manage_layer_group(child) pass pass + elif child_name == 'ns0:scenes': + self._domviewui.refresh_timelines() + return for cchild in child.childList(): self._remove_node_recursive(child, cchild) @@ -101,6 +104,9 @@ except: return pass + elif child_name == 'ns0:scenes': + self._domviewui.refresh_timelines() + return try: layer_idx, (start, end, tween_type) = \ @@ -151,5 +157,8 @@ self._domviewui.reset() pass pass + elif node.name() == 'ns0:scenes' and name == 'name': + self._domviewui.refresh_timelines() + pass pass pass diff -r 38403fdb0c6c -r 194c7a831083 pyink/domview_ui.py --- a/pyink/domview_ui.py Mon Jan 31 19:19:46 2011 +0800 +++ b/pyink/domview_ui.py Mon Jan 31 23:21:20 2011 +0800 @@ -482,6 +482,16 @@ def rename_timeline(self, timeline_name, new_name): self._dom.rename_timeline(timeline_name, new_name) pass + + def refresh_components(self): + dock = self._comp_dock + dock.refresh_components() + pass + + def refresh_timelines(self): + dock = self._comp_dock + dock.refresh_timelines() + pass pass