[gtk+/portal: 10/18] Adapt to simplified file chooser portal api
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/portal: 10/18] Adapt to simplified file chooser portal api
- Date: Wed, 6 Jul 2016 19:19:15 +0000 (UTC)
commit 2d69f2e5f3329bfc9321cdc738e1bced16a9ca75
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jul 6 12:54:29 2016 -0400
Adapt to simplified file chooser portal api
OpenFiles is gone, just set the 'multiple' option instead.
gtk/gtkfilechoosernativeportal.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkfilechoosernativeportal.c b/gtk/gtkfilechoosernativeportal.c
index 87a9906..9d12da8 100644
--- a/gtk/gtkfilechoosernativeportal.c
+++ b/gtk/gtkfilechoosernativeportal.c
@@ -295,10 +295,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
@@ -342,6 +340,7 @@ 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", multiple);
if (self->accept_label)
g_variant_builder_add (&opt_builder, "{sv}", "accept_label",
g_variant_new_string (self->accept_label));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]