Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormike <michael.jmontcalm@gmail.com>2009-03-02 01:20:28 (GMT)
committer mike <michael.jmontcalm@gmail.com>2009-03-02 01:20:28 (GMT)
commitad727c3202aefc920688d5c7d078208f0b47eb3d (patch)
tree4de6e73005cc1e5569902b7fd251b395687f1aa7
parenta658a240eb0652332300db1001fc375a39692213 (diff)
TutoriusV1 : Yet another omitted file (actions.py)
-rw-r--r--src/sugar/tutorius/actions.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/sugar/tutorius/actions.py b/src/sugar/tutorius/actions.py
index 58a4216..68ec374 100644
--- a/src/sugar/tutorius/actions.py
+++ b/src/sugar/tutorius/actions.py
@@ -105,10 +105,16 @@ class OnceWrapper(object):
self._need_undo = False
class DialogMessage(Action):
- """Show a dialog!"""
- def __init__(self, message):
+ """
+ Shows a dialog with a given text, at the given position on the screen.
+
+ @param message A string to display to the user
+ @param pos A list of the form [x, y]
+ """
+ def __init__(self, message, pos=[0,0]):
super(DialogMessage, self).__init__()
self._message = message
+ self.position = pos
self._dialog = None
def do(self):
@@ -118,6 +124,7 @@ class DialogMessage(Action):
self._dialog = TutoriusDialog(self._message)
self._dialog.set_button_clicked_cb(self._dialog.close_self)
self._dialog.set_modal(False)
+ self._dialog.move(self.position[0], self.position[1])
self._dialog.show()
def undo(self):