#include "ev-file-helpers.h"
#include "ev-document-fonts.h"
#include "ev-async-renderer.h"
+#include "ev-debug.h"
#include <errno.h>
#include <glib/gstdio.h>
{
EvJobLinks *job;
+ ev_debug_message (DEBUG_JOBS, NULL);
+
job = EV_JOB_LINKS (object);
if (job->model) {
job = EV_JOB_RENDER (object);
if (job->ev_page) {
+ ev_debug_message (DEBUG_JOBS, "page: %d", job->ev_page->index);
g_object_unref (job->ev_page);
job->ev_page = NULL;
}
job = EV_JOB_THUMBNAIL (object);
+ ev_debug_message (DEBUG_JOBS, "%d", job->page);
+
if (job->thumbnail) {
g_object_unref (job->thumbnail);
job->thumbnail = NULL;
job = EV_JOB_PRINT (object);
+ ev_debug_message (DEBUG_JOBS, NULL);
+
if (job->temp_file) {
g_unlink (job->temp_file);
g_free (job->temp_file);
void
ev_job_finished (EvJob *job)
{
+ ev_debug_message (DEBUG_JOBS, NULL);
+
g_return_if_fail (EV_IS_JOB (job));
g_signal_emit (job, job_signals[FINISHED], 0);
{
EvJob *job;
+ ev_debug_message (DEBUG_JOBS, NULL);
+
job = g_object_new (EV_TYPE_JOB_LINKS, NULL);
job->document = g_object_ref (document);
void
ev_job_links_run (EvJobLinks *job)
{
+ ev_debug_message (DEBUG_JOBS, NULL);
+
g_return_if_fail (EV_IS_JOB_LINKS (job));
ev_document_doc_mutex_lock ();
{
EvJobRender *job;
+ ev_debug_message (DEBUG_JOBS, "page: %d", page);
+
job = g_object_new (EV_TYPE_JOB_RENDER, NULL);
EV_JOB (job)->document = g_object_ref (document);
static gboolean
notify_page_ready (EvJobRender *job)
{
+ ev_debug_message (DEBUG_JOBS, "%d", job->ev_page->index);
+
g_signal_emit (job, job_render_signals[PAGE_READY], 0);
return FALSE;
static void
ev_job_render_page_ready (EvJobRender *job)
{
+ ev_debug_message (DEBUG_JOBS, "%d", job->ev_page->index);
+
job->page_ready = TRUE;
g_idle_add_full (G_PRIORITY_HIGH_IDLE,
(GSourceFunc)notify_page_ready,
{
g_return_if_fail (EV_IS_JOB_RENDER (job));
+ ev_debug_message (DEBUG_JOBS, "page: %d", job->page);
+
ev_document_doc_mutex_lock ();
if (EV_JOB (job)->async) {
{
EvJobThumbnail *job;
+ ev_debug_message (DEBUG_JOBS, "%d", page);
+
job = g_object_new (EV_TYPE_JOB_THUMBNAIL, NULL);
EV_JOB (job)->document = g_object_ref (document);
{
EvRenderContext *rc;
EvPage *page;
+
+ ev_debug_message (DEBUG_JOBS, "%d", job->page);
g_return_if_fail (EV_IS_JOB_THUMBNAIL (job));
{
EvJobFonts *job;
+ ev_debug_message (DEBUG_JOBS, NULL);
+
job = g_object_new (EV_TYPE_JOB_FONTS, NULL);
EV_JOB (job)->document = g_object_ref (document);
{
EvDocumentFonts *fonts;
+ ev_debug_message (DEBUG_JOBS, NULL);
+
g_return_if_fail (EV_IS_JOB_FONTS (job));
ev_document_doc_mutex_lock ();
{
EvJobLoad *job = EV_JOB_LOAD (object);
+ ev_debug_message (DEBUG_JOBS, "%s", job->uri);
+
if (job->uri) {
g_free (job->uri);
job->uri = NULL;
{
EvJobLoad *job;
+ ev_debug_message (DEBUG_JOBS, "%s", uri);
+
job = g_object_new (EV_TYPE_JOB_LOAD, NULL);
job->uri = g_strdup (uri);
void
ev_job_load_set_uri (EvJobLoad *job, const gchar *uri)
{
+ ev_debug_message (DEBUG_JOBS, "%s", uri);
+
if (job->uri)
g_free (job->uri);
job->uri = g_strdup (uri);
ev_job_load_run (EvJobLoad *job)
{
g_return_if_fail (EV_IS_JOB_LOAD (job));
+
+ ev_debug_message (DEBUG_JOBS, "%s", job->uri);
if (job->error) {
g_error_free (job->error);
{
EvJobSave *job = EV_JOB_SAVE (object);
+ ev_debug_message (DEBUG_JOBS, "%s", job->uri);
+
if (job->uri) {
g_free (job->uri);
job->uri = NULL;
{
EvJobSave *job;
+ ev_debug_message (DEBUG_JOBS, "uri: %s, document_uri: %s", uri, document_uri);
+
job = g_object_new (EV_TYPE_JOB_SAVE, NULL);
EV_JOB (job)->document = g_object_ref (document);
gchar *filename;
gchar *tmp_filename;
gchar *local_uri;
+
+ ev_debug_message (DEBUG_JOBS, "uri: %s, document_uri: %s", job->uri, job->document_uri);
filename = ev_tmp_filename ("saveacopy");
tmp_filename = g_strdup_printf ("%s.XXXXXX", filename);
{
EvJobPrint *job;
+ ev_debug_message (DEBUG_JOBS, "format: %s, width: %f, height:%f,"
+ "n_ranges: %d, pages_per_sheet: %d, copies: %d,"
+ "collate: %s, reverse: %s",
+ format, width, height, n_ranges, pages_per_sheet, copies,
+ collate ? "True" : "False", reverse ? "True" : "False");
+
job = g_object_new (EV_TYPE_JOB_PRINT, NULL);
EV_JOB (job)->document = g_object_ref (document);
g_return_if_fail (EV_IS_JOB_PRINT (job));
+ ev_debug_message (DEBUG_JOBS, NULL);
+
if (job->temp_file)
g_free (job->temp_file);
job->temp_file = NULL;