summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-07-14 12:55:58 +0200
committerraveit65 <[email protected]>2016-07-22 15:23:49 +0200
commitd258be6e6cdf2326463600df83ecfdb5b9de6d5b (patch)
tree8479509ef029f78be992c3411266d8c61b6f4093
parent1b6acd1e6c7bc9b494aa56f2eda7a6ee32a8a60c (diff)
downloadatril-d258be6e6cdf2326463600df83ecfdb5b9de6d5b.tar.bz2
atril-d258be6e6cdf2326463600df83ecfdb5b9de6d5b.tar.xz
document-model: Make dual mode and dual mode odd page left mutally exclusive
The can't be set at the same time, but they can be both unset. taken from: https://git.gnome.org/browse/evince/commit/?id=39106f4
-rw-r--r--libview/ev-document-model.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libview/ev-document-model.c b/libview/ev-document-model.c
index 856ee36e..572f5526 100644
--- a/libview/ev-document-model.c
+++ b/libview/ev-document-model.c
@@ -559,6 +559,11 @@ ev_document_model_set_dual_page (EvDocumentModel *model,
model->dual_page = dual_page;
g_object_notify (G_OBJECT (model), "dual-page");
+
+ if (dual_page && model->dual_page_odd_left) {
+ model->dual_page_odd_left = FALSE;
+ g_object_notify (G_OBJECT (model), "dual-odd-left");
+ }
}
gboolean
@@ -583,6 +588,11 @@ ev_document_model_set_dual_page_odd_pages_left (EvDocumentModel *model,
model->dual_page_odd_left = odd_left;
g_object_notify (G_OBJECT (model), "dual-odd-left");
+
+ if (odd_left && model->dual_page) {
+ model->dual_page = FALSE;
+ g_object_notify (G_OBJECT (model), "dual-page");
+ }
}
gboolean