diff options
author | Sebastien Estienne <sebastien.estienne@gmail.com> | 2007-03-26 20:34:56 +0000 |
---|---|---|
committer | Sebastien Estienne <sebastien.estienne@gmail.com> | 2007-03-26 20:34:56 +0000 |
commit | ebc1f260f19e217b5974aef412c904bcc23d3c37 (patch) | |
tree | f23924be94e5d3b447763a59259d023dfce03df1 /src | |
parent | 91addfab698fb6111e6a4d02185273eefe40efa6 (diff) |
display an error message when an error occur whith nautilus plugin
git-svn-id: file:///home/lennart/svn/public/service-discovery-applet/trunk@137 3be567f1-68ff-0310-b24a-ad7cc433fd2f
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/pluginutils.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/modules/pluginutils.py b/src/modules/pluginutils.py index 61f1a3d..f1e0ea4 100644 --- a/src/modules/pluginutils.py +++ b/src/modules/pluginutils.py @@ -12,6 +12,19 @@ # $id$ # +import pygtk +import gtk + +pygtk.require('2.0') + +def error_msg(msg): + d = gtk.MessageDialog(parent=None, flags=gtk.DIALOG_MODAL, + type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK) + d.set_markup(msg) + d.show_all() + d.run() + d.destroy() + def pair_to_dict(l): res = dict() for el in l: |