diff --git a/doc/Changelog.html b/doc/Changelog.html
index a2927c88..8c153b5f 100644
--- a/doc/Changelog.html
+++ b/doc/Changelog.html
@@ -18,7 +18,8 @@ a:visited { color: #0000EE; }
LameXP - Version History
Changes between v4.06 and v4.07 [unreleased]:
-- Added option to select the "overwrite mode" to advanced options
+
- Added option to select the "overwrite mode" to advanced options tab
+
- Added option to filter the log entries on the "processing" dialog (see context menu)
Changes between v4.05 and v4.06 [2012-11-04]:
diff --git a/etc/Translation/Blank.ts b/etc/Translation/Blank.ts
index d6fa36d6..e9d13857 100644
--- a/etc/Translation/Blank.ts
+++ b/etc/Translation/Blank.ts
@@ -2558,32 +2558,32 @@
-
+
Overwrite Mode
-
+
Warning: This mode may overwrite existing files with no way to revert!
-
+
Continue
-
+
Revert
-
+
Already Running
-
+
LameXP is already running, please use the running instance!
@@ -3064,141 +3064,181 @@
-
+
Show details for selected job
-
+
Browse Output File Location
-
+
+ Filter Log Items
+
+
+
+
+ Show Running Only
+
+
+
+
+ Show Succeeded Only
+
+
+
+
+ Show Failed Only
+
+
+
+
+ Show Skipped Only
+
+
+
+
+ Show All Items
+
+
+
+
Encoding Files
-
+
Your files are being encoded, please be patient...
-
+
Encoding files, please wait...
-
+
Multi-threading enabled: Running %1 instances in parallel!
-
+
Aborted! Waiting for running jobs to terminate...
-
+
Encoding: %1 files of %2 completed so far, please wait...
-
+
Creating the playlist file, please wait...
-
+
Process was aborted by the user after %1 file(s)!
-
+
Process was aborted prematurely by the user!
-
+
LameXP - Aborted
-
+
Process was aborted by the user.
-
+
Process finished after %1.
-
+
+ Error: %1 of %2 files failed (%3 files skipped). Double-click failed items for detailed information!
+
+
+
+
Error: %1 of %2 files failed. Double-click failed items for detailed information!
-
+
LameXP - Error
-
+
At least one file has failed!
-
-
+
+ All files completed successfully. Skipped %1 files.
+
+
+
+
+
All files completed successfully.
-
+
LameXP - Done
-
+
Playlist creation failed
-
+
The playlist file could not be created:
-
+
Warning: Computer will shutdown in %1 seconds...
-
-
+
+
Cancel Shutdown
-
+
hour(s)
-
-
+
+
minute(s)
-
-
+
+
second(s)
-
+
millisecond(s)
diff --git a/etc/Translation/LameXP_DE.ts b/etc/Translation/LameXP_DE.ts
index e3f4829c..3a714fd1 100644
--- a/etc/Translation/LameXP_DE.ts
+++ b/etc/Translation/LameXP_DE.ts
@@ -2478,6 +2478,38 @@
millisecond(s)
Millisekunde(n)
+
+ Filter Log Items
+ Logeinträge filtern
+
+
+ Show Running Only
+ Nur laufende anzeigen
+
+
+ Show Succeeded Only
+ Nur erfolgreiche anzeigen
+
+
+ Show Failed Only
+ Nur fehlgeschlagene anzeigen
+
+
+ Show Skipped Only
+ Nur übersprungene anzeigen
+
+
+ Show All Items
+ Alle Einträge anzeigen
+
+
+ Error: %1 of %2 files failed (%3 files skipped). Double-click failed items for detailed information!
+ Fehler: %1 von %2 Dateien sind fehlgeschlagen (%3 übersprungen). Doppelklicken um Details anzuzeigen!
+
+
+ All files completed successfully. Skipped %1 files.
+ Alle Dateien wurden erfolgreich umgewandelt. %1 Dateien wurden übersprungen.
+
ProgressModel
diff --git a/etc/Translation/LameXP_ES.ts b/etc/Translation/LameXP_ES.ts
index 512563da..758cd960 100644
--- a/etc/Translation/LameXP_ES.ts
+++ b/etc/Translation/LameXP_ES.ts
@@ -2477,6 +2477,38 @@
millisecond(s)
milisegundo(s)
+
+ Filter Log Items
+
+
+
+ Show Running Only
+
+
+
+ Show Succeeded Only
+
+
+
+ Show Failed Only
+
+
+
+ Show Skipped Only
+
+
+
+ Show All Items
+
+
+
+ Error: %1 of %2 files failed (%3 files skipped). Double-click failed items for detailed information!
+
+
+
+ All files completed successfully. Skipped %1 files.
+
+
ProgressModel
diff --git a/etc/Translation/LameXP_FR.ts b/etc/Translation/LameXP_FR.ts
index 56e05602..7f667630 100644
--- a/etc/Translation/LameXP_FR.ts
+++ b/etc/Translation/LameXP_FR.ts
@@ -2487,6 +2487,38 @@ Ouvrir le dossier récursivement...
millisecond(s)
+
+ Filter Log Items
+
+
+
+ Show Running Only
+
+
+
+ Show Succeeded Only
+
+
+
+ Show Failed Only
+
+
+
+ Show Skipped Only
+
+
+
+ Show All Items
+
+
+
+ Error: %1 of %2 files failed (%3 files skipped). Double-click failed items for detailed information!
+
+
+
+ All files completed successfully. Skipped %1 files.
+
+
ProgressModel
diff --git a/etc/Translation/LameXP_IT.ts b/etc/Translation/LameXP_IT.ts
index 63c4ce98..9a14f96c 100644
--- a/etc/Translation/LameXP_IT.ts
+++ b/etc/Translation/LameXP_IT.ts
@@ -2478,6 +2478,38 @@
millisecond(s)
+
+ Filter Log Items
+
+
+
+ Show Running Only
+
+
+
+ Show Succeeded Only
+
+
+
+ Show Failed Only
+
+
+
+ Show Skipped Only
+
+
+
+ Show All Items
+
+
+
+ Error: %1 of %2 files failed (%3 files skipped). Double-click failed items for detailed information!
+
+
+
+ All files completed successfully. Skipped %1 files.
+
+
ProgressModel
diff --git a/etc/Translation/LameXP_KR.ts b/etc/Translation/LameXP_KR.ts
index 45e7528d..06e6fb84 100644
--- a/etc/Translation/LameXP_KR.ts
+++ b/etc/Translation/LameXP_KR.ts
@@ -2477,6 +2477,38 @@
millisecond(s)
ms
+
+ Filter Log Items
+
+
+
+ Show Running Only
+
+
+
+ Show Succeeded Only
+
+
+
+ Show Failed Only
+
+
+
+ Show Skipped Only
+
+
+
+ Show All Items
+
+
+
+ Error: %1 of %2 files failed (%3 files skipped). Double-click failed items for detailed information!
+
+
+
+ All files completed successfully. Skipped %1 files.
+
+
ProgressModel
diff --git a/etc/Translation/LameXP_PL.ts b/etc/Translation/LameXP_PL.ts
index 7cb2d3ff..01f5a93b 100644
--- a/etc/Translation/LameXP_PL.ts
+++ b/etc/Translation/LameXP_PL.ts
@@ -2559,32 +2559,32 @@
Nie można zapisać do wybranej lokalizacji. Prosze wybierz inną lokalizację!
-
+
Overwrite Mode
-
+
Warning: This mode may overwrite existing files with no way to revert!
-
+
Continue
-
+
Revert
-
+
Already Running
Już działa
-
+
LameXP is already running, please use the running instance!
LameXP już działa, przejdź do działającego programu!
@@ -3065,141 +3065,181 @@
Powrót
-
+
Show details for selected job
Pokaż szczegóły wybranego zadania
-
+
Browse Output File Location
Wybierz lokalizację dla plików wyjściowych
-
+
+ Filter Log Items
+
+
+
+
+ Show Running Only
+
+
+
+
+ Show Succeeded Only
+
+
+
+
+ Show Failed Only
+
+
+
+
+ Show Skipped Only
+
+
+
+
+ Show All Items
+
+
+
+
Encoding Files
Kompresowanie plików
-
+
Your files are being encoded, please be patient...
Twoje pliki są właśnie kompresowane, prosze być cierpliwy...
-
+
Encoding files, please wait...
Kompresowanie plików, prosze czekać...
-
+
Multi-threading enabled: Running %1 instances in parallel!
Wielowątkowosć włączona: Równolegle wykonywanych jest %1 kodowań!
-
+
Aborted! Waiting for running jobs to terminate...
Przerwano! Czekanie na wyłączenie procesu...
-
+
Encoding: %1 files of %2 completed so far, please wait...
Kompresja: Prosze czekać, jak dotąd wykonano %1 z %2 plików...
-
+
Creating the playlist file, please wait...
Tworzenie pliku playlisty, prosze czekać...
-
+
Process was aborted by the user after %1 file(s)!
Proces został przerwany przez użytkownika po wykonaniu %1 plików!
-
+
Process was aborted prematurely by the user!
Proces został przedwcześnie zakończony przez użytkownika!
-
+
LameXP - Aborted
LameXP - Przerwano
-
+
Process was aborted by the user.
Proces został przerwany przez użytkownika.
-
+
Process finished after %1.
Proces został zakończony po %1.
-
+
+ Error: %1 of %2 files failed (%3 files skipped). Double-click failed items for detailed information!
+
+
+
+
Error: %1 of %2 files failed. Double-click failed items for detailed information!
Błąd: %1 z %2 plików nie zostało skompresowanych. Kliknij dwukrotnie na plik aby zobaczyć szczegóły!
-
+
LameXP - Error
LameXP - Błąd
-
+
At least one file has failed!
Przynajmniej jeden plik nie został skompresowany!
-
-
+
+ All files completed successfully. Skipped %1 files.
+
+
+
+
+
All files completed successfully.
Kompresja wszystkich plików zakończona powodzeniem.
-
+
LameXP - Done
LameXP - Zrobione
-
+
Playlist creation failed
Tworzenie playlisty zakończone niepowodzeniem
-
+
The playlist file could not be created:
Playlista nie mogła zostać utworzona:
-
+
Warning: Computer will shutdown in %1 seconds...
Ostrzeżenie: Komputer zostanie zamknięty za %1 sekund/y...
-
-
+
+
Cancel Shutdown
Anuluj wyłączenie komputera
-
+
hour(s)
godzinie/ach
-
-
+
+
minute(s)
minutach
-
-
+
+
second(s)
sekundach
-
+
millisecond(s)
milisekundach
diff --git a/etc/Translation/LameXP_RU.ts b/etc/Translation/LameXP_RU.ts
index 6cc8c194..5fbff9a7 100644
--- a/etc/Translation/LameXP_RU.ts
+++ b/etc/Translation/LameXP_RU.ts
@@ -2485,6 +2485,38 @@
millisecond(s)
мс.
+
+ Filter Log Items
+
+
+
+ Show Running Only
+
+
+
+ Show Succeeded Only
+
+
+
+ Show Failed Only
+
+
+
+ Show Skipped Only
+
+
+
+ Show All Items
+
+
+
+ Error: %1 of %2 files failed (%3 files skipped). Double-click failed items for detailed information!
+
+
+
+ All files completed successfully. Skipped %1 files.
+
+
ProgressModel
diff --git a/etc/Translation/LameXP_SV.ts b/etc/Translation/LameXP_SV.ts
index e9562bde..7493bad4 100644
--- a/etc/Translation/LameXP_SV.ts
+++ b/etc/Translation/LameXP_SV.ts
@@ -2559,32 +2559,32 @@
Kan inte skriva till den specificerade mappen. Välj en annan destination!
-
+
Overwrite Mode
-
+
Warning: This mode may overwrite existing files with no way to revert!
-
+
Continue
-
+
Revert
-
+
Already Running
Körs redan
-
+
LameXP is already running, please use the running instance!
LameXP körs redan, använd den redan startade instansen!
@@ -3066,141 +3066,181 @@
Stäng
-
+
Show details for selected job
Visa detaljerad info för markerad åtgärd
-
+
Browse Output File Location
Öppna utdatamnappen
-
+
+ Filter Log Items
+
+
+
+
+ Show Running Only
+
+
+
+
+ Show Succeeded Only
+
+
+
+
+ Show Failed Only
+
+
+
+
+ Show Skipped Only
+
+
+
+
+ Show All Items
+
+
+
+
Encoding Files
Kodar om filer
-
+
Your files are being encoded, please be patient...
Dina filer kodas om, vänta...
-
+
Encoding files, please wait...
Kodar om filer, vänta...
-
+
Multi-threading enabled: Running %1 instances in parallel!
Flertrådskörning aktiverad: Kör %1 parallella instanser!
-
+
Aborted! Waiting for running jobs to terminate...
Avbrutet! Väntar på att aktiva processer skall avslutas...
-
+
Encoding: %1 files of %2 completed so far, please wait...
Omkodning: %1 fil(er) av %2 bearbetade hittills, vänta...
-
+
Creating the playlist file, please wait...
Skapar spelningslista, vänta...
-
+
Process was aborted by the user after %1 file(s)!
Åtgärden avbröts av användaren efter %1 fil(er)!
-
+
Process was aborted prematurely by the user!
Åtgärden avbröts i förtid av användaren!
-
+
LameXP - Aborted
LameXP - Avbrutet
-
+
Process was aborted by the user.
Åtgärden avbröts av användaren.
-
+
Process finished after %1.
Åtgärden slutförd efter %1.
-
+
+ Error: %1 of %2 files failed (%3 files skipped). Double-click failed items for detailed information!
+
+
+
+
Error: %1 of %2 files failed. Double-click failed items for detailed information!
Fel: %1 av %2 filer misslyckades. Dubbelklicka på det misslyckade objektet för detaljerad information!
-
+
LameXP - Error
LameXP - Fel
-
+
At least one file has failed!
Minst en fil har misslyckats!
-
-
+
+ All files completed successfully. Skipped %1 files.
+
+
+
+
+
All files completed successfully.
Alla filer korrekt omkodade.
-
+
LameXP - Done
LameXP - Klar
-
+
Playlist creation failed
Kunde inte skapa spelningslista
-
+
The playlist file could not be created:
Spelningslistan kunde inte skapas:
-
+
Warning: Computer will shutdown in %1 seconds...
Varning! Datorn kommer att stängas av om %1 sekunder...
-
-
+
+
Cancel Shutdown
Avbryt avstängning
-
+
hour(s)
timma(r)
-
-
+
+
minute(s)
minut(er)
-
-
+
+
second(s)
sekund(er)
-
+
millisecond(s)
millisekund(er)
diff --git a/etc/Translation/LameXP_TW.ts b/etc/Translation/LameXP_TW.ts
index 7863e938..a4f3992a 100644
--- a/etc/Translation/LameXP_TW.ts
+++ b/etc/Translation/LameXP_TW.ts
@@ -2477,6 +2477,38 @@
millisecond(s)
毫秒
+
+ Filter Log Items
+
+
+
+ Show Running Only
+
+
+
+ Show Succeeded Only
+
+
+
+ Show Failed Only
+
+
+
+ Show Skipped Only
+
+
+
+ Show All Items
+
+
+
+ Error: %1 of %2 files failed (%3 files skipped). Double-click failed items for detailed information!
+
+
+
+ All files completed successfully. Skipped %1 files.
+
+
ProgressModel
diff --git a/etc/Translation/LameXP_UK.ts b/etc/Translation/LameXP_UK.ts
index 17a50d35..662589ea 100644
--- a/etc/Translation/LameXP_UK.ts
+++ b/etc/Translation/LameXP_UK.ts
@@ -2478,6 +2478,38 @@
millisecond(s)
мілісекунд(-у, -и)
+
+ Filter Log Items
+
+
+
+ Show Running Only
+
+
+
+ Show Succeeded Only
+
+
+
+ Show Failed Only
+
+
+
+ Show Skipped Only
+
+
+
+ Show All Items
+
+
+
+ Error: %1 of %2 files failed (%3 files skipped). Double-click failed items for detailed information!
+
+
+
+ All files completed successfully. Skipped %1 files.
+
+
ProgressModel
diff --git a/etc/Translation/LameXP_ZH.ts b/etc/Translation/LameXP_ZH.ts
index f1a6a981..f46fcf8c 100644
--- a/etc/Translation/LameXP_ZH.ts
+++ b/etc/Translation/LameXP_ZH.ts
@@ -2477,6 +2477,38 @@
millisecond(s)
毫秒
+
+ Filter Log Items
+
+
+
+ Show Running Only
+
+
+
+ Show Succeeded Only
+
+
+
+ Show Failed Only
+
+
+
+ Show Skipped Only
+
+
+
+ Show All Items
+
+
+
+ Error: %1 of %2 files failed (%3 files skipped). Double-click failed items for detailed information!
+
+
+
+ All files completed successfully. Skipped %1 files.
+
+
ProgressModel
diff --git a/res/Icons.qrc b/res/Icons.qrc
index e8c51e19..3b262bd8 100644
--- a/res/Icons.qrc
+++ b/res/Icons.qrc
@@ -54,6 +54,7 @@
icons/error_big.png
icons/feed.png
icons/film.png
+ icons/filter.png
icons/folder.png
icons/folder_add.png
icons/folder_go.png
diff --git a/res/localization/LameXP_DE.qm b/res/localization/LameXP_DE.qm
index 24bce9ea..32c17c89 100644
Binary files a/res/localization/LameXP_DE.qm and b/res/localization/LameXP_DE.qm differ
diff --git a/src/Config.h b/src/Config.h
index 6e4d4cfd..5285e630 100644
--- a/src/Config.h
+++ b/src/Config.h
@@ -30,7 +30,7 @@
#define VER_LAMEXP_MINOR_LO 7
#define VER_LAMEXP_TYPE Alpha
#define VER_LAMEXP_PATCH 1
-#define VER_LAMEXP_BUILD 1174
+#define VER_LAMEXP_BUILD 1177
///////////////////////////////////////////////////////////////////////////////
// Tool versions (minimum expected versions!)
diff --git a/src/Dialog_MainWindow.cpp b/src/Dialog_MainWindow.cpp
index 0bf5c85b..290a538f 100644
--- a/src/Dialog_MainWindow.cpp
+++ b/src/Dialog_MainWindow.cpp
@@ -3955,8 +3955,6 @@ void MainWindow::showCustomParamsHelpScreen(const QString &toolName, const QStri
void MainWindow::overwriteModeChanged(int id)
{
- qWarning("overwriteModeChanged: %d", id);
-
if((id == SettingsModel::Overwrite_Replaces) && (m_settings->overwriteMode() != SettingsModel::Overwrite_Replaces))
{
if(QMessageBox::warning(this, tr("Overwrite Mode"), tr("Warning: This mode may overwrite existing files with no way to revert!"), tr("Continue"), tr("Revert"), QString(), 1) != 0)
diff --git a/src/Dialog_Processing.cpp b/src/Dialog_Processing.cpp
index 746cfbcf..363dfb91 100644
--- a/src/Dialog_Processing.cpp
+++ b/src/Dialog_Processing.cpp
@@ -121,6 +121,7 @@ ProcessingDialog::ProcessingDialog(FileListModel *fileListModel, AudioFileModel
m_diskObserver(NULL),
m_cpuObserver(NULL),
m_ramObserver(NULL),
+ m_progressViewFilter(-1),
m_firstShow(true)
{
//Init the dialog, from the .ui file
@@ -162,6 +163,8 @@ ProcessingDialog::ProcessingDialog(FileListModel *fileListModel, AudioFileModel
view_log->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch);
view_log->viewport()->installEventFilter(this);
connect(m_progressModel, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(progressModelChanged()));
+ connect(m_progressModel, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)), this, SLOT(progressModelChanged()));
+ connect(m_progressModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(progressModelChanged()));
connect(m_progressModel, SIGNAL(modelReset()), this, SLOT(progressModelChanged()));
connect(view_log, SIGNAL(activated(QModelIndex)), this, SLOT(logViewDoubleClicked(QModelIndex)));
connect(view_log->horizontalHeader(), SIGNAL(sectionResized(int,int,int)), this, SLOT(logViewSectionSizeChanged(int,int,int)));
@@ -170,11 +173,34 @@ ProcessingDialog::ProcessingDialog(FileListModel *fileListModel, AudioFileModel
m_contextMenu = new QMenu();
QAction *contextMenuDetailsAction = m_contextMenu->addAction(QIcon(":/icons/zoom.png"), tr("Show details for selected job"));
QAction *contextMenuShowFileAction = m_contextMenu->addAction(QIcon(":/icons/folder_go.png"), tr("Browse Output File Location"));
+ m_contextMenu->addSeparator();
+ //Create "filter" context menu
+ m_progressViewFilterGroup = new QActionGroup(this);
+ QAction *contextMenuFilterAction[5] = {NULL, NULL, NULL, NULL, NULL};
+ if(QMenu *filterMenu = m_contextMenu->addMenu(QIcon(":/icons/filter.png"), tr("Filter Log Items")))
+ {
+ contextMenuFilterAction[0] = filterMenu->addAction(QIcon(":/icons/media_play.png"), tr("Show Running Only"));
+ contextMenuFilterAction[1] = filterMenu->addAction(QIcon(":/icons/tick.png"), tr("Show Succeeded Only"));
+ contextMenuFilterAction[2] = filterMenu->addAction(QIcon(":/icons/exclamation.png"), tr("Show Failed Only"));
+ contextMenuFilterAction[3] = filterMenu->addAction(QIcon(":/icons/step_over.png"), tr("Show Skipped Only"));
+ contextMenuFilterAction[4] = filterMenu->addAction(QIcon(":/icons/report.png"), tr("Show All Items"));
+ if(QAction *a = contextMenuFilterAction[0]) { m_progressViewFilterGroup->addAction(a); a->setCheckable(true); a->setData(ProgressModel::JobRunning); }
+ if(QAction *a = contextMenuFilterAction[1]) { m_progressViewFilterGroup->addAction(a); a->setCheckable(true); a->setData(ProgressModel::JobComplete); }
+ if(QAction *a = contextMenuFilterAction[2]) { m_progressViewFilterGroup->addAction(a); a->setCheckable(true); a->setData(ProgressModel::JobFailed); }
+ if(QAction *a = contextMenuFilterAction[3]) { m_progressViewFilterGroup->addAction(a); a->setCheckable(true); a->setData(ProgressModel::JobSkipped); }
+ if(QAction *a = contextMenuFilterAction[4]) { m_progressViewFilterGroup->addAction(a); a->setCheckable(true); a->setData(-1); a->setChecked(true); }
+ }
+
+ //Connect context menu
view_log->setContextMenuPolicy(Qt::CustomContextMenu);
connect(view_log, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenuTriggered(QPoint)));
connect(contextMenuDetailsAction, SIGNAL(triggered(bool)), this, SLOT(contextMenuDetailsActionTriggered()));
connect(contextMenuShowFileAction, SIGNAL(triggered(bool)), this, SLOT(contextMenuShowFileActionTriggered()));
+ for(size_t i = 0; i < 4; i++)
+ {
+ if(contextMenuFilterAction[i]) connect(contextMenuFilterAction[i], SIGNAL(triggered(bool)), this, SLOT(contextMenuFilterActionTriggered()));
+ }
SET_FONT_BOLD(contextMenuDetailsAction, true);
//Enque jobs
@@ -198,6 +224,7 @@ ProcessingDialog::ProcessingDialog(FileListModel *fileListModel, AudioFileModel
m_allJobs.clear();
m_succeededJobs.clear();
m_failedJobs.clear();
+ m_skippedJobs.clear();
m_userAborted = false;
m_forcedAbort = false;
m_timerStart = 0I64;
@@ -251,6 +278,7 @@ ProcessingDialog::~ProcessingDialog(void)
LAMEXP_DELETE(m_diskObserver);
LAMEXP_DELETE(m_cpuObserver);
LAMEXP_DELETE(m_ramObserver);
+ LAMEXP_DELETE(m_progressViewFilterGroup);
WinSevenTaskbar::setOverlayIcon(this, NULL);
WinSevenTaskbar::setTaskbarState(this, WinSevenTaskbar::WinSevenTaskbarNoState);
@@ -262,6 +290,7 @@ ProcessingDialog::~ProcessingDialog(void)
thread->wait(15000);
delete thread;
}
+
}
////////////////////////////////////////////////////////////
@@ -379,6 +408,7 @@ void ProcessingDialog::initEncoding(void)
m_allJobs.clear();
m_succeededJobs.clear();
m_failedJobs.clear();
+ m_skippedJobs.clear();
m_userAborted = false;
m_forcedAbort = false;
m_playList.clear();
@@ -527,7 +557,14 @@ void ProcessingDialog::doneEncoding(void)
CHANGE_BACKGROUND_COLOR(frame_header, QColor("#FFBABA"));
WinSevenTaskbar::setTaskbarState(this, WinSevenTaskbar::WinSevenTaskbarErrorState);
WinSevenTaskbar::setOverlayIcon(this, &QIcon(":/icons/exclamation.png"));
- SET_PROGRESS_TEXT(tr("Error: %1 of %2 files failed. Double-click failed items for detailed information!").arg(QString::number(m_failedJobs.count()), QString::number(m_failedJobs.count() + m_succeededJobs.count())));
+ if(m_skippedJobs.count() > 0)
+ {
+ SET_PROGRESS_TEXT(tr("Error: %1 of %2 files failed (%3 files skipped). Double-click failed items for detailed information!").arg(QString::number(m_failedJobs.count()), QString::number(m_failedJobs.count() + m_succeededJobs.count() + m_skippedJobs.count()), QString::number(m_skippedJobs.count())));
+ }
+ else
+ {
+ SET_PROGRESS_TEXT(tr("Error: %1 of %2 files failed. Double-click failed items for detailed information!").arg(QString::number(m_failedJobs.count()), QString::number(m_failedJobs.count() + m_succeededJobs.count())));
+ }
m_systemTray->showMessage(tr("LameXP - Error"), tr("At least one file has failed!"), QSystemTrayIcon::Critical);
m_systemTray->setIcon(QIcon(":/icons/cd_delete.png"));
QApplication::processEvents();
@@ -538,7 +575,14 @@ void ProcessingDialog::doneEncoding(void)
CHANGE_BACKGROUND_COLOR(frame_header, QColor("#E0FFE2"));
WinSevenTaskbar::setTaskbarState(this, WinSevenTaskbar::WinSevenTaskbarNormalState);
WinSevenTaskbar::setOverlayIcon(this, &QIcon(":/icons/accept.png"));
- SET_PROGRESS_TEXT(tr("All files completed successfully."));
+ if(m_skippedJobs.count() > 0)
+ {
+ SET_PROGRESS_TEXT(tr("All files completed successfully. Skipped %1 files.").arg(QString::number(m_skippedJobs.count())));
+ }
+ else
+ {
+ SET_PROGRESS_TEXT(tr("All files completed successfully."));
+ }
m_systemTray->showMessage(tr("LameXP - Done"), tr("All files completed successfully."), QSystemTrayIcon::Information);
m_systemTray->setIcon(QIcon(":/icons/cd_add.png"));
QApplication::processEvents();
@@ -569,22 +613,39 @@ void ProcessingDialog::doneEncoding(void)
}
}
-void ProcessingDialog::processFinished(const QUuid &jobId, const QString &outFileName, bool success)
+void ProcessingDialog::processFinished(const QUuid &jobId, const QString &outFileName, int success)
{
- if(success)
+ if(success > 0)
{
m_playList.insert(jobId, outFileName);
m_succeededJobs.append(jobId);
}
+ else if(success < 0)
+ {
+ m_playList.insert(jobId, outFileName);
+ m_skippedJobs.append(jobId);
+ }
else
{
m_failedJobs.append(jobId);
}
+
+ //Update filter as soon as a job finished!
+ if(m_progressViewFilter >= 0)
+ {
+ QTimer::singleShot(0, this, SLOT(progressViewFilterChanged()));
+ }
}
void ProcessingDialog::progressModelChanged(void)
{
- view_log->scrollToBottom();
+ //Update filter as soon as the model changes!
+ if(m_progressViewFilter >= 0)
+ {
+ QTimer::singleShot(0, this, SLOT(progressViewFilterChanged()));
+ }
+
+ QTimer::singleShot(0, view_log, SLOT(scrollToBottom()));
}
void ProcessingDialog::logViewDoubleClicked(const QModelIndex &index)
@@ -682,6 +743,43 @@ void ProcessingDialog::contextMenuShowFileActionTriggered(void)
}
}
+void ProcessingDialog::contextMenuFilterActionTriggered(void)
+{
+ if(QAction *action = dynamic_cast(QObject::sender()))
+ {
+ if(action->data().type() == QVariant::Int)
+ {
+ m_progressViewFilter = action->data().toInt();
+ progressViewFilterChanged();
+ QTimer::singleShot(0, this, SLOT(progressViewFilterChanged()));
+ QTimer::singleShot(0, view_log, SLOT(scrollToBottom()));
+ action->setChecked(true);
+ }
+ }
+}
+
+void ProcessingDialog::progressViewFilterChanged(void)
+{
+ unsigned int counter = 0;
+
+ for(int i = 0; i < view_log->model()->rowCount(); i++)
+ {
+ QModelIndex index = (m_progressViewFilter >= 0) ? m_progressModel->index(i, 0) : QModelIndex();
+ const bool bHide = index.isValid() ? (m_progressModel->getJobState(index) != m_progressViewFilter) : false;
+ view_log->setRowHidden(i, bHide);
+ if(!bHide) counter++;
+ }
+
+ if((m_progressViewFilter >= 0) && (counter == 0))
+ {
+ qWarning("Filter does NOT match on any item, reverting to show all!");
+ for(int i = 0; i < view_log->model()->rowCount(); i++)
+ {
+ view_log->setRowHidden(i, false);
+ }
+ }
+}
+
////////////////////////////////////////////////////////////
// Private Functions
////////////////////////////////////////////////////////////
@@ -746,7 +844,7 @@ void ProcessingDialog::startNextJob(void)
connect(thread, SIGNAL(finished()), this, SLOT(doneEncoding()), Qt::QueuedConnection);
connect(thread, SIGNAL(processStateInitialized(QUuid,QString,QString,int)), m_progressModel, SLOT(addJob(QUuid,QString,QString,int)), Qt::QueuedConnection);
connect(thread, SIGNAL(processStateChanged(QUuid,QString,int)), m_progressModel, SLOT(updateJob(QUuid,QString,int)), Qt::QueuedConnection);
- connect(thread, SIGNAL(processStateFinished(QUuid,QString,bool)), this, SLOT(processFinished(QUuid,QString,bool)), Qt::QueuedConnection);
+ connect(thread, SIGNAL(processStateFinished(QUuid,QString,int)), this, SLOT(processFinished(QUuid,QString,int)), Qt::QueuedConnection);
connect(thread, SIGNAL(processMessageLogged(QUuid,QString)), m_progressModel, SLOT(appendToLog(QUuid,QString)), Qt::QueuedConnection);
//Give it a go!
diff --git a/src/Dialog_Processing.h b/src/Dialog_Processing.h
index 8d745789..e8f4b1b1 100644
--- a/src/Dialog_Processing.h
+++ b/src/Dialog_Processing.h
@@ -59,17 +59,19 @@ private slots:
void initEncoding(void);
void doneEncoding(void);
void abortEncoding(bool force = false);
- void processFinished(const QUuid &jobId, const QString &outFileName, bool success);
+ void processFinished(const QUuid &jobId, const QString &outFileName, int success);
void progressModelChanged(void);
void logViewDoubleClicked(const QModelIndex &index);
void logViewSectionSizeChanged(int, int, int);
void contextMenuTriggered(const QPoint &pos);
void contextMenuDetailsActionTriggered(void);
void contextMenuShowFileActionTriggered(void);
+ void contextMenuFilterActionTriggered(void);
void systemTrayActivated(QSystemTrayIcon::ActivationReason reason);
void cpuUsageHasChanged(const double val);
void ramUsageHasChanged(const double val);
void diskUsageHasChanged(const quint64 val);
+ void progressViewFilterChanged(void);
protected:
void showEvent(QShowEvent *event);
@@ -95,11 +97,13 @@ private:
ProgressModel *m_progressModel;
QMap m_playList;
QMenu *m_contextMenu;
+ QActionGroup *m_progressViewFilterGroup;
unsigned int m_runningThreads;
unsigned int m_currentFile;
QList m_allJobs;
QList m_succeededJobs;
QList m_failedJobs;
+ QList m_skippedJobs;
bool m_userAborted;
bool m_forcedAbort;
bool m_firstShow;
@@ -109,4 +113,5 @@ private:
RAMObserverThread *m_ramObserver;
DiskObserverThread *m_diskObserver;
qint64 m_timerStart;
+ int m_progressViewFilter;
};
diff --git a/src/Model_Progress.cpp b/src/Model_Progress.cpp
index fcc03eae..027b5103 100644
--- a/src/Model_Progress.cpp
+++ b/src/Model_Progress.cpp
@@ -222,6 +222,16 @@ const QUuid &ProgressModel::getJobId(const QModelIndex &index)
return *(reinterpret_cast(NULL));
}
+const ProgressModel::JobState ProgressModel::getJobState(const QModelIndex &index) const
+{
+ if(index.row() < m_jobList.count())
+ {
+ return static_cast(m_jobState.value(m_jobList.at(index.row()), -1));
+ }
+
+ return static_cast(NULL);
+}
+
void ProgressModel::addSystemMessage(const QString &text, int type)
{
const QUuid &jobId = QUuid::createUuid();
diff --git a/src/Model_Progress.h b/src/Model_Progress.h
index 0ffc3b7e..87da482a 100644
--- a/src/Model_Progress.h
+++ b/src/Model_Progress.h
@@ -67,6 +67,7 @@ public:
//Public functions
const QStringList &getLogFile(const QModelIndex &index);
const QUuid &getJobId(const QModelIndex &index);
+ const JobState getJobState(const QModelIndex &index) const;
void restoreHiddenItems(void);
public slots:
diff --git a/src/Thread_Process.cpp b/src/Thread_Process.cpp
index ce994a7c..ff36da9b 100644
--- a/src/Thread_Process.cpp
+++ b/src/Thread_Process.cpp
@@ -138,12 +138,12 @@ void ProcessThread::processFile()
case -1:
//File name already exists -> skipping!
emit processStateChanged(m_jobId, tr("Skipped."), ProgressModel::JobSkipped);
- emit processStateFinished(m_jobId, outFileName, true);
+ emit processStateFinished(m_jobId, outFileName, -1);
return;
default:
//File name could not be generated
emit processStateChanged(m_jobId, tr("Not found!"), ProgressModel::JobFailed);
- emit processStateFinished(m_jobId, outFileName, false);
+ emit processStateFinished(m_jobId, outFileName, 0);
return;
}
@@ -185,7 +185,7 @@ void ProcessThread::processFile()
{
handleMessage(QString("%1\n%2\n\n%3\t%4\n%5\t%6").arg(tr("The format of this file is NOT supported:"), m_audioFile.filePath(), tr("Container Format:"), m_audioFile.formatContainerInfo(), tr("Audio Format:"), m_audioFile.formatAudioCompressInfo()));
emit processStateChanged(m_jobId, tr("Unsupported!"), ProgressModel::JobFailed);
- emit processStateFinished(m_jobId, outFileName, false);
+ emit processStateFinished(m_jobId, outFileName, 0);
return;
}
}
@@ -263,7 +263,7 @@ void ProcessThread::processFile()
//Report result
emit processStateChanged(m_jobId, (m_aborted ? tr("Aborted!") : (bSuccess ? tr("Done.") : tr("Failed!"))), ((bSuccess && !m_aborted) ? ProgressModel::JobComplete : ProgressModel::JobFailed));
- emit processStateFinished(m_jobId, outFileName, bSuccess);
+ emit processStateFinished(m_jobId, outFileName, (bSuccess ? 1 : 0));
qDebug("Process thread is done.");
}
diff --git a/src/Thread_Process.h b/src/Thread_Process.h
index d0bdfc7c..d204f4be 100644
--- a/src/Thread_Process.h
+++ b/src/Thread_Process.h
@@ -55,7 +55,7 @@ private slots:
signals:
void processStateInitialized(const QUuid &jobId, const QString &jobName, const QString &jobInitialStatus, int jobInitialState);
void processStateChanged(const QUuid &jobId, const QString &newStatus, int newState);
- void processStateFinished(const QUuid &jobId, const QString &outFileName, bool success);
+ void processStateFinished(const QUuid &jobId, const QString &outFileName, int success);
void processMessageLogged(const QUuid &jobId, const QString &line);
private: