[evince] shell: check for file changes when reopening a PDF
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] shell: check for file changes when reopening a PDF
- Date: Wed, 20 Jan 2021 02:46:47 +0000 (UTC)
commit 46d6ba369d2acc09ffd51bf66751a1a384f018e1
Author: Antonio Eletto <antele gmail com>
Date: Wed Jan 20 02:46:46 2021 +0000
shell: check for file changes when reopening a PDF
when reopening a PDF with unsaved changes,
it show an alert dialog
Fixes #339
shell/ev-window.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 30c4fa1f..eb206621 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -314,6 +314,8 @@ static void ev_window_set_page_mode (EvWindow *windo
EvWindowPageMode page_mode);
static void ev_window_load_job_cb (EvJob *job,
gpointer data);
+static gboolean ev_window_check_document_modified (EvWindow *ev_window,
+ EvWindowAction command);
static void ev_window_reload_document (EvWindow *window,
EvLinkDest *dest);
static void ev_window_document_modified_cb (EvDocument *document,
@@ -2404,6 +2406,8 @@ ev_window_open_uri (EvWindow *ev_window,
if (priv->uri &&
g_ascii_strcasecmp (priv->uri, uri) == 0) {
+ if (ev_window_check_document_modified (ev_window, EV_WINDOW_ACTION_RELOAD))
+ return;
ev_window_reload_document (ev_window, dest);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]