summaryrefslogtreecommitdiff
path: root/libview
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-06-24 18:40:39 +0200
committerraveit65 <[email protected]>2016-06-29 16:23:03 +0200
commit71b018f93891bcb414c72d956b4b5601045c5937 (patch)
tree916d1c75fb6e2fe05a19ba40bf964215a132cf4c /libview
parent2364be65f6611547e86c5f91dcd1f696d9f3869e (diff)
downloadatril-71b018f93891bcb414c72d956b4b5601045c5937.tar.bz2
atril-71b018f93891bcb414c72d956b4b5601045c5937.tar.xz
libview: Add dual-odd-left property to EvDocumentModel
taken from: https://git.gnome.org/browse/evince/commit/?id=1346a98
Diffstat (limited to 'libview')
-rw-r--r--libview/ev-document-model.c39
-rw-r--r--libview/ev-document-model.h3
2 files changed, 42 insertions, 0 deletions
diff --git a/libview/ev-document-model.c b/libview/ev-document-model.c
index 22956288..856ee36e 100644
--- a/libview/ev-document-model.c
+++ b/libview/ev-document-model.c
@@ -37,6 +37,7 @@ struct _EvDocumentModel
EvSizingMode sizing_mode;
guint continuous : 1;
guint dual_page : 1;
+ guint dual_page_odd_left : 1;
guint fullscreen : 1;
guint inverted_colors : 1;
@@ -64,6 +65,7 @@ enum {
PROP_SIZING_MODE,
PROP_CONTINUOUS,
PROP_DUAL_PAGE,
+ PROP_DUAL_PAGE_ODD_LEFT,
PROP_FULLSCREEN
};
@@ -123,6 +125,9 @@ ev_document_model_set_property (GObject *object,
case PROP_DUAL_PAGE:
ev_document_model_set_dual_page (model, g_value_get_boolean (value));
break;
+ case PROP_DUAL_PAGE_ODD_LEFT:
+ ev_document_model_set_dual_page_odd_pages_left (model, g_value_get_boolean (value));
+ break;
case PROP_FULLSCREEN:
ev_document_model_set_fullscreen (model, g_value_get_boolean (value));
break;
@@ -164,6 +169,9 @@ ev_document_model_get_property (GObject *object,
case PROP_DUAL_PAGE:
g_value_set_boolean (value, ev_document_model_get_dual_page (model));
break;
+ case PROP_DUAL_PAGE_ODD_LEFT:
+ g_value_set_boolean (value, ev_document_model_get_dual_page_odd_pages_left (model));
+ break;
case PROP_FULLSCREEN:
g_value_set_boolean (value, ev_document_model_get_fullscreen (model));
break;
@@ -240,6 +248,13 @@ ev_document_model_class_init (EvDocumentModelClass *klass)
FALSE,
G_PARAM_READWRITE));
g_object_class_install_property (g_object_class,
+ PROP_DUAL_PAGE_ODD_LEFT,
+ g_param_spec_boolean ("dual-odd-left",
+ "Odd Pages Left",
+ "Whether odd pages are displayed on left side in dual mode",
+ FALSE,
+ G_PARAM_READWRITE));
+ g_object_class_install_property (g_object_class,
PROP_FULLSCREEN,
g_param_spec_boolean ("fullscreen",
"Fullscreen",
@@ -555,6 +570,30 @@ ev_document_model_get_dual_page (EvDocumentModel *model)
}
void
+ev_document_model_set_dual_page_odd_pages_left (EvDocumentModel *model,
+ gboolean odd_left)
+{
+ g_return_if_fail (EV_IS_DOCUMENT_MODEL (model));
+
+ odd_left = odd_left != FALSE;
+
+ if (odd_left == model->dual_page_odd_left)
+ return;
+
+ model->dual_page_odd_left = odd_left;
+
+ g_object_notify (G_OBJECT (model), "dual-odd-left");
+}
+
+gboolean
+ev_document_model_get_dual_page_odd_pages_left (EvDocumentModel *model)
+{
+ g_return_val_if_fail (EV_IS_DOCUMENT_MODEL (model), FALSE);
+
+ return model->dual_page_odd_left;
+}
+
+void
ev_document_model_set_fullscreen (EvDocumentModel *model,
gboolean fullscreen)
{
diff --git a/libview/ev-document-model.h b/libview/ev-document-model.h
index f9d175c0..29794a3b 100644
--- a/libview/ev-document-model.h
+++ b/libview/ev-document-model.h
@@ -80,6 +80,9 @@ gboolean ev_document_model_get_continuous (EvDocumentModel *model);
void ev_document_model_set_dual_page (EvDocumentModel *model,
gboolean dual_page);
gboolean ev_document_model_get_dual_page (EvDocumentModel *model);
+void ev_document_model_set_dual_page_odd_pages_left (EvDocumentModel *model,
+ gboolean odd_left);
+gboolean ev_document_model_get_dual_page_odd_pages_left (EvDocumentModel *model);
void ev_document_model_set_fullscreen (EvDocumentModel *model,
gboolean fullscreen);
gboolean ev_document_model_get_fullscreen (EvDocumentModel *model);