Commit 6b01dc37 authored by Philipp Hörist's avatar Philipp Hörist

FileDialog: Always set transient

Otherwise dialogs could be garbage collected
parent c2d8473e
......@@ -113,6 +113,9 @@ class NativeFileChooserDialog(Gtk.FileChooserNative, BaseFileChooser):
path=None, file_name=None, select_multiple=False,
modal=False):
if transient_for is None:
transient_for = app.app.get_active_window()
Gtk.FileChooserNative.__init__(self,
title=self._title,
action=self._action,
......@@ -163,6 +166,9 @@ class GtkFileChooserDialog(Gtk.FileChooserDialog, BaseFileChooser):
path=None, file_name=None, select_multiple=False,
preview=True, modal=False):
if transient_for is None:
transient_for = app.app.get_active_window()
Gtk.FileChooserDialog.__init__(
self,
title=self._title,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment