diff --git a/gramps/gui/user.py b/gramps/gui/user.py index 046329e3c..421b6abd0 100644 --- a/gramps/gui/user.py +++ b/gramps/gui/user.py @@ -123,7 +123,10 @@ class User(user.User): :type warning: str :returns: none """ - WarningDialog(title, warning) + if self.uistate: + WarningDialog(title, warning, parent=self.uistate.window) + else: + WarningDialog(title, warning) def notify_error(self, title, error=""): """ @@ -137,6 +140,8 @@ class User(user.User): """ if self.error_function: self.error_function(title, error) + elif self.uistate: + ErrorDialog(title, error, parent=self.uistate.window) else: ErrorDialog(title, error) @@ -148,7 +153,10 @@ class User(user.User): :type error: str :returns: none """ - DBErrorDialog(error) + if self.uistate: + DBErrorDialog(error, parent=self.uistate.window) + else: + DBErrorDialog(error) def info(self, msg1, infotext, parent=None, monospaced=False): """