[gtk/mcatanzaro/#1492] filechoosernativeportal: stuff the current filter into options
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/mcatanzaro/#1492] filechoosernativeportal: stuff the current filter into options
- Date: Wed, 16 Jan 2019 23:46:19 +0000 (UTC)
commit c0a0bfd38841f8937a32e2ea8abbc2960db772cf
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Tue Jan 15 19:51:00 2019 -0600
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
gtk/gtkfilechoosernativeportal.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtkfilechoosernativeportal.c b/gtk/gtkfilechoosernativeportal.c
index 3a372e7058..07cbb5b4bc 100644
--- a/gtk/gtkfilechoosernativeportal.c
+++ b/gtk/gtkfilechoosernativeportal.c
@@ -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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]