8128: GtkDialog mapped without a transient parent

The set of fixes was actually triggered by comments in
https://gramps-project.org/bugs/view.php?id=9122#c45895
https://gramps-project.org/bugs/view.php?id=9122#c45921

The project is ongoing, since it's needed for our Windows users.
This commit is contained in:
Paul Franklin 2015-12-29 22:49:05 -08:00
parent a65e69cb53
commit e473f9dc89

View File

@ -123,6 +123,9 @@ class User(user.User):
:type warning: str :type warning: str
:returns: none :returns: none
""" """
if self.uistate:
WarningDialog(title, warning, parent=self.uistate.window)
else:
WarningDialog(title, warning) WarningDialog(title, warning)
def notify_error(self, title, error=""): def notify_error(self, title, error=""):
@ -137,6 +140,8 @@ class User(user.User):
""" """
if self.error_function: if self.error_function:
self.error_function(title, error) self.error_function(title, error)
elif self.uistate:
ErrorDialog(title, error, parent=self.uistate.window)
else: else:
ErrorDialog(title, error) ErrorDialog(title, error)
@ -148,6 +153,9 @@ class User(user.User):
:type error: str :type error: str
:returns: none :returns: none
""" """
if self.uistate:
DBErrorDialog(error, parent=self.uistate.window)
else:
DBErrorDialog(error) DBErrorDialog(error)
def info(self, msg1, infotext, parent=None, monospaced=False): def info(self, msg1, infotext, parent=None, monospaced=False):