mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-10-27 10:25:25 +03:00
Only allow showing one validation dialog at a time
This commit is contained in:
parent
fe14b5e200
commit
249c77831c
@ -50,6 +50,7 @@ def _launch_dialog(dialog, primary_text, secondary_text, title,
|
||||
class vmmErrorDialog (object):
|
||||
def __init__ (self, parent=None):
|
||||
self._parent = parent
|
||||
self._simple = None
|
||||
|
||||
def set_parent(self, parent):
|
||||
self._parent = parent
|
||||
@ -82,8 +83,11 @@ class vmmErrorDialog (object):
|
||||
dialog = gtk.MessageDialog(self.get_parent(),
|
||||
gtk.DIALOG_DESTROY_WITH_PARENT,
|
||||
type=dialog_type, buttons=buttons)
|
||||
if self._simple:
|
||||
self._simple.destroy()
|
||||
self._simple = dialog
|
||||
|
||||
return _launch_dialog(dialog,
|
||||
return _launch_dialog(self._simple,
|
||||
text1, text2 or "", title or "",
|
||||
sync=not async)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user