[evince] pdf: Set the modified status of a document after a modification
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] pdf: Set the modified status of a document after a modification
- Date: Sun, 1 Oct 2017 12:53:40 +0000 (UTC)
commit 5048cc7dbdd53c08d6ece43f3f35361e03334511
Author: Germán Poo-Caamaño <gpoo gnome org>
Date: Fri May 12 10:51:44 2017 -0300
pdf: Set the modified status of a document after a modification
A PDF can be modified by adding/editing/removing annotations
or editing a form.
https://bugzilla.gnome.org/show_bug.cgi?id=767611
backend/pdf/ev-poppler.cc | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc
index 214094f..1b18ce1 100644
--- a/backend/pdf/ev-poppler.cc
+++ b/backend/pdf/ev-poppler.cc
@@ -265,6 +265,7 @@ pdf_document_save (EvDocument *document,
if (! retval)
convert_error (poppler_error, error);
+ ev_document_set_modified (EV_DOCUMENT (document), FALSE);
return retval;
}
@@ -2568,6 +2569,7 @@ pdf_document_forms_form_field_text_set_text (EvDocumentForms *document,
poppler_form_field_text_set_text (poppler_field, text);
PDF_DOCUMENT (document)->forms_modified = TRUE;
+ ev_document_set_modified (EV_DOCUMENT (document), TRUE);
}
static void
@@ -2583,6 +2585,7 @@ pdf_document_forms_form_field_button_set_state (EvDocumentForms *document,
poppler_form_field_button_set_state (poppler_field, state);
PDF_DOCUMENT (document)->forms_modified = TRUE;
+ ev_document_set_modified (EV_DOCUMENT (document), TRUE);
}
static gboolean
@@ -2664,6 +2667,7 @@ pdf_document_forms_form_field_choice_select_item (EvDocumentForms *document,
poppler_form_field_choice_select_item (poppler_field, index);
PDF_DOCUMENT (document)->forms_modified = TRUE;
+ ev_document_set_modified (EV_DOCUMENT (document), TRUE);
}
static void
@@ -2679,6 +2683,7 @@ pdf_document_forms_form_field_choice_toggle_item (EvDocumentForms *document,
poppler_form_field_choice_toggle_item (poppler_field, index);
PDF_DOCUMENT (document)->forms_modified = TRUE;
+ ev_document_set_modified (EV_DOCUMENT (document), TRUE);
}
static void
@@ -2693,6 +2698,7 @@ pdf_document_forms_form_field_choice_unselect_all (EvDocumentForms *document,
poppler_form_field_choice_unselect_all (poppler_field);
PDF_DOCUMENT (document)->forms_modified = TRUE;
+ ev_document_set_modified (EV_DOCUMENT (document), TRUE);
}
static void
@@ -2708,6 +2714,7 @@ pdf_document_forms_form_field_choice_set_text (EvDocumentForms *document,
poppler_form_field_choice_set_text (poppler_field, text);
PDF_DOCUMENT (document)->forms_modified = TRUE;
+ ev_document_set_modified (EV_DOCUMENT (document), TRUE);
}
static gchar *
@@ -3194,6 +3201,7 @@ pdf_document_annotations_remove_annotation (EvDocumentAnnotations *document_anno
}
pdf_document->annots_modified = TRUE;
+ ev_document_set_modified (EV_DOCUMENT (document_annotations), TRUE);
}
/* FIXME: this could be moved to poppler */
@@ -3397,6 +3405,7 @@ pdf_document_annotations_add_annotation (EvDocumentAnnotations *document_annotat
}
pdf_document->annots_modified = TRUE;
+ ev_document_set_modified (EV_DOCUMENT (document_annotations), TRUE);
}
/* FIXME: We could probably add this to poppler */
@@ -3615,6 +3624,7 @@ pdf_document_annotations_save_annotation (EvDocumentAnnotations *document_annota
}
PDF_DOCUMENT (document_annotations)->annots_modified = TRUE;
+ ev_document_set_modified (EV_DOCUMENT (document_annotations), TRUE);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]