Gtk-Message: GtkDialog mapped without a transient parent

We have been trying to stomp these issues for quite a while now. What it means is that the newly opened dialog might get ‘confused’ if the windows have to be redrawn due to minimization, overlaid etc. The confusion would involve the stacking order (which window goes on top of which).

The missing parameter is in the calling module, which should be supplying a reference to itself as the parent.

After doing a bit of debugging, I was unable to recreate the trasient parent issue you mentioned. I did see the “Unknown Menu” issue.

The “Unknown Menu” issue is caused by not using the ManagedWindow class correctly. When using that class to implement a class such as DefineFilter (in gramps/gui/editors/filtereditor.py around line 810) there should have been method defined “build_menu_names”. This is used to fill out the ‘Windows’ menu.

I tested a quick fix to this issue and the diff to the code is attached below.

diff --git a/gramps/gui/editors/filtereditor.py b/gramps/gui/editors/filtereditor.py
index 431b4b05d..56b642e22 100644
--- a/gramps/gui/editors/filtereditor.py
+++ b/gramps/gui/editors/filtereditor.py
@@ -697,6 +697,9 @@ class EditRule(ManagedWindow):
         self.get_widget('hpaned1').set_position(panepos)
         self.show()

+    def build_menu_names(self, obj):
+        return (_("Edit Rule"), _("Edit Rule"))
+
     def select_iter(self, data):
         """
         Workaround to get self.selection to move to iter row.
@@ -867,6 +870,9 @@ class EditFilter(ManagedWindow):
         self._set_size()
         self.show()

+    def build_menu_names(self, obj):
+        return (_("Define filter"), _("Define filter"))
+
     def on_help_clicked(self, obj):
         """Display the relevant portion of Gramps manual"""
         display_help(webpage=WIKI_HELP_PAGE,`Preformatted text`
2 Likes