[epiphany] PDF: Do not auto-close a page in document mode



commit ec5790d80c53044d1f4842e49b2765d9b85558d0
Author: Jan-Michael Brummer <jan brummer tabos org>
Date:   Fri Jan 18 17:46:29 2019 +0100

    PDF: Do not auto-close a page in document mode
    
    Fixes: https://gitlab.gnome.org/GNOME/epiphany/issues/621

 src/ephy-window.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/ephy-window.c b/src/ephy-window.c
index c6065e4cf..d6d34c85c 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -2602,12 +2602,18 @@ static void
 download_only_load_cb (EphyWebView *view,
                        EphyWindow  *window)
 {
+  EphyEmbed *embed = EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW (view);
+
+  /* Do not close tab if evince document mode is active */
+  if (ephy_embed_get_mode (embed) == EPHY_EMBED_MODE_EVINCE_DOCUMENT)
+    return;
+
   if (gtk_notebook_get_n_pages (window->notebook) == 1) {
     ephy_web_view_load_homepage (view);
     return;
   }
 
-  g_idle_add (delayed_remove_child, EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW (view));
+  g_idle_add (delayed_remove_child, embed);
 }
 
 static void


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