mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-03-11 16:58:31 +03:00
Use a synchronous error dialog if reporting a startup error, so the user can actually see it.
This commit is contained in:
parent
cd121ff60a
commit
07c93da1b9
@ -53,7 +53,7 @@ def _show_startup_error(msg, details):
|
||||
from virtManager.error import vmmErrorDialog
|
||||
err = vmmErrorDialog(None, 0, gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE, "", "")
|
||||
title = _("Error starting Virtual Machine Manager")
|
||||
err.show_err(title + ": " + msg, details, title)
|
||||
err.show_err(title + ": " + msg, details, title, async=False)
|
||||
|
||||
def setup_i18n():
|
||||
locale.setlocale(locale.LC_ALL, '')
|
||||
|
@ -65,7 +65,7 @@ class vmmErrorDialog (gtk.MessageDialog):
|
||||
def response_cb(self, src, ignore):
|
||||
src.hide()
|
||||
|
||||
def show_err(self, summary, details, title=None):
|
||||
def show_err(self, summary, details, title=None, async=True):
|
||||
self.hide()
|
||||
|
||||
if title is None:
|
||||
@ -75,7 +75,10 @@ class vmmErrorDialog (gtk.MessageDialog):
|
||||
self.buffer.set_text(details)
|
||||
logging.debug("Uncaught Error: %s : %s" % (summary, details))
|
||||
|
||||
self.show()
|
||||
if async:
|
||||
self.show()
|
||||
else:
|
||||
self.run()
|
||||
|
||||
def val_err(self, text1, text2=None, title=None):
|
||||
def response_destroy(src, ignore):
|
||||
|
Loading…
x
Reference in New Issue
Block a user