summaryrefslogtreecommitdiff
path: root/libview
diff options
context:
space:
mode:
Diffstat (limited to 'libview')
-rw-r--r--libview/ev-document-model.c27
-rw-r--r--libview/ev-document-model.h4
-rw-r--r--libview/ev-jobs.c18
3 files changed, 45 insertions, 4 deletions
diff --git a/libview/ev-document-model.c b/libview/ev-document-model.c
index 403df466..00ce782b 100644
--- a/libview/ev-document-model.c
+++ b/libview/ev-document-model.c
@@ -106,10 +106,22 @@ ev_document_model_set_property (GObject *object,
ev_document_model_set_page (model, g_value_get_int (value));
break;
case PROP_ROTATION:
- ev_document_model_set_rotation (model, g_value_get_int (value));
- break;
+ {
+ if ( model->document->iswebdocument == TRUE ) {
+ model->rotation=0;
+ }
+ else {
+ ev_document_model_set_rotation (model, g_value_get_int (value));
+ }
+ break;
+ }
case PROP_INVERTED_COLORS:
- ev_document_model_set_inverted_colors (model, g_value_get_boolean (value));
+ if ( model->document->iswebdocument == TRUE ) {
+ atril_web_document_set_inverted_colors(model,g_value_get_boolean(value));
+ }
+ else {
+ ev_document_model_set_inverted_colors (model, g_value_get_boolean (value));
+ }
break;
case PROP_SCALE:
ev_document_model_set_scale (model, g_value_get_double (value));
@@ -490,6 +502,15 @@ ev_document_model_set_inverted_colors (EvDocumentModel *model,
g_object_notify (G_OBJECT (model), "inverted-colors");
}
+void
+atril_web_document_set_inverted_colors (EvDocumentModel *model,
+ gboolean inverted_colors)
+{
+ //TODO
+ model->inverted_colors = FALSE;
+ g_object_notify (G_OBJECT (model), "inverted-colors");
+}
+
gboolean
ev_document_model_get_inverted_colors (EvDocumentModel *model)
{
diff --git a/libview/ev-document-model.h b/libview/ev-document-model.h
index b8bea62c..f9d175c0 100644
--- a/libview/ev-document-model.h
+++ b/libview/ev-document-model.h
@@ -69,7 +69,9 @@ EvSizingMode ev_document_model_get_sizing_mode (EvDocumentModel *model);
void ev_document_model_set_rotation (EvDocumentModel *model,
gint rotation);
gint ev_document_model_get_rotation (EvDocumentModel *model);
-void ev_document_model_set_inverted_colors (EvDocumentModel *model,
+void ev_document_model_set_inverted_colors (EvDocumentModel *model,
+ gboolean inverted_colors);
+void atril_web_document_set_inverted_colors(EvDocumentModel *model,
gboolean inverted_colors);
gboolean ev_document_model_get_inverted_colors (EvDocumentModel *model);
void ev_document_model_set_continuous (EvDocumentModel *model,
diff --git a/libview/ev-jobs.c b/libview/ev-jobs.c
index d8d3043d..76e183a1 100644
--- a/libview/ev-jobs.c
+++ b/libview/ev-jobs.c
@@ -568,6 +568,24 @@ ev_job_render_run (EvJob *job)
ev_document_fc_mutex_lock ();
ev_page = ev_document_get_page (job->document, job_render->page);
+
+ if ( job->document->iswebdocument == TRUE )
+ {
+ return TRUE;
+
+ if (g_cancellable_is_cancelled (job->cancellable)) {
+ ev_document_fc_mutex_unlock ();
+ ev_document_doc_mutex_unlock ();
+ g_object_unref (rc);
+
+ return FALSE;
+ }
+
+ ev_document_fc_mutex_unlock ();
+ ev_document_doc_mutex_unlock ();
+ ev_job_succeeded (job);
+ return FALSE;
+ }
rc = ev_render_context_new (ev_page, job_render->rotation, job_render->scale);
g_object_unref (ev_page);