5 class Dialog(gtk
.Dialog
):
8 gtk
.Dialog
.__init
__(self
)
9 self
.set_has_separator(False)
10 self
.set_position(gtk
.WIN_POS_CENTER
)
12 def destroyed(widget
):
17 self
.connect('destroy', destroyed
)
21 def alert(parent
, message
):
22 box
= gtk
.MessageDialog(parent
, gtk
.DIALOG_DESTROY_WITH_PARENT
,
23 gtk
.MESSAGE_ERROR
, gtk
.BUTTONS_OK
,
25 box
.set_position(gtk
.WIN_POS_CENTER
)
26 box
.connect('response', lambda b
, r
: box
.destroy())