Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-job-queue.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2006-07-23 19:59:43 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2006-07-23 19:59:43 (GMT)
commit1bc11bf9ca800edd4469d5e8c8aeb605d3037bc7 (patch)
tree2230a6065f7b0ff89fde7282fcae97b9630a1821 /shell/ev-job-queue.c
parentee62be520b68ca0ff33fd7ed9b5f67c8ecf69e1e (diff)
Use GtkPrint instead of GnomePrint when it's available. Fixes bug #348422
2006-07-23 Carlos Garcia Campos <carlosgc@gnome.org> * configure.ac: * shell/Makefile.am: * shell/ev-job-queue.c: * shell/ev-jobs.[ch]: * shell/ev-sidebar-links.c: * shell/ev-window.[ch]: Use GtkPrint instead of GnomePrint when it's available. Fixes bug #348422
Diffstat (limited to 'shell/ev-job-queue.c')
-rw-r--r--shell/ev-job-queue.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/shell/ev-job-queue.c b/shell/ev-job-queue.c
index c8c51d8..09e7bb8 100644
--- a/shell/ev-job-queue.c
+++ b/shell/ev-job-queue.c
@@ -14,6 +14,7 @@ static GQueue *thumbnail_queue_high = NULL;
static GQueue *thumbnail_queue_low = NULL;
static GQueue *xfer_queue = NULL;
static GQueue *fonts_queue = NULL;
+static GQueue *print_queue = NULL;
/* Queues used for backends supporting EvAsyncRender interface,
they are executed on the main thread */
@@ -101,6 +102,8 @@ handle_job (EvJob *job)
ev_job_render_run (EV_JOB_RENDER (job));
else if (EV_IS_JOB_FONTS (job))
ev_job_fonts_run (EV_JOB_FONTS (job));
+ else if (EV_IS_JOB_PRINT (job))
+ ev_job_print_run (EV_JOB_PRINT (job));
if (!EV_JOB (job)->async) {
/* We let the idle own a ref, as we (the queue) are done with the job. */
@@ -144,6 +147,10 @@ search_for_jobs_unlocked (void)
if (job)
return job;
+ job = (EvJob *) g_queue_pop_head (print_queue);
+ if (job)
+ return job;
+
return NULL;
}
@@ -156,7 +163,8 @@ no_jobs_available_unlocked (void)
&& g_queue_is_empty (xfer_queue)
&& g_queue_is_empty (thumbnail_queue_high)
&& g_queue_is_empty (thumbnail_queue_low)
- && g_queue_is_empty (fonts_queue);
+ && g_queue_is_empty (fonts_queue)
+ && g_queue_is_empty (print_queue);
}
/* the thread mainloop function */
@@ -220,6 +228,7 @@ ev_job_queue_init (void)
thumbnail_queue_high = g_queue_new ();
thumbnail_queue_low = g_queue_new ();
fonts_queue = g_queue_new ();
+ print_queue = g_queue_new ();
g_thread_create (ev_render_thread, NULL, FALSE, NULL);
@@ -256,6 +265,9 @@ find_queue (EvJob *job,
} else if (EV_IS_JOB_FONTS (job)) {
/* the priority doesn't effect fonts */
return fonts_queue;
+ } else if (EV_IS_JOB_PRINT (job)) {
+ /* the priority doesn't effect print */
+ return print_queue;
}
}
@@ -395,6 +407,8 @@ ev_job_queue_remove_job (EvJob *job)
retval = remove_job_from_queue_locked (xfer_queue, job);
} else if (EV_IS_JOB_FONTS (job)) {
retval = remove_job_from_queue_locked (fonts_queue, job);
+ } else if (EV_IS_JOB_PRINT (job)) {
+ retval = remove_job_from_queue_locked (print_queue, job);
} else {
g_assert_not_reached ();
}