summaryrefslogtreecommitdiffstats
path: root/src/modules/pluginutils.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/pluginutils.py')
-rw-r--r--src/modules/pluginutils.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/pluginutils.py b/src/modules/pluginutils.py
index f1e0ea4..d775b38 100644
--- a/src/modules/pluginutils.py
+++ b/src/modules/pluginutils.py
@@ -1,4 +1,4 @@
-# -*- coding: UTF-8 -*-
+# -*- coding: utf-8 -*-
# -*- python -*-
# Copyright (C) 2005 by Sebastien Estienne
#
@@ -18,8 +18,12 @@ import gtk
pygtk.require('2.0')
def error_msg(msg):
+ message(msg, "error")
+
+def message(msg, type="info"):
+ msg_type = eval("gtk.MESSAGE_%s" % type.upper())
d = gtk.MessageDialog(parent=None, flags=gtk.DIALOG_MODAL,
- type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK)
+ type=msg_type, buttons=gtk.BUTTONS_OK)
d.set_markup(msg)
d.show_all()
d.run()