[epiphany/mcatanzaro/reddit-uploads] Fix run-file-chooser under flatpak
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/reddit-uploads] Fix run-file-chooser under flatpak
- Date: Mon, 8 Apr 2019 16:59:28 +0000 (UTC)
commit e7032d2bcc2ed40840818b7fde6225310d6bc8b9
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Mon Apr 8 11:55:44 2019 -0500
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/
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 2155d482b..855984741 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]