summaryrefslogtreecommitdiff
path: root/libview
diff options
context:
space:
mode:
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);