[epiphany] Revert "window: Remove browser plugin leftover"



commit 69def71511985485981d98a3f5af82972120aa9f
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Thu Oct 27 20:04:53 2016 -0500

    Revert "window: Remove browser plugin leftover"
    
    This reverts commit ee8077a743ea5e076583477f4904656b3e062251.
    
    Also fix a typo in the comment.

 src/ephy-window.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 0808a8d..88e01d3 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1949,6 +1949,14 @@ decide_policy_cb (WebKitWebView           *web_view,
   }
 
   if (decision_type == WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION) {
+    const char *frame_name = webkit_navigation_policy_decision_get_frame_name (navigation_decision);
+
+    if (g_strcmp0 (frame_name, "_evince_download") == 0) {
+      /* The Evince Browser Plugin is requesting us to download the document */
+      webkit_policy_decision_download (decision);
+      return TRUE;
+    }
+
     if (!g_settings_get_boolean (EPHY_SETTINGS_WEB, EPHY_PREFS_WEB_ENABLE_POPUPS) &&
         !webkit_navigation_action_is_user_gesture (navigation_action)) {
       webkit_policy_decision_ignore (decision);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]