From 22bdfd56e332f3bcdacc4ee0395eeccadff4efda Mon Sep 17 00:00:00 2001 From: mike Date: Wed, 09 Dec 2009 08:53:33 +0000 Subject: Cleaning up dialog message since it relied on a deleted file --- diff --git a/addons/dialogmessage.py b/addons/dialogmessage.py deleted file mode 100644 index 24646f8..0000000 --- a/addons/dialogmessage.py +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright (C) 2009, Tutorius.org -# Copyright (C) 2009, Simon Poirier -# -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -from ..actions import * - -class DialogMessage(Action): - message = TStringProperty("Message") - position = TArrayProperty((0, 0), 2, 2) - - def __init__(self, **kwargs): - """ - Shows a dialog with a given text, at the given position on the screen. - - Accepted keyword args: - @param message A string to display to the user - @param position A list of the form [x, y] - """ - super(DialogMessage, self).__init__(**kwargs) - self._dialog = None - - def do(self, **kwargs): - """ - Show the dialog - """ - 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): - """ - Destroy the dialog - """ - if self._dialog: - self._dialog.destroy() - self._dialog = None - -__action__ = { - "name" : "DialogMessage", - "display_name" : "Message Dialog", - "icon" : "window_fullscreen", - "class" : DialogMessage, - "mandatory_props" : ["message"] -} - -# vim:set ts=4 sts=4 sw=4 et: - -- cgit v0.9.1