[epiphany] PDF: Fix back navigation skipping one page
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] PDF: Fix back navigation skipping one page
- Date: Sun, 27 Jan 2019 22:43:11 +0000 (UTC)
commit 920bcd841e00e008cdec746028243cc15aa45dc7
Author: Jan-Michael Brummer <jan brummer tabos org>
Date: Fri Jan 18 17:45:41 2019 +0100
PDF: Fix back navigation skipping one page
src/window-commands.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/window-commands.c b/src/window-commands.c
index 2c0d74df4..9e53f69e2 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -668,8 +668,12 @@ window_cmd_navigation (GSimpleAction *action,
web_view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed);
if (strstr (g_action_get_name (G_ACTION (action)), "back")) {
- ephy_embed_set_mode (embed, EPHY_EMBED_MODE_WEB_VIEW);
- webkit_web_view_go_back (web_view);
+ gboolean in_document_mode = ephy_embed_get_mode (embed) == EPHY_EMBED_MODE_EVINCE_DOCUMENT;
+
+ if (in_document_mode)
+ ephy_embed_set_mode (embed, EPHY_EMBED_MODE_WEB_VIEW);
+ else
+ webkit_web_view_go_back (web_view);
gtk_widget_grab_focus (GTK_WIDGET (embed));
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]