From 79cb06835073622ffeaa082eac48b70c8d1ee7a7 Mon Sep 17 00:00:00 2001 From: Nickolay V. Shmyrev Date: Fri, 09 Jun 2006 05:24:35 +0000 Subject: Fixes bug #344160: if the xfer job doesn't complete because a password is * shell/ev-jobs.c: (ev_job_xfer_run): * shell/ev-window.c: (password_dialog_response), (ev_window_popup_password_dialog), (ev_window_xfer_job_cb), (ev_window_dispose): Fixes bug #344160: if the xfer job doesn't complete because a password is required, reload the existing instance instead of creating a new one. --- (limited to 'shell/ev-jobs.c') diff --git a/shell/ev-jobs.c b/shell/ev-jobs.c index e9f29eb..c88c011 100644 --- a/shell/ev-jobs.c +++ b/shell/ev-jobs.c @@ -434,6 +434,17 @@ ev_job_xfer_run (EvJobXfer *job) g_error_free (job->error); job->error = NULL; } + + /* This job may already have a document even if the job didn't complete + because, e.g., a password is required - if so, just reload rather than + creating a new instance */ + if (EV_JOB (job)->document) { + ev_document_load (EV_JOB (job)->document, + job->local_uri ? job->local_uri : job->uri, + &job->error); + EV_JOB (job)->finished = TRUE; + return; + } source_uri = gnome_vfs_uri_new (job->uri); if (!gnome_vfs_uri_is_local (source_uri) && !job->local_uri) { -- cgit v0.9.1