diff options
| author | Sebastian Heinlein <renate@hph4> | 2006-04-17 15:18:44 +0200 |
|---|---|---|
| committer | Sebastian Heinlein <renate@hph4> | 2006-04-17 15:18:44 +0200 |
| commit | 9bd7121bd9ab06681a3b61df0a300b67fcd557a3 (patch) | |
| tree | 3255ca4733524eac802cd85f288864b475b9b546 /UpdateManager/Common | |
| parent | 1d2f44862609f46d205f0c895fd72ad5c5253061 (diff) | |
| parent | 8670d8c43a9ce7f42b85febe7bd9d35310fcb8ea (diff) | |
| download | python-apt-9bd7121bd9ab06681a3b61df0a300b67fcd557a3.tar.gz | |
* huge merge
Diffstat (limited to 'UpdateManager/Common')
| -rw-r--r-- | UpdateManager/Common/utils.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/UpdateManager/Common/utils.py b/UpdateManager/Common/utils.py index ffafadfb..17c62212 100644 --- a/UpdateManager/Common/utils.py +++ b/UpdateManager/Common/utils.py @@ -1,3 +1,4 @@ +import gtk def str_to_bool(str): if str == "0" or str.upper() == "FALSE": @@ -7,3 +8,14 @@ def str_to_bool(str): def utf8(str): return unicode(str, 'latin1').encode('utf-8') + +def error(parent, summary, message): + d = gtk.MessageDialog(parent=parent, + flags=gtk.DIALOG_MODAL, + type=gtk.MESSAGE_ERROR, + buttons=gtk.BUTTONS_CLOSE) + d.set_markup("<big><b>%s</b></big>\n\n%s" % (summary, message)) + d.set_title("") + res = d.run() + d.destroy() + return |
