[evince] libview: Add dual-odd-left property to EvDocumentModel
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] libview: Add dual-odd-left property to EvDocumentModel
- Date: Sat, 17 Dec 2011 11:00:46 +0000 (UTC)
commit 1346a98131b6e5dcf6308262aeed7acf62ff8a50
Author: Cyril Soldani <cyril soldani legiasoft com>
Date: Sat Dec 17 11:53:19 2011 +0100
libview: Add dual-odd-left property to EvDocumentModel
libview/ev-document-model.c | 39 +++++++++++++++++++++++++++++++++++++++
libview/ev-document-model.h | 3 +++
2 files changed, 42 insertions(+), 0 deletions(-)
---
diff --git a/libview/ev-document-model.c b/libview/ev-document-model.c
index 30353c3..3618667 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 b283615..df3db14 100644
--- a/libview/ev-document-model.h
+++ b/libview/ev-document-model.h
@@ -78,6 +78,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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]