Cleanups and simplifications, espc. batch queue

This commit is contained in:
Oliver Duis
2011-08-13 14:44:20 +02:00
parent 0eb0021fa7
commit 3848e51e44
13 changed files with 38 additions and 63 deletions

View File

@@ -179,14 +179,17 @@ void BatchQueuePanel::updateTab (int qsize)
}
}
void BatchQueuePanel::queueSizeChanged (int qsize)
void BatchQueuePanel::queueSizeChanged (int qsize, bool queueEmptied)
{
updateTab ( qsize);
}
void BatchQueuePanel::imageProcessingReady (Glib::ustring fname) {
if (queueEmptied) {
stopBatchProc ();
fdir->set_sensitive (true);
fformat->set_sensitive (true);
parent->imageDeveloped (fname);
SoundManager::playSoundAsync(options.sndBatchQueueDone);
}
}
void BatchQueuePanel::startBatchProc () {
@@ -201,11 +204,12 @@ void BatchQueuePanel::startBatchProc () {
if (batchQueue->hasJobs()) {
fdir->set_sensitive (false);
fformat->set_sensitive (false);
saveOptions();
saveOptions();
batchQueue->startProcessing ();
}
else
stopBatchProc ();
updateTab (batchQueue->getEntries().size());
}
@@ -228,15 +232,6 @@ void BatchQueuePanel::addBatchQueueJobs ( std::vector<BatchQueueEntry*> &entries
startBatchProc ();
}
void BatchQueuePanel::queueEmpty () {
stopBatchProc ();
fdir->set_sensitive (true);
fformat->set_sensitive (true);
SoundManager::playSoundAsync(options.sndBatchQueueDone);
}
bool BatchQueuePanel::canStartNext () {
if (start->get_active ())