Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tutorius/actions.py
diff options
context:
space:
mode:
authormike <michael.jmontcalm@gmail.com>2009-10-05 15:42:28 (GMT)
committer mike <michael.jmontcalm@gmail.com>2009-10-05 15:42:28 (GMT)
commite1ed58a1a9b8674559824c158b4ed7375a0f7c18 (patch)
treed8cf73dcbc4db3ee45da14e2e2f0368cb9923922 /tutorius/actions.py
parentb658de9cf3cb526f8492a54dab19e8238c9edb9b (diff)
LP 439980 : Adding tests for the addon module
Diffstat (limited to 'tutorius/actions.py')
-rw-r--r--tutorius/actions.py145
1 files changed, 0 insertions, 145 deletions
diff --git a/tutorius/actions.py b/tutorius/actions.py
index 0db7988..89e71ae 100644
--- a/tutorius/actions.py
+++ b/tutorius/actions.py
@@ -177,148 +177,3 @@ class Action(TPropContainer):
self.position = [int(x), int(y)]
self.__edit_img.destroy()
-##class OnceWrapper(Action):
-## """
-## Wraps a class to perform an action once only
-##
-## This ConcreteActions's do() method will only be called on the first do()
-## and the undo() will be callable after do() has been called
-## """
-##
-## _action = TAddonProperty()
-##
-## def __init__(self, action):
-## Action.__init__(self)
-## self._called = False
-## self._need_undo = False
-## self._action = action
-##
-## def do(self):
-## """
-## Do the action only on the first time
-## """
-## if not self._called:
-## self._called = True
-## self._action.do()
-## self._need_undo = True
-##
-## def undo(self):
-## """
-## Undo the action if it's been done
-## """
-## if self._need_undo:
-## self._action.undo()
-## self._need_undo = False
-##
-##class WidgetIdentifyAction(Action):
-## def __init__(self):
-## Action.__init__(self)
-## self.activity = None
-## self._dialog = None
-
-## def do(self):
-## os = ObjectStore()
-## if os.activity:
-## self.activity = os.activity
-
-## self._dialog = WidgetIdentifier(self.activity)
-## self._dialog.show()
-
-
-## def undo(self):
-## if self._dialog:
-## self._dialog.destroy()
-
-##class ChainAction(Action):
-## """Utility class to allow executing actions in a specific order"""
-## def __init__(self, *actions):
-## """ChainAction(action1, ... ) builds a chain of actions"""
-## Action.__init__(self)
-## self._actions = actions
-##
-## def do(self,**kwargs):
-## """do() each action in the chain"""
-## for act in self._actions:
-## act.do(**kwargs)
-##
-## def undo(self):
-## """undo() each action in the chain, starting with the last"""
-## for act in reversed(self._actions):
-## act.undo()
-
-##class DisableWidgetAction(Action):
-## def __init__(self, target):
-## """Constructor
-## @param target target treeish
-## """
-## Action.__init__(self)
-## self._target = target
-## self._widget = None
-
-## def do(self):
-## """Action do"""
-## os = ObjectStore()
-## if os.activity:
-## self._widget = gtkutils.find_widget(os.activity, self._target)
-## if self._widget:
-## self._widget.set_sensitive(False)
-
-## def undo(self):
-## """Action undo"""
-## if self._widget:
-## self._widget.set_sensitive(True)
-
-
-##class TypeTextAction(Action):
-## """
-## Simulate a user typing text in a widget
-## Work on any widget that implements a insert_text method
-##
-## @param widget The treehish representation of the widget
-## @param text the text that is typed
-## """
-## def __init__(self, widget, text):
-## Action.__init__(self)
-##
-## self._widget = widget
-## self._text = text
-##
-## def do(self, **kwargs):
-## """
-## Type the text
-## """
-## widget = gtkutils.find_widget(ObjectStore().activity, self._widget)
-## if hasattr(widget, "insert_text"):
-## widget.insert_text(self._text, -1)
-##
-## def undo(self):
-## """
-## no undo
-## """
-## pass
-##
-##class ClickAction(Action):
-## """
-## Action that simulate a click on a widget
-## Work on any widget that implements a clicked() method
-##
-## @param widget The threehish representation of the widget
-## """
-## def __init__(self, widget):
-## Action.__init__(self)
-## self._widget = widget
-##
-## def do(self):
-## """
-## click the widget
-## """
-## widget = gtkutils.find_widget(ObjectStore().activity, self._widget)
-## if hasattr(widget, "clicked"):
-## widget.clicked()
-##
-## def undo(self):
-## """
-## No undo
-## """
-## pass
-