comparison clients/editor/scripts/gui/error.py @ 255:51cc05d862f2

Merged editor_rewrite branch to trunk. This contains changes that may break compatibility against existing clients. For a list of changes that may affect your client, see: http://wiki.fifengine.de/Changes_to_pychan_and_FIFE_in_editor_rewrite_branch
author cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
date Mon, 08 Jun 2009 16:00:02 +0000
parents
children 8b125ec749d7
comparison
equal deleted inserted replaced
254:10b5f7f36dd4 255:51cc05d862f2
1 import pychan
2 import pychan.widgets as widgets
3
4 class ErrorDialog(object):
5 """
6 Shows a dialog with an error message.
7 """
8 def __init__(self, message):
9 self._widget = pychan.loadXML('gui/error.xml')
10
11 self._widget.mapEvents({
12 'okButton' : self._widget.hide
13 })
14
15 self._widget.distributeInitialData({
16 'message' : message
17 })
18 self._widget.show()
19 self._widget.adaptLayout() # Necessary to make scrollarea work properly
20