+ if (EV_IS_JOB_THUMBNAIL (job)) {
+ if (new_priority == EV_JOB_PRIORITY_LOW) {
+ if (remove_job_from_queue_locked (thumbnail_queue_high, job)) {
+ add_job_to_queue_locked (thumbnail_queue_low, job);
+ retval = TRUE;
+ }
+ } else if (new_priority == EV_JOB_PRIORITY_HIGH) {
+ if (remove_job_from_queue_locked (thumbnail_queue_low, job)) {
+ add_job_to_queue_locked (thumbnail_queue_high, job);
+ retval = TRUE;
+ }
+ }
+ } else if (EV_IS_JOB_RENDER (job)) {
+ if (new_priority == EV_JOB_PRIORITY_LOW) {
+ if (remove_job_from_queue_locked (render_queue_high, job)) {
+ add_job_to_queue_locked (render_queue_low, job);
+ retval = TRUE;
+ }
+ } else if (new_priority == EV_JOB_PRIORITY_HIGH) {
+ if (remove_job_from_queue_locked (render_queue_low, job)) {
+ add_job_to_queue_locked (render_queue_high, job);
+ retval = TRUE;
+ }
+ }
+ } else {
+ /* We don't have a priority queue for any of the other jobs */
+ }
+ g_object_unref (job);
+ g_mutex_unlock (ev_queue_mutex);
+
+ return retval;