Otherwise, GTK3 complains.
... | ... |
@@ -2092,7 +2092,8 @@ class DotWindow(Gtk.Window): |
2092 | 2092 |
self.error_dialog(str(ex)) |
2093 | 2093 |
|
2094 | 2094 |
def on_open(self, action): |
2095 |
- chooser = Gtk.FileChooserDialog(title="Open dot File", |
|
2095 |
+ chooser = Gtk.FileChooserDialog(parent=self, |
|
2096 |
+ title="Open dot File", |
|
2096 | 2097 |
action=Gtk.FileChooserAction.OPEN, |
2097 | 2098 |
buttons=(Gtk.STOCK_CANCEL, |
2098 | 2099 |
Gtk.ResponseType.CANCEL, |
... | ... |
@@ -2120,7 +2121,8 @@ class DotWindow(Gtk.Window): |
2120 | 2121 |
self.dotwidget.reload() |
2121 | 2122 |
|
2122 | 2123 |
def error_dialog(self, message): |
2123 |
- dlg = Gtk.MessageDialog(type=Gtk.MessageType.ERROR, |
|
2124 |
+ dlg = Gtk.MessageDialog(parent=self, |
|
2125 |
+ type=Gtk.MessageType.ERROR, |
|
2124 | 2126 |
message_format=message, |
2125 | 2127 |
buttons=Gtk.ButtonsType.OK) |
2126 | 2128 |
dlg.set_title(self.base_title) |