summaryrefslogtreecommitdiff
path: root/gtk/gtkfilechoosernativeportal.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2016-07-06 12:54:29 -0400
committerMatthias Clasen <mclasen@redhat.com>2016-07-08 00:08:17 -0400
commit2b77eaa1ae8ab835e42dd082375e406c6b4bd906 (patch)
treeff4589b3501c407bb8a12ac918de1f2655b155b2 /gtk/gtkfilechoosernativeportal.c
parent445d12e5cbe0d155035682d1ddbdd6fe701a4173 (diff)
downloadgtk+-2b77eaa1ae8ab835e42dd082375e406c6b4bd906.tar.gz
Adapt to simplified file chooser portal api
OpenFiles is gone, just set the 'multiple' option instead. https://bugzilla.gnome.org/show_bug.cgi?id=768499
Diffstat (limited to 'gtk/gtkfilechoosernativeportal.c')
-rw-r--r--gtk/gtkfilechoosernativeportal.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtkfilechoosernativeportal.c b/gtk/gtkfilechoosernativeportal.c
index a8e0fc7f16..8ff2a46bc1 100644
--- a/gtk/gtkfilechoosernativeportal.c
+++ b/gtk/gtkfilechoosernativeportal.c
@@ -298,10 +298,8 @@ gtk_file_chooser_native_portal_show (GtkFileChooserNative *self)
action = gtk_file_chooser_get_action (GTK_FILE_CHOOSER (self));
multiple = gtk_file_chooser_get_select_multiple (GTK_FILE_CHOOSER (self));
- if (action == GTK_FILE_CHOOSER_ACTION_OPEN && !multiple)
+ if (action == GTK_FILE_CHOOSER_ACTION_OPEN)
method_name = "OpenFile";
- else if (action == GTK_FILE_CHOOSER_ACTION_OPEN && multiple)
- method_name = "OpenFiles";
else if (action == GTK_FILE_CHOOSER_ACTION_SAVE)
method_name = "SaveFile";
else
@@ -345,6 +343,8 @@ gtk_file_chooser_native_portal_show (GtkFileChooserNative *self)
}
g_variant_builder_init (&opt_builder, G_VARIANT_TYPE_VARDICT);
+ g_variant_builder_add (&opt_builder, "{sv}", "multiple",
+ g_variant_new_boolean (multiple));
if (self->accept_label)
g_variant_builder_add (&opt_builder, "{sv}", "accept_label",
g_variant_new_string (self->accept_label));