mirror of
https://github.com/gryf/wicd.git
synced 2026-01-03 20:34:17 +01:00
Fix non-blocking error dialog.
This commit is contained in:
@@ -89,12 +89,14 @@ def handle_no_dbus(from_tray=False):
|
||||
|
||||
def error(parent, message, block=True):
|
||||
""" Shows an error dialog """
|
||||
def delete_event(dialog, id):
|
||||
dialog.destroy()
|
||||
dialog = gtk.MessageDialog(parent, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR,
|
||||
gtk.BUTTONS_OK)
|
||||
dialog.set_markup(message)
|
||||
if not block:
|
||||
dialog.present()
|
||||
dialog.connect("response", lambda *args: dialog.destroy())
|
||||
dialog.connect("response", delete_event)
|
||||
else:
|
||||
dialog.run()
|
||||
dialog.destroy()
|
||||
|
||||
Reference in New Issue
Block a user