blob: 17c622120bfa064016d909f0bbba658f3d737b51 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import gtk
def str_to_bool(str):
if str == "0" or str.upper() == "FALSE":
return False
return True
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
|