Parent dialog within Gramps dialogs?

Hello.
I am wondering why ErrorDialog() does not set a parent value as default?

It makes a while since I (can) understand that Dialogs provided by gramps interface are ignoring the parent dialog within gramps UI!

Sure, it will pop-up once there is an error. Anyway, all these dialogs are designed for Gramps UI. Maybe we could get ride of additionnal issue related to Gramps dialogs by setting something on init section?
e.g., parent=self.uistate.window

The default parent=None leads to the Gtk parent mapping issue. Sure, need to fix this on addon or whatever plugins. Maybe it is not the most intuitive way for re-using Gramps’ dialogs as we do not always know that parent=None. It is discouraged by Gtk, but within Gramps (e.g., via a tool, gramplet, or plugin), the main parent window should be “gramps”. Just a possible improvement by setting the main window as parent by default seems to be a logical way. I do not know why the default is None, but getting this Gtk warning by just re-using Gramps’ dialogs could be a little bit confusing during testing for an addon. Maybe to get ride of this issue, could provide a less confusing ecosystem for addons too?

Is this related to the pervasive “mapped without a transient parent” warnings?

See Gtk-Message: GtkDialog mapped without a transient parent - #3 by prculley

0008128: GtkDialog mapped without a transient parent

Yes…
During testing, I got such warnings.
I was able to fix them by setting parent=self.uistate.window. I (too often) called ErrorDialog, but I missed some of them. So, once it occurs I fix it on my local version of the addon. But by looking at gramps/gui/dialog.py, we can see that most dialogs do not set parent dialog. Within gramps program it sounds a little bit strange as we are running the main dialog/window. I was able to get ride of the warnings, just wondering why there is no default set, this might (or not) limit such extra warnings.

Note, we know that such warning is not a blocking issue, but as I do not think that gramps-web, betty or others projects looking at gramps API, are also re-using these (Gtk) dialogs, why the default parent is None?