diff options
author | Matthias Clasen <mclasen@redhat.com> | 2016-06-11 10:23:27 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2016-07-08 00:08:05 -0400 |
commit | 6cf71ed6bba0dbb8d01e4c6d566ff1467cfa0b25 (patch) | |
tree | a66a4bc620d56df225a14f4531144d2ec7766d2b /gtk/gtkfilechoosernativeportal.c | |
parent | 3b3e1eca2bc3accff3960dfc2394d1deb5e7ea20 (diff) | |
download | gtk+-6cf71ed6bba0dbb8d01e4c6d566ff1467cfa0b25.tar.gz |
Use the portal when sandboxed
Use the sandbox helper api to find out whether to use
the file chooser portal.
https://bugzilla.gnome.org/show_bug.cgi?id=768499
Diffstat (limited to 'gtk/gtkfilechoosernativeportal.c')
-rw-r--r-- | gtk/gtkfilechoosernativeportal.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/gtk/gtkfilechoosernativeportal.c b/gtk/gtkfilechoosernativeportal.c index 348c402bd7..8a52a47753 100644 --- a/gtk/gtkfilechoosernativeportal.c +++ b/gtk/gtkfilechoosernativeportal.c @@ -277,14 +277,7 @@ gtk_file_chooser_native_portal_show (GtkFileChooserNative *self) const char *signal_name; GDBusSignalCallback signal_callback; - if (g_getenv ("GTK_USE_PORTAL") == NULL) - return FALSE; - - if (gtk_file_chooser_get_extra_widget (GTK_FILE_CHOOSER (self)) != NULL) - return FALSE; - - update_preview_signal = g_signal_lookup ("update-preview", GTK_TYPE_FILE_CHOOSER); - if (g_signal_has_handler_pending (self, update_preview_signal, 0, TRUE)) + if (!gtk_should_use_portal ()) return FALSE; connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL); |