summaryrefslogtreecommitdiff
path: root/gtk/gtkfilechoosernativeportal.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2017-01-17 14:14:34 -0500
committerMatthias Clasen <mclasen@redhat.com>2017-01-17 14:14:44 -0500
commit95834ad1e18142a19dd35e509f7785f82d21966a (patch)
treefa3f1a48e5d2e940308a244ba3ddf2bae49f9ec8 /gtk/gtkfilechoosernativeportal.c
parent4875c689a0e826604953965ffdb71d8b82cae364 (diff)
downloadgtk+-95834ad1e18142a19dd35e509f7785f82d21966a.tar.gz
Revert "filechooser portal: Make sure we can save"
This reverts commit 4875c689a0e826604953965ffdb71d8b82cae364. This was a thinko. Writable is not actually settable from the application side, but only for the user, from the backend side.
Diffstat (limited to 'gtk/gtkfilechoosernativeportal.c')
-rw-r--r--gtk/gtkfilechoosernativeportal.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/gtk/gtkfilechoosernativeportal.c b/gtk/gtkfilechoosernativeportal.c
index 3ab9b35385..981e0d5471 100644
--- a/gtk/gtkfilechoosernativeportal.c
+++ b/gtk/gtkfilechoosernativeportal.c
@@ -53,7 +53,6 @@ typedef struct {
char *portal_handle;
guint portal_response_signal_id;
gboolean modal;
- gboolean writable;
gboolean hidden;
@@ -305,8 +304,6 @@ show_portal_file_chooser (GtkFileChooserNative *self,
g_variant_new_string (self->cancel_label));
g_variant_builder_add (&opt_builder, "{sv}", "modal",
g_variant_new_boolean (data->modal));
- g_variant_builder_add (&opt_builder, "{sv}", "writable",
- g_variant_new_boolean (data->writable));
g_variant_builder_add (&opt_builder, "{sv}", "filters", get_filters (GTK_FILE_CHOOSER (self)));
if (GTK_FILE_CHOOSER_NATIVE (self)->current_name)
g_variant_builder_add (&opt_builder, "{sv}", "current_name",
@@ -379,7 +376,6 @@ gtk_file_chooser_native_portal_show (GtkFileChooserNative *self)
GDBusConnection *connection;
GtkFileChooserAction action;
const char *method_name;
- gboolean writable;
if (!gtk_should_use_portal ())
return FALSE;
@@ -391,15 +387,9 @@ gtk_file_chooser_native_portal_show (GtkFileChooserNative *self)
action = gtk_file_chooser_get_action (GTK_FILE_CHOOSER (self));
if (action == GTK_FILE_CHOOSER_ACTION_OPEN)
- {
- method_name = "OpenFile";
- writable = FALSE;
- }
+ method_name = "OpenFile";
else if (action == GTK_FILE_CHOOSER_ACTION_SAVE)
- {
- method_name = "SaveFile";
- writable = FALSE;
- }
+ method_name = "SaveFile";
else
{
g_warning ("GTK_FILE_CHOOSER_ACTION_%s is not supported by GtkFileChooserNativePortal", action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER ? "SELECT_FOLDER" : "CREATE_FOLDER");
@@ -411,7 +401,6 @@ gtk_file_chooser_native_portal_show (GtkFileChooserNative *self)
data->connection = connection;
data->method_name = method_name;
- data->writable = writable;
if (gtk_native_dialog_get_modal (GTK_NATIVE_DIALOG (self)))
data->modal = TRUE;