[epiphany/gnome-3-32] Fix run-file-chooser under flatpak
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-32] Fix run-file-chooser under flatpak
- Date: Wed, 24 Apr 2019 18:06:10 +0000 (UTC)
commit 895b2d8696dbb517ee938ca99fbe2dc69036fe31
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Mon Apr 8 16:55:44 2019 +0000
Fix run-file-chooser under flatpak
Since I added file filter support to xdg-desktop-portal, it's now fatal
to select a current file filter that is not in the list of file filters.
If we mess this up, there will be no file chooser dialog at all. Maybe
the portal is being a bit too strict, but Epiphany is definitely in the
wrong here for not using the file chooser interface properly.
We just need to add the filter to the list before showing the dialog.
Fixes: https://www.reddit.com/r/gnome/comments/baiqan/who_is_using_epiphany_how_is_your_experience/
(cherry picked from commit f4349efcd655ed0d7f3be24e2ad11cad631c45f4)
embed/ephy-web-view.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index a7727c59b..0fa4e8385 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -341,8 +341,10 @@ ephy_web_view_run_file_chooser (WebKitWebView *web_view,
GTK_FILE_CHOOSER_ACTION_OPEN,
EPHY_FILE_FILTER_ALL);
- if (filter)
+ if (filter) {
+ gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (dialog), filter);
+ }
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), g_settings_get_string (EPHY_SETTINGS_WEB,
EPHY_PREFS_WEB_LAST_UPLOAD_DIRECTORY));
gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (dialog), allows_multiple_selection);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]