[epiphany/mcatanzaro/reddit-uploads: 39/39] Fix run-file-chooser under flatpak



commit f4349efcd655ed0d7f3be24e2ad11cad631c45f4
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 6eebf3ed2..79b668093 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]