From 36c8ba7822c892f45894ea9b1560e1ba07894cdb Mon Sep 17 00:00:00 2001 From: lordmulder Date: Mon, 30 Jul 2012 21:44:44 +0200 Subject: [PATCH] Some more refactoring of the event filter functions: De-uglify the "global" event filter function by using more fine-grained filter functions. --- etc/Translation/Blank.ts | 436 +++++++++++++++++------------------ etc/Translation/LameXP_PL.ts | 436 +++++++++++++++++------------------ etc/Translation/LameXP_SV.ts | 436 +++++++++++++++++------------------ src/Config.h | 4 +- src/CustomEventFilter.h | 25 +- src/Dialog_MainWindow.cpp | 294 +++++++++++++---------- src/Dialog_MainWindow.h | 7 +- 7 files changed, 842 insertions(+), 796 deletions(-) diff --git a/etc/Translation/Blank.ts b/etc/Translation/Blank.ts index 07bae8e8..e8834beb 100644 --- a/etc/Translation/Blank.ts +++ b/etc/Translation/Blank.ts @@ -781,7 +781,7 @@ - + Show Details @@ -1500,9 +1500,9 @@ - - - + + + Check for Updates @@ -1543,13 +1543,13 @@ - + Disable Update Reminder - + Disable Sound Effects @@ -1629,836 +1629,836 @@ - + Adding file(s), please wait... - - + + Access Denied - + %1 file(s) have been rejected, because read access was not granted! - + This usually means the file is locked by another process. - + CDDA Files - + %1 file(s) have been rejected, because they are dummy CDDA files! - + Sorry, LameXP cannot extract audio tracks from an Audio-CD at present. - + We recommend using %1 for that purpose. - + Cue Sheet - + %1 file(s) have been rejected, because they appear to be Cue Sheet images! - + Please use LameXP's Cue Sheet wizard for importing Cue Sheet files. - + Files Rejected - + %1 file(s) have been rejected, because the file format could not be recognized! - + This usually means the file is damaged or the file format is not supported. - + Scanning folder(s) for files, please wait... - + DEMO VERSION - + You can drop in audio files here! - + Initializing directory outline, please be patient... - + Open File in External Application - + Browse File Location - + Browse Selected Folder - + Refresh Directory Outline - + Bookmark Current Output Folder - + Export Meta Tags to CSV File - + Import Meta Tags from CSV File - + License Declined - + You have declined the license. Consequently the application will exit now! - + Goodbye! - + LameXP - Expired - + This demo (pre-release) version of LameXP has expired at %1. - + LameXP is free software and release versions won't expire. - - + + Exit Program - + It seems that a bogus anti-virus software is slowing down the startup of LameXP. - + Please refer to the %1 document for details and solutions! - + Slow Startup - - - - - + + + + + Discard - - + + Don't Show Again - + Urgent Update - + Your version of LameXP is more than a year old. Time for an update! - - + + Ignore - + Skipping update check this time, please be patient... - - - + + + Update Reminder - + Your last update check was more than 14 days ago. Check for updates now? - + Your did not check for LameXP updates yet. Check for updates now? - + Postpone - + LameXP detected that your version of the Nero AAC encoder is outdated! - + The current version available is %1 (or later), but you still have version %2 installed. - + n/a - + You can download the latest version of the Nero AAC encoder from the Nero website at: - + (Hint: Please ignore the name of the downloaded ZIP file and check the included 'changelog.txt' instead!) - + AAC Encoder Outdated - + The Nero AAC encoder could not be found. AAC encoding support will be disabled. - + Please put 'neroAacEnc.exe', 'neroAacDec.exe' and 'neroAacTag.exe' into the LameXP directory! - + Your LameXP directory is located here: - + You can download the Nero AAC encoder for free from the official Nero website at: - + AAC Support Disabled - - - + + + LameXP - + You must add at least one file to the list before proceeding! - + Not Found - + Your currently selected TEMP folder does not exist anymore: - + Restore Default - + Cancel - + There are less than %1 GB of free diskspace available on your system's TEMP folder. - + It is highly recommend to free up more diskspace before proceeding with the encode! - + Your TEMP folder is located at: - + Low Diskspace Warning - + Abort Encoding Process - + Clean Disk Now - + Low Diskspace - + You are proceeding with low diskspace. Problems might occur! - + Sorry, an unsupported encoder has been chosen! - + Cannot write to the selected output directory. - + Please choose a different directory! - + Load Translation - + Translation Files - + Do you really want to disable the update reminder? - - - - - - - + + + + + + + Yes - - - - - - - + + + + + + + No - + The update reminder has been disabled. - + Please remember to check for updates at regular intervals! - + The update reminder has been re-enabled. - + Do you really want to disable all sound effects? - - + + Sound Effects - + All sound effects have been disabled. - + The sound effects have been re-enabled. - - - + + + Nero AAC Notifications - + Do you really want to disable all Nero AAC Encoder notifications? - + All Nero AAC Encoder notifications have been disabled. - + The Nero AAC Encoder notifications have been re-enabled. - - - + + + Slow Startup Notifications - + Do you really want to disable the slow startup notifications? - + The slow startup notifications have been disabled. - + The slow startup notifications have been re-enabled. - - + + Open Cue Sheet - - + + Cue Sheet File - - - + + + Beta Updates - + Do you really want LameXP to check for Beta (pre-release) updates? - + LameXP will check for Beta (pre-release) updates from now on. - + Check Now - + LameXP will <i>not</i> check for Beta (pre-release) updates from now on. - - - + + + Hibernate Computer - + Do you really want the computer to be hibernated on shutdown? - + LameXP will hibernate the computer on shutdown from now on. - + LameXP will <i>not</i> hibernate the computer on shutdown from now on. - - - + + + Shell Integration - + Do you really want to disable the LameXP shell integration? - + The LameXP shell integration has been disabled. - + The LameXP shell integration has been re-enabled. - - + + Add file(s) - - + + Add Folder - - + + Save CSV file - - - - + + + + CSV File - - - - + + + + CSV Export - + Sorry, there are no meta tags that can be exported! - + Sorry, failed to open CSV file for writing! - + Sorry, failed to write to the CSV file! - + The CSV files was created successfully! - - + + Open CSV file - - - - - + + + + + CSV Import - + Sorry, failed to open CSV file for reading! - + Sorry, failed to read from the CSV file! - + Sorry, the CSV file does not contain any known fields! - + CSV file is incomplete. Not all files were updated! - + The CSV files was imported successfully! - - + + New Folder - + Enter the name of the new folder: - + Failed to create folder - + The new folder could not be created: - + Drive is read-only or insufficient access rights! - + QAAC (Apple) - + FHG AAC (Winamp) - + Nero AAC - + Not available! - + Current AAC Encoder: %1 - - - - + + + + Quality Level %1 - - + + Compression %1 - - + + Uncompressed - + Best Quality (Very Slow) - + High Quality (Recommended) - + Average Quality (Default) - + Low Quality (Fast) - + Poor Quality (Very Fast) - + File name without extension - + Track number with leading zero - + Track title - + Artist name - + Album name - + Year with (at least) four digits - + Comment - + Characters forbidden in file names: - + Rename Macros - + %1 Instance(s) - + Cannot write to the selected directory. Please choose another directory! - + Already Running - + LameXP is already running, please use the running instance! diff --git a/etc/Translation/LameXP_PL.ts b/etc/Translation/LameXP_PL.ts index 0831229b..ffabe86c 100644 --- a/etc/Translation/LameXP_PL.ts +++ b/etc/Translation/LameXP_PL.ts @@ -781,7 +781,7 @@ - + Show Details Pokaż szczegóły @@ -1500,9 +1500,9 @@ - - - + + + Check for Updates Sprawdź aktualizacje @@ -1543,13 +1543,13 @@ - + Disable Update Reminder Wyłącz przypominanie o aktualizacji - + Disable Sound Effects Wyłącz efekty dźwiękowe @@ -1629,836 +1629,836 @@ Hibernuj zamiast zamykać - + Adding file(s), please wait... Dodawanie plików, prosze czekać... - - + + Access Denied Dostęp zablokowany - + %1 file(s) have been rejected, because read access was not granted! %1 plik(ów) zostało odrzuconych z powodu braku dostępu do pliku! - + This usually means the file is locked by another process. To przeważnie oznacza, że plik jest zablokowany przez inny proces. - + CDDA Files Pliki CDDA - + %1 file(s) have been rejected, because they are dummy CDDA files! %1 plik(ów) zostało odrzuconych ponieważ to nie są właściwe pliki CDDA! - + Sorry, LameXP cannot extract audio tracks from an Audio-CD at present. LameXP nie może teraz wyekstrachować ścieżki z płyty Audio-CD. - + We recommend using %1 for that purpose. Zaleca się użycie w tym celu %1. - + Cue Sheet Cue Sheet - + %1 file(s) have been rejected, because they appear to be Cue Sheet images! %1 plik(ów) zostało odrzuconych, ponieważ to nie są pliki obrazów Cue Sheet! - + Please use LameXP's Cue Sheet wizard for importing Cue Sheet files. Prosze użyć przewodnika Cue Sheet w LameXP w celu importowania tych plików. - + Files Rejected Pliki odrzucone - + %1 file(s) have been rejected, because the file format could not be recognized! %1 plik(ów) zostało odrzuconych, ponieważ ich format nie został rozpoznany! - + This usually means the file is damaged or the file format is not supported. To przeważnie oznacza że plik jest uszkodzony lub format pliku nie jest wspierany. - + Scanning folder(s) for files, please wait... Skanowanie folderu/ów, prosze czekać... - + You can drop in audio files here! Tutaj możesz upuścić pliki dźwiękowe! - + Open File in External Application Otwórz plik w zewnętrznym programie - + Browse File Location Otwórz lokalizację pliku - + Browse Selected Folder Otwórz wybrany folder - + Bookmark Current Output Folder Zapamiętaj wybrany folder - + License Declined Licencja odrzucona - + You have declined the license. Consequently the application will exit now! Odrzuciłeś licencję. W takim razie program zostanie teraz zamknięty! - + Goodbye! Naraska! - + LameXP - Expired LameXP - Termin wygasł - + This demo (pre-release) version of LameXP has expired at %1. Ta wersja demo (beta) LameXP wygasła %1. - + LameXP is free software and release versions won't expire. LameXP jest darmowym oprogramowaniem i pełna wersja nie wygasa. - - + + Exit Program Wyjdź z programu - + It seems that a bogus anti-virus software is slowing down the startup of LameXP. Najwyraźniej twoje oprogramowanie antywirusowe spowalnia uruchamianie się LameXP. - + Please refer to the %1 document for details and solutions! Prosze sprawdzić dokument %1 w celu dalszych szcegółów i rozwiązań! - + Slow Startup Powolny start - - - - - + + + + + Discard Zamknij - - + + Don't Show Again Nie pokazuj ponownie - + Urgent Update Ważna aktualizacja - + Your version of LameXP is more than a year old. Time for an update! Twoja wersja LameXP jest starsza niż rok! Czas na aktualizację! - - - + + + Update Reminder Powiadomienie aktualizacji - + Your last update check was more than 14 days ago. Check for updates now? Ostatnie sprawdzenie aktualizacji było ponad 14 dni temu. Sprawdzić teraz aktualizacje? - + Your did not check for LameXP updates yet. Check for updates now? Nie sprawdzałeś jeszcze aktualizacji LameXP. Sprawdzić teraz aktualizacje? - + Postpone Przełóż - + LameXP detected that your version of the Nero AAC encoder is outdated! LameXP wykrył że Twoja wersja kodera Nero AAC jest nieaktualna! - + The current version available is %1 (or later), but you still have version %2 installed. Wersją dostępną obecnie jest %1, Twoja wersja to %2. - + n/a n/d - + You can download the latest version of the Nero AAC encoder from the Nero website at: Możesz pobrać najnowszą wersję kodera Nero AAC ze strony Nero: - + AAC Encoder Outdated Koder AAC jest nieaktualny - + The Nero AAC encoder could not be found. AAC encoding support will be disabled. Nie można odnaleźć kodera Nero AAC. Kompresja formatu AAC zostanie wyłączona. - + Please put 'neroAacEnc.exe', 'neroAacDec.exe' and 'neroAacTag.exe' into the LameXP directory! Prosze skopiować 'neroAacEnc.exe', 'neroAacDec.exe', oraz 'neroAacTag.exe' do folderu LameXP! - + Your LameXP directory is located here: Folder aplikacji LameXP znajduje się tutaj: - + You can download the Nero AAC encoder for free from the official Nero website at: Możesz pobrać koder Nero AAC za darmo z oficjalnej strony Nero: - + AAC Support Disabled Wsparcie dla AAC wyłączone - - - + + + LameXP LameXP - + You must add at least one file to the list before proceeding! Powinienieś dodać przynajmniej jeden plik do listy aby zacząć działać! - + Not Found Nie znaleziono - + Your currently selected TEMP folder does not exist anymore: Wybrany przez Ciebie folder tymczasowy TEMP już nie istnieje: - + Restore Default Przywróć domyślne - + Cancel Anuluj - + Low Diskspace Warning Ostrzeżenie o małej ilości miejsca na dysku - + There are less than %1 GB of free diskspace available on your system's TEMP folder. Jest mniej niż %1 GB dostępnego miejsca w systemowym folderze TEMP. - + DEMO VERSION WERSJA DEMO - + (Hint: Please ignore the name of the downloaded ZIP file and check the included 'changelog.txt' instead!) (Podpowiedź: Zignoruj nazwę pobranego pliku ZIP, w zamian sprawdż załączony w archiwum plik "changelog.txt"!) - + It is highly recommend to free up more diskspace before proceeding with the encode! Jest wysoce zalecane zwolnić miejsce na dysku zanim zaczniesz kompresję! - + Your TEMP folder is located at: Twój folder TEMP znajduję się: - + Abort Encoding Process Przerwij proces kompresji - + Clean Disk Now Wykonaj oczyszczanie dysku - - + + Ignore Ignoruj - + Initializing directory outline, please be patient... Ładowanie zestawu folderów, prosze czekać... - + Refresh Directory Outline Odśwież foldery - + Export Meta Tags to CSV File Eksportuj Tagi do pliku CVS - + Import Meta Tags from CSV File Importuj Tagi do pliku CVS - + Skipping update check this time, please be patient... Pomijanie sprawdzania aktualizacji, prosze czekać... - + Low Diskspace Mało miejsca na dysku - + You are proceeding with low diskspace. Problems might occur! Chcesz zacząć działać z małą ilością miejsca na dysku. Mogą wystąpić problemy! - + Sorry, an unsupported encoder has been chosen! Został wybrany koder, który nie jest wspierany! - + Cannot write to the selected output directory. Nie można zapisać do wybranej lokalizacji. - + Please choose a different directory! Prosze wybrać inną lokalizację! - + Load Translation Zaladuj plik językowy - + Translation Files Pliki językowe - + Do you really want to disable the update reminder? Czy na pewno chcesz wyłączyć przypominanie o aktualizacjach? - - - - - - - + + + + + + + Yes Tak - - - - - - - + + + + + + + No Nie - + The update reminder has been disabled. Przypominanie o aktualizacjach wyłączone. - + Please remember to check for updates at regular intervals! Prosze pamiętać o okresowym sprawdzaniu aktualizacji! - + The update reminder has been re-enabled. Przypominanie o aktualizacjach ponownie włączone. - + Do you really want to disable all sound effects? Czy na pewno chcesz wyłączyć wszystkie dźwiękowe? - - + + Sound Effects Efekty dźwiękowe - + All sound effects have been disabled. Wszystkie efekty dźwiękowe zostały wyłączone. - + The sound effects have been re-enabled. Efekty dźwiękowe zostały ponownie włączone. - - - + + + Nero AAC Notifications Powiadomienia Nero AAC - + Do you really want to disable all Nero AAC Encoder notifications? Czy na pewno chcesz wyłączyć wszystkie powiadomienia Nero AAC? - + All Nero AAC Encoder notifications have been disabled. Wszystkie powiadomienia kodera Nero AAC zostały wyłączone. - + The Nero AAC Encoder notifications have been re-enabled. Powiadomienia Nero AAC zostały ponownie włączone. - - - + + + Slow Startup Notifications Powiadomienia o powolnym starcie - + Do you really want to disable the slow startup notifications? Czy na pewno chcesz wyłączyć powiadomienia o powolnym starcie? - + The slow startup notifications have been disabled. Powiadomienia o powolnym starcie zostały wyłączone. - + The slow startup notifications have been re-enabled. Powiadomienia o powolnym starcie zostały ponownie włączone. - - + + Open Cue Sheet Otwórz plik Cue Sheet - - + + Cue Sheet File Plik Cue Sheet - - - + + + Beta Updates Aktualizacje Beta - + Do you really want LameXP to check for Beta (pre-release) updates? Czy na pewno chcesz aby LameXP sprawdzał aktualizacje Beta? - + LameXP will check for Beta (pre-release) updates from now on. Od teraz LameXP będzie sprawdzał aktualizacje Beta. - + Check Now Sprawdź teraz - + LameXP will <i>not</i> check for Beta (pre-release) updates from now on. LameXP od teraz <i>nie będzie</i> sprawdzał aktualizacji Beta. - - - + + + Hibernate Computer Hibernuj komputer - + Do you really want the computer to be hibernated on shutdown? Czy na pewno chcesz aby komputer był hibernowany zamiast zamykany? - + LameXP will hibernate the computer on shutdown from now on. Od teraz LameXP będzie hibernował komputer zamiast zamykać. - + LameXP will <i>not</i> hibernate the computer on shutdown from now on. LameXP od teraz <i>nie</i> będzie hibernował komputera tylko zamykał. - - - + + + Shell Integration Integracja z systemem - + Do you really want to disable the LameXP shell integration? Czy na pewno chcesz wyłączyć integrację LameXP z systemem? - + The LameXP shell integration has been disabled. Integracja LameXP z systemem zostałą wyłączona. - + The LameXP shell integration has been re-enabled. Integracja LameXP z systemem została ponownie włączona. - - + + Add file(s) Dodaj plik(i) - - + + Add Folder Dodaj folder - - + + Save CSV file Zapisz plik CSV - - - - + + + + CSV File Plik CSV - - - - + + + + CSV Export Eksportowanie CSV - + Sorry, there are no meta tags that can be exported! Nie ma żadnych tagów, które można eksportować! - + Sorry, failed to open CSV file for writing! Nie można otworzyć pliku CSV aby go zapisać! - + Sorry, failed to write to the CSV file! Nie można zapisać do pliku CSV! - + The CSV files was created successfully! Pliki CSV utworzone pomyślnie! - - + + Open CSV file Otwórz plik CSV - + Sorry, failed to open CSV file for reading! Nie można otworzyć pliku CSV aby go wczytać! - - - - - + + + + + CSV Import Importowanie CSV - + Sorry, failed to read from the CSV file! Próba odczytania pliku CSV zakończona niepowodzeniem! - + Sorry, the CSV file does not contain any known fields! Plik CSV nie zawiera żadnych znanych pól! - + CSV file is incomplete. Not all files were updated! Plik CSV nie jest kompletny. Nie wszystkie pliki zostały zaktualizowane! - + The CSV files was imported successfully! Pliki CSV zaimportowano pomyślnie! - - + + New Folder Nowy folder - + Enter the name of the new folder: Wprowadź nazwę nowego folderu: - + Failed to create folder Utworzenie folderu zakończone niepowodzeniem - + The new folder could not be created: Nowy folder nie mógł zostać stworzony: - + Drive is read-only or insufficient access rights! Dysk tylko do odczytu lub brak praw dostępu! - + QAAC (Apple) QAAC (Apple) - + FHG AAC (Winamp) FHG AAC (Winamp) - + Nero AAC Nero AAC - + Not available! Niedostępny! - + Current AAC Encoder: %1 Obecny koder AAC: %1 - - - - + + + + Quality Level %1 Poziom jakości %1 - - + + Compression %1 Kompresja %1 - - + + Uncompressed Nieskompresowany - + Best Quality (Very Slow) Najlepsza jakość (Bardzo wolno) - + High Quality (Recommended) Wysoka jakość (Zalecane) - + Average Quality (Default) Średnia jakość (Domyślnie) - + Low Quality (Fast) Niska jakość (Szybko) - + Poor Quality (Very Fast) Najniższa jakość (Bardzo szybko) - + File name without extension Nazwa pliku bez rozszerzenia - + Track number with leading zero Numer ścieżki z zerem na początku - + Track title Nazwa ścieżki - + Artist name Nazwa Artysty - + Album name Nazwa Albumu - + Year with (at least) four digits Rok z (przynajmniej) czterema cyframi - + Comment Komentarz - + Characters forbidden in file names: Zabronione znaki w nazwach plików: - + Rename Macros Zmień nazwy makr - + %1 Instance(s) %1 wątek/ki - + Cannot write to the selected directory. Please choose another directory! Nie można zapisać do wybranej lokalizacji. Prosze wybierz inną lokalizację! - + Already Running Już działa - + LameXP is already running, please use the running instance! LameXP już działa, przejdź do działającego programu! diff --git a/etc/Translation/LameXP_SV.ts b/etc/Translation/LameXP_SV.ts index d0e95e3f..24702cd1 100644 --- a/etc/Translation/LameXP_SV.ts +++ b/etc/Translation/LameXP_SV.ts @@ -781,7 +781,7 @@ - + Show Details Visa detaljer @@ -1500,9 +1500,9 @@ - - - + + + Check for Updates Sök efter uppdateringar @@ -1543,13 +1543,13 @@ - + Disable Update Reminder Inaktivera uppdateringsmeddelande - + Disable Sound Effects Inaktivera ljudeffekter @@ -1629,836 +1629,836 @@ Försätt datorn i viloläge vid avslut - + Adding file(s), please wait... Lägger till fil(er), vänta... - - + + Access Denied Åtkomst nekad - + %1 file(s) have been rejected, because read access was not granted! %1 fil(er) har undantagits, på grund av att åtkomst nekades! - + This usually means the file is locked by another process. Det innebär oftast att filen är låst av någon annan process. - + CDDA Files CDDA-filer - + %1 file(s) have been rejected, because they are dummy CDDA files! %1 fil(er) har undantagits, på grund av att det är fejkade CDDA-filer - + Sorry, LameXP cannot extract audio tracks from an Audio-CD at present. LameXP kan för närvarande inte extrahera ljudspår från en ljud-CD. - + We recommend using %1 for that purpose. Vi rekommenderar att du använder %1 för det ändamålet. - + Cue Sheet Cue-fil - + %1 file(s) have been rejected, because they appear to be Cue Sheet images! %1 fil(er) har undantagits, på grund av att de verkar vara cue-filer! - + Please use LameXP's Cue Sheet wizard for importing Cue Sheet files. Använd LameXPs cue-guide för att importera cue-filer. - + Files Rejected Undantagna filer - + %1 file(s) have been rejected, because the file format could not be recognized! %1 fil(er) har undantagits, på grund av att filformatet inte känns igen! - + This usually means the file is damaged or the file format is not supported. Det innebär oftast att filen är skadad eller att filformatet inte stöds. - + Scanning folder(s) for files, please wait... Genomsöker mapp(ar) efter fil(er), vänta... - + DEMO VERSION DEMOVERSION - + You can drop in audio files here! Du kan dra och släppa filer här! - + Initializing directory outline, please be patient... Initierar mappdisposition, vänta... - + Open File in External Application Öppna fil i externt program - + Browse File Location Öppna målmappen - + Browse Selected Folder Öppna markerad mapp - + Refresh Directory Outline Uppdatera mappdisposition - + Bookmark Current Output Folder Lägg till aktuell utdatamapp i favoriter - + Export Meta Tags to CSV File Exportera metadata till CSV-fil - + Import Meta Tags from CSV File Importera metadata från CSV-fil - + License Declined Licensavtal avvisat - + You have declined the license. Consequently the application will exit now! Du har nekat att godkänna licensavtalet. Programmet kommer nu att avslutas! - + Goodbye! Hej då! - + LameXP - Expired LameXP - Upphört - + This demo (pre-release) version of LameXP has expired at %1. Denna demoversion av LameXP har upphört att gälla från %1. - + LameXP is free software and release versions won't expire. LameXP är kostnadsfritt och release-versionerna upphör inte att gälla. - - + + Exit Program Avsluta programmet - + It seems that a bogus anti-virus software is slowing down the startup of LameXP. Det verkar som ett antivirusprogram orsakar långsammare uppstart av LameXP. - + Please refer to the %1 document for details and solutions! Läs gärna %1 för detaljer och lösningar! - + Slow Startup Långsam uppstart - - - - - + + + + + Discard Stäng - - + + Don't Show Again Visa inte igen - + Urgent Update Viktig uppdatering - + Your version of LameXP is more than a year old. Time for an update! Din version av LameXP är mer än ett år gammal. Dags att uppdatera! - - + + Ignore Ignorera - + Skipping update check this time, please be patient... Hoppar över uppdateringskontrollen den här gången, vänta... - - - + + + Update Reminder Uppdateringspåminnelse - + Your last update check was more than 14 days ago. Check for updates now? Din senaste uppdateringskontroll var för mer än 14 dagar sedan. Vill du söka efter uppdateringar nu? - + Your did not check for LameXP updates yet. Check for updates now? Du har inte genomfört uppdateringskontroll ännu. Vill du söka efter uppdateringar nu? - + Postpone Skjut upp - + LameXP detected that your version of the Nero AAC encoder is outdated! LameXP har uptäckt att din version av Nero AAC-kodare är utdaterad! - + The current version available is %1 (or later), but you still have version %2 installed. Aktuell version är %1 (eller senare), men du har fortfarande version %2. - + n/a n/a - + You can download the latest version of the Nero AAC encoder from the Nero website at: Du kan ladda ner senaste versionen av Nero AAC-kodare från Neros webbsida: - + (Hint: Please ignore the name of the downloaded ZIP file and check the included 'changelog.txt' instead!) (Tips: Bortse från den nedladde zipfilens namn, och kontrollera istället den inkluderade textfilen 'changelog.txt'!) - + AAC Encoder Outdated AAC-kodare utdaterad - + The Nero AAC encoder could not be found. AAC encoding support will be disabled. Neros AAC-kodare kan inte hittas. Stödet för AAC-kodning kommer att inaktiveras. - + Please put 'neroAacEnc.exe', 'neroAacDec.exe' and 'neroAacTag.exe' into the LameXP directory! Placera 'neroAacEnc.exe', 'neroAacDec.exe' och 'neroAacTag.exe' i LameXPs programmmapp! - + Your LameXP directory is located here: Din LameXP programmapp finns här: - + You can download the Nero AAC encoder for free from the official Nero website at: Du kan ladda ner Nero AAC-kodare gratis från den officiella webbsidan: - + AAC Support Disabled AAC-stödet är inaktiverat - - - + + + LameXP LameXP - + You must add at least one file to the list before proceeding! Du måste lägga till minst en fil till listan innan du fortsätter! - + Not Found Kan inte hittas - + Your currently selected TEMP folder does not exist anymore: Din aktuella TEMP-mapp finns inte längre: - + Restore Default Återställ standard - + Cancel Avbryt - + There are less than %1 GB of free diskspace available on your system's TEMP folder. Det finns mindre än %1 GB ledigt diskutrymme i systemets temp-mapp. - + It is highly recommend to free up more diskspace before proceeding with the encode! Du behöver frigöra mer diskutrymme innan du fortsätter med omkodningen! - + Your TEMP folder is located at: Temp-mappens placering: - + Low Diskspace Warning Varning för dåligt diskutrymme - + Abort Encoding Process Avbryt omkodningsprocessen - + Clean Disk Now Rensa disken nu - + Low Diskspace Dåligt diskutrymme - + You are proceeding with low diskspace. Problems might occur! Du fortsätter med dåligt diskutrymme. Problem kan uppstå! - + Sorry, an unsupported encoder has been chosen! En kodare som saknar stöd har valts! - + Cannot write to the selected output directory. Kan inte skriva till den valda utdatamappen. - + Please choose a different directory! Välj en annan målmapp! - + Load Translation Läs in översättning - + Translation Files Översättningsfiler - + Do you really want to disable the update reminder? Vill du verkligen inaktivera uppdateringspåminnelsen? - - - - - - - + + + + + + + Yes Ja - - - - - - - + + + + + + + No Nej - + The update reminder has been disabled. Uppdateringspåminnelsen har inaktiverats. - + Please remember to check for updates at regular intervals! Glöm inte att söka efter uppdateringar med jämna mellanrum! - + The update reminder has been re-enabled. Uppdateringspåminnelsen har återaktiverats. - + Do you really want to disable all sound effects? Vill du verkligen inaktivera alla ljudeffekter? - - + + Sound Effects Ljudeffekter - + All sound effects have been disabled. Alla ljudeffekter har inaktiverats. - + The sound effects have been re-enabled. Ljudeffekterna har återaktiverats. - - - + + + Nero AAC Notifications Nero AAC-meddelanden - + Do you really want to disable all Nero AAC Encoder notifications? Vill du verkligen inaktivera alla Nero AAC-meddelanden? - + All Nero AAC Encoder notifications have been disabled. Alla Nero AAC-meddelanden har inaktiverats. - + The Nero AAC Encoder notifications have been re-enabled. Nero AAC-meddelanden har återaktiverats. - - - + + + Slow Startup Notifications Meddelande om långsam uppstart - + Do you really want to disable the slow startup notifications? Vill du verkligen inaktivera meddelanden om långsam uppstart? - + The slow startup notifications have been disabled. Meddelanden om långsam uppstart har inaktiverats. - + The slow startup notifications have been re-enabled. Meddelanden om långsam uppstart har återaktiverats. - - + + Open Cue Sheet Öppna cue-fil - - + + Cue Sheet File Cue-fil - - - + + + Beta Updates Beta-uppdateringar - + Do you really want LameXP to check for Beta (pre-release) updates? Vill du verkligen att LameXP skall söka efter beta-uppdateringar? - + LameXP will check for Beta (pre-release) updates from now on. LameXP kommer i fortsättningen att söka efter beta-uppdatyeringar. - + Check Now Sök nu - + LameXP will <i>not</i> check for Beta (pre-release) updates from now on. LameXP kommer i fortsättningen <i>inte</i> att söka efter beta-uppdateringar. - - - + + + Hibernate Computer Viloläge - + Do you really want the computer to be hibernated on shutdown? Vill du verkligen att datorn skall försättas i viloläge vid avslut? - + LameXP will hibernate the computer on shutdown from now on. LameXP kommer i fortsättningen att försätta datorn i viloläge vid avslut. - + LameXP will <i>not</i> hibernate the computer on shutdown from now on. LameXP kommer i fortsättningen <i>inte</i> att försätta datorn i viloläge vid avslut. - - - + + + Shell Integration Utforskarintegrering - + Do you really want to disable the LameXP shell integration? Vill du verkligen inaktivera LameXPs utforskarintegration? - + The LameXP shell integration has been disabled. LameXPs utforskarintegration har inaktiverats. - + The LameXP shell integration has been re-enabled. LameXPs utforskarintegration har återaktiverats. - - + + Add file(s) Lägg till fil(er) - - + + Add Folder Lägg till mapp - - + + Save CSV file Spara CSV-fil - - - - + + + + CSV File CSV-fil - - - - + + + + CSV Export CSV-export - + Sorry, there are no meta tags that can be exported! Det finns ingen meta-data som kan exporteras! - + Sorry, failed to open CSV file for writing! Kunde inte öppna CSV-filen för skrivning! - + Sorry, failed to write to the CSV file! Kunde inte skriva till CSV-filen! - + The CSV files was created successfully! CSV-filen skapades korrekt! - - + + Open CSV file Öppna CSV-fil - - - - - + + + + + CSV Import CSV-import - + Sorry, failed to open CSV file for reading! Kunde inte öppna CSV-filen för läsning! - + Sorry, failed to read from the CSV file! Kunde inte läsa från CSV-filen! - + Sorry, the CSV file does not contain any known fields! CSV-filen innehåller inga kända fält! - + CSV file is incomplete. Not all files were updated! CSV-filen är inte komplett. Alla filer uppdaterades inte! - + The CSV files was imported successfully! CSV-filen importerades korrekt! - - + + New Folder Ny mapp - + Enter the name of the new folder: Namn på den nya mappen: - + Failed to create folder Kunde inte skapa någon mapp - + The new folder could not be created: Den nya mappen kunde inte skapas: - + Drive is read-only or insufficient access rights! Diskenheten är skrivskyddad eller åtkomsträttigheter saknas! - + QAAC (Apple) QAAC (Apple) - + FHG AAC (Winamp) FHG AAC (Winamp) - + Nero AAC Nero AAC - + Not available! Ej tillgänglig! - + Current AAC Encoder: %1 Aktuell AAC-kodare: %1 - - - - + + + + Quality Level %1 Kvallitetsnivå %1 - - + + Compression %1 Kompression %1 - - + + Uncompressed Okomprimerad - + Best Quality (Very Slow) Bäst kvallitet (långsam) - + High Quality (Recommended) Hög kvallitet (rekommenderas) - + Average Quality (Default) Medelkvallitet (standard) - + Low Quality (Fast) Låg kvallitet (snabb) - + Poor Quality (Very Fast) Dålig kvallitet (mycket snabb) - + File name without extension Filnamn utan filtillägg - + Track number with leading zero Spårnummer med inledande nolla - + Track title Spårtitel - + Artist name Artistnamn - + Album name Albumnamn - + Year with (at least) four digits Årtal med (minst) fyra siffror - + Comment Kommentar - + Characters forbidden in file names: Förbjudna tecken i filnamn: - + Rename Macros Namnändra macron - + %1 Instance(s) %1 instans(er) - + Cannot write to the selected directory. Please choose another directory! Kan inte skriva till den specificerade mappen. Välj en annan destination! - + Already Running Körs redan - + LameXP is already running, please use the running instance! LameXP körs redan, använd den redan startade instansen! diff --git a/src/Config.h b/src/Config.h index 744f5a47..a9e73a5b 100644 --- a/src/Config.h +++ b/src/Config.h @@ -29,8 +29,8 @@ #define VER_LAMEXP_MINOR_HI 0 #define VER_LAMEXP_MINOR_LO 5 #define VER_LAMEXP_TYPE Alpha -#define VER_LAMEXP_PATCH 11 -#define VER_LAMEXP_BUILD 1064 +#define VER_LAMEXP_PATCH 12 +#define VER_LAMEXP_BUILD 1066 /////////////////////////////////////////////////////////////////////////////// // Tool versions (minimum expected versions!) diff --git a/src/CustomEventFilter.h b/src/CustomEventFilter.h index 552f9f4f..e00045cd 100644 --- a/src/CustomEventFilter.h +++ b/src/CustomEventFilter.h @@ -19,8 +19,10 @@ // http://www.gnu.org/licenses/gpl-2.0.txt /////////////////////////////////////////////////////////////////////////////// +#pragma once + #include -#include +#include class CustomEventFilter: public QObject { @@ -28,21 +30,24 @@ class CustomEventFilter: public QObject public: CustomEventFilter(void) {} + ~CustomEventFilter(void) {} bool eventFilter(QObject *obj, QEvent *event) { - if(obj != this) + if(QWidget *sender = dynamic_cast(obj)) { switch(event->type()) { - case QEvent::MouseButtonPress: - emit clicked(obj); - break; case QEvent::Enter: - emit mouseEntered(obj); - break; case QEvent::Leave: - emit mouseLeft(obj); + case QEvent::KeyPress: + case QEvent::KeyRelease: + case QEvent::MouseButtonPress: + case QEvent::MouseButtonRelease: + case QEvent::FocusIn: + case QEvent::FocusOut: + case QEvent::TouchEnd: + eventOccurred(sender, event); break; } } @@ -51,7 +56,5 @@ public: } signals: - void clicked(QObject *sender); - void mouseEntered(QObject *sender); - void mouseLeft(QObject *sender); + void eventOccurred(QWidget *sender, QEvent *event); }; diff --git a/src/Dialog_MainWindow.cpp b/src/Dialog_MainWindow.cpp index 14ffc66a..8d522515 100644 --- a/src/Dialog_MainWindow.cpp +++ b/src/Dialog_MainWindow.cpp @@ -227,11 +227,18 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S outputFolderView->setMouseTracking(false); outputFolderView->setContextMenuPolicy(Qt::CustomContextMenu); outputFolderView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); - outputFolderView->installEventFilter(this); - outputFoldersEditorLabel->installEventFilter(this); - outputFoldersFovoritesLabel->installEventFilter(this); + + m_evenFilterOutputFolderMouse = new CustomEventFilter; + outputFoldersEditorLabel->installEventFilter(m_evenFilterOutputFolderMouse); + outputFoldersFovoritesLabel->installEventFilter(m_evenFilterOutputFolderMouse); + outputFolderLabel->installEventFilter(m_evenFilterOutputFolderMouse); + + m_evenFilterOutputFolderView = new CustomEventFilter; + outputFolderView->installEventFilter(m_evenFilterOutputFolderView); + SET_CHECKBOX_STATE(saveToSourceFolderCheckBox, m_settings->outputToSourceDir()); prependRelativePathCheckBox->setChecked(m_settings->prependRelativeSourcePath()); + connect(outputFolderView, SIGNAL(clicked(QModelIndex)), this, SLOT(outputFolderViewClicked(QModelIndex))); connect(outputFolderView, SIGNAL(activated(QModelIndex)), this, SLOT(outputFolderViewClicked(QModelIndex))); connect(outputFolderView, SIGNAL(pressed(QModelIndex)), this, SLOT(outputFolderViewClicked(QModelIndex))); @@ -244,6 +251,9 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S connect(saveToSourceFolderCheckBox, SIGNAL(clicked()), this, SLOT(saveToSourceFolderChanged())); connect(prependRelativePathCheckBox, SIGNAL(clicked()), this, SLOT(prependRelativePathChanged())); connect(outputFolderEdit, SIGNAL(editingFinished()), this, SLOT(outputFolderEditFinished())); + connect(m_evenFilterOutputFolderMouse, SIGNAL(eventOccurred(QWidget*, QEvent*)), this, SLOT(outputFolderMouseEventOccurred(QWidget*, QEvent*))); + connect(m_evenFilterOutputFolderView, SIGNAL(eventOccurred(QWidget*, QEvent*)), this, SLOT(outputFolderViewEventOccurred(QWidget*, QEvent*))); + if(m_outputFolderContextMenu = new QMenu()) { m_showFolderContextAction = m_outputFolderContextMenu->addAction(QIcon(":/icons/zoom.png"), "N/A"); @@ -253,14 +263,15 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S connect(m_showFolderContextAction, SIGNAL(triggered(bool)), this, SLOT(showFolderContextActionTriggered())); connect(m_refreshFolderContextAction, SIGNAL(triggered(bool)), this, SLOT(refreshFolderContextActionTriggered())); } + if(m_outputFolderFavoritesMenu = new QMenu()) { m_addFavoriteFolderAction = m_outputFolderFavoritesMenu->addAction(QIcon(":/icons/add.png"), "N/A"); m_outputFolderFavoritesMenu->insertSeparator(m_addFavoriteFolderAction); connect(m_addFavoriteFolderAction, SIGNAL(triggered(bool)), this, SLOT(addFavoriteFolderActionTriggered())); } + outputFolderEdit->setVisible(false); - outputFolderLabel->installEventFilter(this); if(m_outputFolderNoteBox = new QLabel(outputFolderView)) { m_outputFolderNoteBox->setAutoFillBackground(true); @@ -270,6 +281,7 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S m_outputFolderNoteBox->hide(); } + outputFolderViewClicked(QModelIndex()); refreshFavorites(); @@ -417,7 +429,7 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S connect(comboBoxOpusFramesize, SIGNAL(currentIndexChanged(int)), this, SLOT(opusSettingsChanged())); connect(spinBoxOpusComplexity, SIGNAL(valueChanged(int)), this, SLOT(opusSettingsChanged())); connect(checkBoxOpusExpAnalysis, SIGNAL(clicked(bool)), this, SLOT(opusSettingsChanged())); - connect(m_evenFilterCustumParamsHelp, SIGNAL(clicked(QObject*)), this, SLOT(customParamsHelpRequested(QObject*))); + connect(m_evenFilterCustumParamsHelp, SIGNAL(eventOccurred(QWidget*, QEvent*)), this, SLOT(customParamsHelpRequested(QWidget*, QEvent*))); //-------------------------------- // Force initial GUI update @@ -616,6 +628,8 @@ MainWindow::~MainWindow(void) LAMEXP_DELETE(m_outputFolderContextMenu); LAMEXP_DELETE(m_dropBox); LAMEXP_DELETE(m_evenFilterCustumParamsHelp); + LAMEXP_DELETE(m_evenFilterOutputFolderMouse); + LAMEXP_DELETE(m_evenFilterOutputFolderView); } //////////////////////////////////////////////////////////// @@ -1091,110 +1105,6 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event) QTimer::singleShot(250, this, SLOT(restoreCursor())); } } - else if(obj == outputFolderView) - { - switch(event->type()) - { - case QEvent::Enter: - case QEvent::Leave: - case QEvent::KeyPress: - case QEvent::KeyRelease: - case QEvent::FocusIn: - case QEvent::FocusOut: - case QEvent::TouchEnd: - outputFolderViewClicked(outputFolderView->currentIndex()); - break; - } - } - else if(obj == outputFolderLabel) - { - switch(event->type()) - { - case QEvent::MouseButtonPress: - if(dynamic_cast(event)->button() == Qt::LeftButton) - { - QString path = outputFolderLabel->text(); - if(!path.endsWith(QDir::separator())) path.append(QDir::separator()); - ShellExecuteW(reinterpret_cast(this->winId()), L"explore", QWCHAR(path), NULL, NULL, SW_SHOW); - } - break; - case QEvent::Enter: - outputFolderLabel->setForegroundRole(QPalette::Link); - break; - case QEvent::Leave: - outputFolderLabel->setForegroundRole(QPalette::WindowText); - break; - } - } - else if(obj == outputFoldersFovoritesLabel) - { - QMouseEvent *mouseEvent = dynamic_cast(event); - QPoint pos = (mouseEvent != NULL) ? mouseEvent->pos() : QPoint(); - QWidget *sender = dynamic_cast(obj); - - switch(event->type()) - { - case QEvent::Enter: - outputFoldersFovoritesLabel->setFrameShadow(QFrame::Raised); - break; - case QEvent::MouseButtonPress: - outputFoldersFovoritesLabel->setFrameShadow(QFrame::Sunken); - break; - case QEvent::MouseButtonRelease: - outputFoldersFovoritesLabel->setFrameShadow(QFrame::Raised); - if(sender && mouseEvent) - { - if(pos.x() <= sender->width() && pos.y() <= sender->height() && pos.x() >= 0 && pos.y() >= 0 && mouseEvent->button() != Qt::MidButton) - { - if(outputFolderView->isEnabled()) - { - m_outputFolderFavoritesMenu->popup(sender->mapToGlobal(pos)); - } - } - } - break; - case QEvent::Leave: - outputFoldersFovoritesLabel->setFrameShadow(QFrame::Plain); - break; - } - } - else if(obj == outputFoldersEditorLabel) - { - QMouseEvent *mouseEvent = dynamic_cast(event); - QPoint pos = (mouseEvent != NULL) ? mouseEvent->pos() : QPoint(); - QWidget *sender = dynamic_cast(obj); - - switch(event->type()) - { - case QEvent::Enter: - outputFoldersEditorLabel->setFrameShadow(QFrame::Raised); - break; - case QEvent::MouseButtonPress: - outputFoldersEditorLabel->setFrameShadow(QFrame::Sunken); - break; - case QEvent::MouseButtonRelease: - outputFoldersEditorLabel->setFrameShadow(QFrame::Raised); - if(sender && mouseEvent) - { - if(pos.x() <= sender->width() && pos.y() <= sender->height() && pos.x() >= 0 && pos.y() >= 0 && mouseEvent->button() != Qt::MidButton) - { - if(outputFolderView->isEnabled()) - { - outputFolderView->setEnabled(false); - outputFolderLabel->setVisible(false); - outputFolderEdit->setVisible(true); - outputFolderEdit->setText(outputFolderLabel->text()); - outputFolderEdit->selectAll(); - outputFolderEdit->setFocus(); - } - } - } - break; - case QEvent::Leave: - outputFoldersEditorLabel->setFrameShadow(QFrame::Plain); - break; - } - } return QMainWindow::eventFilter(obj, event); } @@ -3081,6 +2991,116 @@ void MainWindow::outputFolderItemExpanded(const QModelIndex &item) m_outputFolderViewCentering = false; } +/* + * View event for output folder control occurred + */ +void MainWindow::outputFolderViewEventOccurred(QWidget *sender, QEvent *event) +{ + switch(event->type()) + { + case QEvent::Enter: + case QEvent::Leave: + case QEvent::KeyPress: + case QEvent::KeyRelease: + case QEvent::FocusIn: + case QEvent::FocusOut: + case QEvent::TouchEnd: + outputFolderViewClicked(outputFolderView->currentIndex()); + break; + } +} + +/* + * Mouse event for output folder control occurred + */ +void MainWindow::outputFolderMouseEventOccurred(QWidget *sender, QEvent *event) +{ + QMouseEvent *mouseEvent = dynamic_cast(event); + QPoint pos = (mouseEvent) ? mouseEvent->pos() : QPoint(); + + if(sender == outputFolderLabel) + { + switch(event->type()) + { + case QEvent::MouseButtonPress: + if(mouseEvent && (mouseEvent->button() == Qt::LeftButton)) + { + QString path = outputFolderLabel->text(); + if(!path.endsWith(QDir::separator())) path.append(QDir::separator()); + ShellExecuteW(reinterpret_cast(this->winId()), L"explore", QWCHAR(path), NULL, NULL, SW_SHOW); + } + break; + case QEvent::Enter: + outputFolderLabel->setForegroundRole(QPalette::Link); + break; + case QEvent::Leave: + outputFolderLabel->setForegroundRole(QPalette::WindowText); + break; + } + } + else if(sender == outputFoldersFovoritesLabel) + { + switch(event->type()) + { + case QEvent::Enter: + outputFoldersFovoritesLabel->setFrameShadow(QFrame::Raised); + break; + case QEvent::MouseButtonPress: + outputFoldersFovoritesLabel->setFrameShadow(QFrame::Sunken); + break; + case QEvent::MouseButtonRelease: + outputFoldersFovoritesLabel->setFrameShadow(QFrame::Raised); + if(mouseEvent) + { + if(pos.x() <= sender->width() && pos.y() <= sender->height() && pos.x() >= 0 && pos.y() >= 0 && mouseEvent->button() != Qt::MidButton) + { + if(outputFolderView->isEnabled()) + { + m_outputFolderFavoritesMenu->popup(sender->mapToGlobal(pos)); + } + } + } + break; + case QEvent::Leave: + outputFoldersFovoritesLabel->setFrameShadow(QFrame::Plain); + break; + } + } + else if(sender == outputFoldersEditorLabel) + { + switch(event->type()) + { + case QEvent::Enter: + outputFoldersEditorLabel->setFrameShadow(QFrame::Raised); + break; + case QEvent::MouseButtonPress: + outputFoldersEditorLabel->setFrameShadow(QFrame::Sunken); + break; + case QEvent::MouseButtonRelease: + outputFoldersEditorLabel->setFrameShadow(QFrame::Raised); + if(mouseEvent) + { + if(pos.x() <= sender->width() && pos.y() <= sender->height() && pos.x() >= 0 && pos.y() >= 0 && mouseEvent->button() != Qt::MidButton) + { + if(outputFolderView->isEnabled()) + { + outputFolderView->setEnabled(false); + outputFolderLabel->setVisible(false); + outputFolderEdit->setVisible(true); + outputFolderEdit->setText(outputFolderLabel->text()); + outputFolderEdit->selectAll(); + outputFolderEdit->setFocus(); + } + } + } + break; + case QEvent::Leave: + outputFoldersEditorLabel->setFrameShadow(QFrame::Plain); + break; + } + } +} + // ========================================================= // Metadata tab slots // ========================================================= @@ -3780,30 +3800,44 @@ void MainWindow::useCustomTempFolderChanged(bool checked) } /* - * Show help for custom parameters + * Help for custom parameters was requested */ -void MainWindow::customParamsHelpRequested(QObject *obj) +void MainWindow::customParamsHelpRequested(QWidget *obj, QEvent *event) { - QString toolName, command; - - if(obj == helpCustomParamLAME) { toolName = "lame.exe"; command = "--help"; } - if(obj == helpCustomParamOggEnc) { toolName = "oggenc2.exe"; command = "--help"; } - if(obj == helpCustomParamNeroAAC) + if(event->type() != QEvent::MouseButtonRelease) { - if(m_qaacEncoderAvailable) { toolName = "qaac.exe"; command = "--help"; } - else if(m_fhgEncoderAvailable) { toolName = "fhgaacenc.exe"; command = ""; } - else if(m_neroEncoderAvailable) { toolName = "neroAacEnc.exe"; command = "-help"; } - } - if(obj == helpCustomParamFLAC) { toolName = "flac.exe"; command = "--help"; } - if(obj == helpCustomParamAften) { toolName = "aften.exe"; command = "-h"; } - if(obj == helpCustomParamOpus) { toolName = "opusenc_std.exe"; command = "--help"; } - - if(toolName.isEmpty() || command.isNull()) - { - MessageBeep(MB_ICONERROR); return; } + if(QMouseEvent *mouseEvent = dynamic_cast(event)) + { + QPoint pos = mouseEvent->pos(); + if(!(pos.x() <= obj->width() && pos.y() <= obj->height() && pos.x() >= 0 && pos.y() >= 0 && mouseEvent->button() != Qt::MidButton)) + { + return; + } + } + + if(obj == helpCustomParamLAME) showCustomParamsHelpScreen("lame.exe", "--longhelp"); + if(obj == helpCustomParamOggEnc) showCustomParamsHelpScreen("oggenc2.exe", "--help" ); + if(obj == helpCustomParamNeroAAC) + { + if(m_qaacEncoderAvailable) showCustomParamsHelpScreen("qaac.exe", "--help" ); + else if(m_fhgEncoderAvailable) showCustomParamsHelpScreen("fhgaacenc.exe", "" ); + else if(m_neroEncoderAvailable) showCustomParamsHelpScreen("neroAacEnc.exe", "-help" ); + } + if(obj == helpCustomParamFLAC) showCustomParamsHelpScreen("flac.exe", "--help" ); + if(obj == helpCustomParamAften) showCustomParamsHelpScreen("aften.exe", "-h" ); + if(obj == helpCustomParamOpus) showCustomParamsHelpScreen("opusenc_std.exe", "--help" ); + + MessageBeep(MB_ICONERROR); +} + +/* + * Show help for custom parameters + */ +void MainWindow::showCustomParamsHelpScreen(const QString &toolName, const QString &command) +{ const QString binary = lamexp_lookup_tool(toolName); if(binary.isEmpty()) { @@ -3816,18 +3850,21 @@ void MainWindow::customParamsHelpRequested(QObject *obj) process->setProcessChannelMode(QProcess::MergedChannels); process->setReadChannel(QProcess::StandardOutput); process->start(binary, command.isEmpty() ? QStringList() : QStringList() << command); - + qApp->setOverrideCursor(QCursor(Qt::WaitCursor)); + if(process->waitForStarted(15000)) { qApp->processEvents(); process->waitForFinished(15000); } + if(process->state() != QProcess::NotRunning) { process->kill(); process->waitForFinished(-1); } + qApp->restoreOverrideCursor(); QStringList output; bool spaceFlag = true; while(process->canReadLine()) @@ -3848,6 +3885,7 @@ void MainWindow::customParamsHelpRequested(QObject *obj) if(output.count() < 1) { + qWarning("Empty output, cannot show help screen!"); MessageBeep(MB_ICONERROR); } diff --git a/src/Dialog_MainWindow.h b/src/Dialog_MainWindow.h index f8f5b426..51d33661 100644 --- a/src/Dialog_MainWindow.h +++ b/src/Dialog_MainWindow.h @@ -72,7 +72,7 @@ private slots: void clearMetaButtonClicked(void); void closeButtonClicked(void); void customParamsChanged(void); - void customParamsHelpRequested(QObject*); + void customParamsHelpRequested(QWidget *obj, QEvent *event); void customTempFolderChanged(const QString &text); void disableNeroAacNotificationsActionTriggered(bool checked); void disableShellIntegrationActionTriggered(bool); @@ -113,6 +113,8 @@ private slots: void outputFolderDirectoryLoaded(const QString &path); void outputFolderEditFinished(void); void outputFolderItemExpanded(const QModelIndex &item); + void outputFolderMouseEventOccurred(QWidget *sender, QEvent *event); + void outputFolderViewEventOccurred(QWidget *sender, QEvent *event); void outputFolderRowsInserted(const QModelIndex &parent, int start, int end); void outputFolderViewClicked(const QModelIndex &index); void outputFolderViewMoved(const QModelIndex &index); @@ -129,6 +131,7 @@ private slots: void samplingRateChanged(int value); void saveToSourceFolderChanged(void); void showAnnounceBox(void); + void showCustomParamsHelpScreen(const QString &toolName, const QString &command); void showDetailsButtonClicked(void); void showDropBoxWidgetActionTriggered(bool checked); void showFolderContextActionTriggered(void); @@ -209,4 +212,6 @@ private: QButtonGroup *m_modeButtonGroup; CustomEventFilter *m_evenFilterCustumParamsHelp; + CustomEventFilter *m_evenFilterOutputFolderMouse; + CustomEventFilter *m_evenFilterOutputFolderView; };