Tidy up progress reporting for examine content.
authorCarl Hetherington <cth@carlh.net>
Sun, 21 Oct 2012 12:30:14 +0000 (13:30 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 21 Oct 2012 12:30:14 +0000 (13:30 +0100)
src/lib/examine_content_job.cc
src/lib/job.cc

index 44a9f4ce9c9a13148f24c8459cc76aecb12c06f7..40665e1e89eed2696b6c365d019f39d7f8fdd3f1 100644 (file)
@@ -45,6 +45,10 @@ ExamineContentJob::~ExamineContentJob ()
 string
 ExamineContentJob::name () const
 {
+       if (_fs->name().empty ()) {
+               return "Examine content";
+       }
+       
        return String::compose ("Examine content of %1", _fs->name());
 }
 
index 2049e69b0093d2c0d94609c33aa09326b0fa1d7d..68cdce3cd3a961ed1e3e272280d2ce3c62ac4fa6 100644 (file)
@@ -161,6 +161,7 @@ void
 Job::set_progress (float p)
 {
        boost::mutex::scoped_lock lm (_progress_mutex);
+       _progress_unknown = false;
        _stack.back().normalised = p;
 }
 
@@ -232,7 +233,7 @@ Job::set_error (string e)
        _error = e;
 }
 
-/** Say that this job's progress will always be unknown */
+/** Say that this job's progress will be unknown until further notice */
 void
 Job::set_progress_unknown ()
 {