[gtk+] Adapt to simplified file chooser portal api
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Adapt to simplified file chooser portal api
- Date: Fri, 8 Jul 2016 04:10:34 +0000 (UTC)
commit 2b77eaa1ae8ab835e42dd082375e406c6b4bd906
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.
https://bugzilla.gnome.org/show_bug.cgi?id=768499
gtk/gtkfilechoosernativeportal.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkfilechoosernativeportal.c b/gtk/gtkfilechoosernativeportal.c
index a8e0fc7..8ff2a46 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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]