Commit c0a0bfd3 authored by Michael Catanzaro's avatar Michael Catanzaro

filechoosernativeportal: stuff the current filter into options

We need to tell the portal what filter is supposed to be selected by
default, or it will just pick the first one, which could be wrong and
annoying.

This will require updated xdg-desktop-portal and xdg-desktop-portal-gtk
to work properly.

Fixes #1492
parent 33079447
Pipeline #51742 passed with stage
in 15 minutes and 1 second
......@@ -332,6 +332,9 @@ show_portal_file_chooser (GtkFileChooserNative *self,
g_variant_builder_add (&opt_builder, "{sv}", "modal",
g_variant_new_boolean (data->modal));
g_variant_builder_add (&opt_builder, "{sv}", "filters", get_filters (GTK_FILE_CHOOSER (self)));
if (self->current_filter)
g_variant_builder_add (&opt_builder, "{sv}", "current_filter",
gtk_file_filter_to_gvariant (self->current_filter));
if (self->current_name)
g_variant_builder_add (&opt_builder, "{sv}", "current_name",
g_variant_new_string (GTK_FILE_CHOOSER_NATIVE (self)->current_name));
......
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