debug-viewer: Use GtkFileChooserNative to open logs

This provides flatpak document portal support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5390>
This commit is contained in:
Colin Kinloch 2023-09-25 16:11:57 +01:00 committed by GStreamer Marge Bot
parent babc18c36e
commit 6f62b24788

View file

@ -572,10 +572,8 @@ class Window (object):
@action @action
def handle_open_file_action_activate(self, action): def handle_open_file_action_activate(self, action):
dialog = Gtk.FileChooserDialog(None, self.gtk_window, dialog = Gtk.FileChooserNative.new(None, self.gtk_window,
Gtk.FileChooserAction.OPEN, Gtk.FileChooserAction.OPEN, None, None)
(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
Gtk.STOCK_OPEN, Gtk.ResponseType.ACCEPT,))
response = dialog.run() response = dialog.run()
dialog.hide() dialog.hide()
if response == Gtk.ResponseType.ACCEPT: if response == Gtk.ResponseType.ACCEPT: