Skip to content
Snippets Groups Projects
Commit 80f6d790 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

make gtkexcepthook dialog non modal. fixes #4148

parent e22c6e96
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,7 @@ def _info(type, value, tb):
_('It probably is not fatal, but should be reported '
'to the developers nonetheless.'))
dialog.set_modal(False)
#FIXME: add icon to this button
RESPONSE_REPORT_BUG = 42
dialog.add_buttons(gtk.STOCK_CLOSE, gtk.BUTTONS_CLOSE,
......@@ -81,18 +82,15 @@ def _info(type, value, tb):
# on expand the details the dialog remains centered on screen
dialog.set_position(gtk.WIN_POS_CENTER_ALWAYS)
dialog.show_all()
close_clicked = False
while not close_clicked:
resp = dialog.run()
if resp == RESPONSE_REPORT_BUG:
def on_dialog_response(dialog, response):
if response == RESPONSE_REPORT_BUG:
url = 'http://trac.gajim.org/wiki/HowToCreateATicket'
helpers.launch_browser_mailer('url', url)
else:
close_clicked = True
dialog.destroy()
dialog.destroy()
dialog.connect('response', on_dialog_response)
dialog.show_all()
_exception_in_progress.release()
......@@ -108,4 +106,4 @@ def _info(type, value, tb):
sys.excepthook = _info
print x # this always tracebacks
# vim: se ts=3:
\ No newline at end of file
# vim: se ts=3:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment