From ad727c3202aefc920688d5c7d078208f0b47eb3d Mon Sep 17 00:00:00 2001 From: mike Date: Mon, 02 Mar 2009 01:20:28 +0000 Subject: TutoriusV1 : Yet another omitted file (actions.py) --- 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): -- cgit v0.9.1