From a98206bd7005464d4e75d9925c664a41d722fccb Mon Sep 17 00:00:00 2001 From: lordmulder Date: Sat, 22 Oct 2011 01:13:28 +0200 Subject: [PATCH] Added an option to hibernate the computer ("suspend to disk") instead of shutting it down ("power off"). --- LameXP_VS2010.vcxproj | 6 +- etc/Translation/Blank.ts | 451 ++++++++++++++++++---------------- etc/Translation/LameXP_DE.ts | 20 ++ etc/Translation/LameXP_ES.ts | 20 ++ etc/Translation/LameXP_FR.ts | 20 ++ etc/Translation/LameXP_IT.ts | 20 ++ etc/Translation/LameXP_KR.ts | 20 ++ etc/Translation/LameXP_PL.ts | 451 ++++++++++++++++++---------------- etc/Translation/LameXP_RU.ts | 20 ++ etc/Translation/LameXP_UK.ts | 20 ++ gui/MainWindow.ui | 13 +- res/localization/LameXP_DE.qm | Bin 71631 -> 72580 bytes src/Config.h | 2 +- src/Dialog_MainWindow.cpp | 105 ++++---- src/Dialog_MainWindow.h | 1 + src/Dialog_Processing.cpp | 4 +- src/Dialog_Processing.h | 11 +- src/Global.cpp | 12 +- src/Global.h | 2 +- src/Main.cpp | 10 +- src/Model_Settings.cpp | 2 + src/Model_Settings.h | 1 + 22 files changed, 712 insertions(+), 499 deletions(-) diff --git a/LameXP_VS2010.vcxproj b/LameXP_VS2010.vcxproj index d7928551..a13d5220 100644 --- a/LameXP_VS2010.vcxproj +++ b/LameXP_VS2010.vcxproj @@ -88,7 +88,7 @@ "/MANIFESTDEPENDENCY:type=%27win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27 processorArchitecture=%27*%27" %(AdditionalOptions) - qtmaind.lib;QtCored4.lib;QtGuid4.lib;Winmm.lib;Shlwapi.lib;Wininet.lib;psapi.lib;%(AdditionalDependencies) + qtmaind.lib;QtCored4.lib;QtGuid4.lib;Winmm.lib;Shlwapi.lib;Wininet.lib;PowrProf.lib;psapi.lib;%(AdditionalDependencies) $(QTDIR)\lib;$(QTDIR)\plugins\imageformats;%(AdditionalLibraryDirectories) true Windows @@ -141,7 +141,7 @@ copy "$(QTDIR)\plugins\imageformats\q????d4.dll" "$(TargetDir)imageformats\" "/MANIFESTDEPENDENCY:type=%27win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27 processorArchitecture=%27*%27" %(AdditionalOptions) - qtmain.lib;QtCore4.lib;QtGui4.lib;Winmm.lib;Shlwapi.lib;Wininet.lib;%(AdditionalDependencies) + qtmain.lib;QtCore4.lib;QtGui4.lib;Winmm.lib;Shlwapi.lib;Wininet.lib;PowrProf.lib;%(AdditionalDependencies) LinkVerboseLib @@ -213,7 +213,7 @@ del "$(TargetDir)imageformats\q???d4.dll" "/MANIFESTDEPENDENCY:type=%27win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27 processorArchitecture=%27*%27" %(AdditionalOptions) - qtmain.lib;QtCore.lib;QtGui.lib;QtSvg.lib;qsvg.lib;qico.lib;Winmm.lib;imm32.lib;ws2_32.lib;Shlwapi.lib;Wininet.lib;EncodePointer.lib;%(AdditionalDependencies) + qtmain.lib;QtCore.lib;QtGui.lib;QtSvg.lib;qsvg.lib;qico.lib;Winmm.lib;imm32.lib;ws2_32.lib;Shlwapi.lib;Wininet.lib;PowrProf.lib;EncodePointer.lib;%(AdditionalDependencies) LinkVerboseLib $(SolutionDir)\etc\Prerequisites\qt4_static\lib;$(SolutionDir)\etc\Prerequisites\qt4_static\plugins\imageformats;$(SolutionDir)\etc\Prerequisites\EncodePointer\lib;%(AdditionalLibraryDirectories) %(IgnoreSpecificDefaultLibraries) diff --git a/etc/Translation/Blank.ts b/etc/Translation/Blank.ts index ff94f34f..0d59896e 100644 --- a/etc/Translation/Blank.ts +++ b/etc/Translation/Blank.ts @@ -689,7 +689,7 @@ - + Source Files @@ -710,13 +710,13 @@ - + Show Details - + Output Directory @@ -752,7 +752,7 @@ - + Meta Data @@ -793,7 +793,7 @@ - + Compression @@ -869,7 +869,7 @@ - + Advanced Options @@ -1305,7 +1305,7 @@ - + About... @@ -1350,816 +1350,845 @@ - + Quit - + Open File(s)... - - + + Visit Official Web-Site - - - - + + + + Check for Updates - + Open Folder... - + Clear All - + Plastique - + Cleanlooks - + Windows Vista ("Aero") - + Windows Classic - + Windows XP ("Luna") - - + + Disable Update Reminder - - + + Disable Sound Effects - + Install WMA Decoder - + Disable Nero AAC Notifications - + Show DropBox - + From File... - + Encode! - + Disable Shell Integration - + Frequently Asked Questions - + Changelog - + Translator's Guide - + Help && Support - + Open Folder Recursively... - + Check for Beta Updates - + Import Cue Sheet - + Disable Slow Startup Notifications - + + Hibernate Computer On Shutdown + + + + 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! - + Open File in External Application - + Browse File Location - + Browse Selected Folder - + Bookmark Current Output Folder - + 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! - - - + + + 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: - + 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 - + Ignore - + 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 - - + + 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! - - - - + + + + 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! @@ -2709,17 +2738,17 @@ QApplication - + Executable '%1' doesn't support Windows compatibility mode. - + Executable '%1' requires Qt v%2, but found Qt v%3. - + Executable '%1' requires Windows 2000 or later. diff --git a/etc/Translation/LameXP_DE.ts b/etc/Translation/LameXP_DE.ts index 055038c6..62450449 100644 --- a/etc/Translation/LameXP_DE.ts +++ b/etc/Translation/LameXP_DE.ts @@ -1670,6 +1670,26 @@ DEMO VERSION + + Hibernate Computer On Shutdown + Computer in den Ruhezustand versetzen + + + Hibernate Computer + Ruhezustand + + + Do you really want the computer to be hibernated on shutdown? + Sind Sie sicher, dass der Computer in den Ruhezustand versetzt werden soll? + + + LameXP will hibernate the computer on shutdown from now on. + LameXP wird den Computer fortan in den Ruhezustand versetzen. + + + LameXP will <i>not</i> hibernate the computer on shutdown from now on. + LameXP wird den Computer fortan <i>nicht</i> in den Ruhezustand versetzen. + MetaInfo diff --git a/etc/Translation/LameXP_ES.ts b/etc/Translation/LameXP_ES.ts index 641c40a0..bb8175db 100644 --- a/etc/Translation/LameXP_ES.ts +++ b/etc/Translation/LameXP_ES.ts @@ -1669,6 +1669,26 @@ DEMO VERSION + + Hibernate Computer On Shutdown + + + + 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. + + MetaInfo diff --git a/etc/Translation/LameXP_FR.ts b/etc/Translation/LameXP_FR.ts index d781de22..e24d3760 100644 --- a/etc/Translation/LameXP_FR.ts +++ b/etc/Translation/LameXP_FR.ts @@ -1679,6 +1679,26 @@ Ouvrir le dossier récursivement... DEMO VERSION + + Hibernate Computer On Shutdown + + + + 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. + + MetaInfo diff --git a/etc/Translation/LameXP_IT.ts b/etc/Translation/LameXP_IT.ts index e64f5267..9e9e8d4c 100644 --- a/etc/Translation/LameXP_IT.ts +++ b/etc/Translation/LameXP_IT.ts @@ -1670,6 +1670,26 @@ DEMO VERSION + + Hibernate Computer On Shutdown + + + + 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. + + MetaInfo diff --git a/etc/Translation/LameXP_KR.ts b/etc/Translation/LameXP_KR.ts index fc259241..cff42a54 100644 --- a/etc/Translation/LameXP_KR.ts +++ b/etc/Translation/LameXP_KR.ts @@ -1669,6 +1669,26 @@ DEMO VERSION + + Hibernate Computer On Shutdown + + + + 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. + + MetaInfo diff --git a/etc/Translation/LameXP_PL.ts b/etc/Translation/LameXP_PL.ts index 7935b76a..10c7dacf 100644 --- a/etc/Translation/LameXP_PL.ts +++ b/etc/Translation/LameXP_PL.ts @@ -689,7 +689,7 @@ - + Source Files Pliki źródłowe @@ -710,13 +710,13 @@ - + Show Details Pokaż szczegóły - + Output Directory Folder docelowy @@ -752,7 +752,7 @@ - + Meta Data Tagi @@ -793,7 +793,7 @@ - + Compression Kompresja @@ -869,7 +869,7 @@ - + Advanced Options Opcje zaawansowane @@ -1305,7 +1305,7 @@ - + About... Info... @@ -1350,816 +1350,845 @@ Konfiguracja - + Quit Zamknij - + Open File(s)... Otwórz plik(i)... - - + + Visit Official Web-Site Odwiedź oficjalną stronę - - - - + + + + Check for Updates Sprawdź aktualizacje - + Open Folder... Otwórz folder... - + Clear All Wyczyść wszystko - + Plastique Plastique - + Cleanlooks Cleanlooks - + Windows Vista ("Aero") Windows Vista ("Aero") - + Windows Classic Windows Classic - + Windows XP ("Luna") Windows XP ("Luna") - - + + Disable Update Reminder Wyłącz przypominanie o aktualizacji - - + + Disable Sound Effects Wyłącz efekty dźwiękowe - + Install WMA Decoder Zainstaluj Dekoder WMA - + Disable Nero AAC Notifications Wyłącz powiadomienia Nero AAC - + Show DropBox Pokaż DropBoxa - + From File... Z pliku... - + Encode! Kompresuj! - + Disable Shell Integration Wyłącz integrację z systemem - + Frequently Asked Questions Pytania i Odpowiedzi - + Changelog Lista zmian - + Translator's Guide Przewodnik tłumacza - + Help && Support Pomoc i Wsparcie - + Open Folder Recursively... Otwórz folder rekurencyjnie... - + Check for Beta Updates Sprawdzaj czy jest Beta - + Import Cue Sheet Importuj plik Cue - + Disable Slow Startup Notifications Wyłącz powiadomienia o powolnym starcie - + + Hibernate Computer On Shutdown + + + + 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. - + 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 - + 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 - + 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 + + + + + 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 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 - - + + 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! - - - - + + + + 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! @@ -2709,17 +2738,17 @@ QApplication - + Executable '%1' doesn't support Windows compatibility mode. Plik wykonywalny '%1' nie działa w trybie kompatybilności z Windows. - + Executable '%1' requires Qt v%2, but found Qt v%3. Plik wykonywalny '%1' wymaga Qt v%2, znaleziono jednak Qt v%3. - + Executable '%1' requires Windows 2000 or later. Plik wykonywalny '%1' wymaga do uruchomienia Windows 2000 lub nowszego. diff --git a/etc/Translation/LameXP_RU.ts b/etc/Translation/LameXP_RU.ts index 0344b509..22becbbd 100644 --- a/etc/Translation/LameXP_RU.ts +++ b/etc/Translation/LameXP_RU.ts @@ -1675,6 +1675,26 @@ DEMO VERSION + + Hibernate Computer On Shutdown + + + + 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. + + MetaInfo diff --git a/etc/Translation/LameXP_UK.ts b/etc/Translation/LameXP_UK.ts index 5409319a..29b2b13c 100644 --- a/etc/Translation/LameXP_UK.ts +++ b/etc/Translation/LameXP_UK.ts @@ -1670,6 +1670,26 @@ DEMO VERSION + + Hibernate Computer On Shutdown + + + + 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. + + MetaInfo diff --git a/gui/MainWindow.ui b/gui/MainWindow.ui index 87309051..daf36d04 100644 --- a/gui/MainWindow.ui +++ b/gui/MainWindow.ui @@ -1099,8 +1099,8 @@ 0 0 - 604 - 1524 + 602 + 1515 @@ -3482,6 +3482,7 @@ + @@ -3793,6 +3794,14 @@ Disable Slow Startup Notifications + + + true + + + Hibernate Computer On Shutdown + + diff --git a/res/localization/LameXP_DE.qm b/res/localization/LameXP_DE.qm index b77e696f6529df4fe6e949dbccf596c3d9c93d3d..4f76f8b4ee0e0790ec909cf5bf7f29f81d90d500 100644 GIT binary patch delta 4538 zcmbVPdt6O<_kQ+1d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N+LvWQ^F&zycVSC3f=gq9V0m_nwJum)@wvp-?PMp zr#St`74)Hn=+TENK6IJr=|$AmofCai={{pDE?8setDisabled(lamexp_portable_mode() && actionDisableShellIntegration->isChecked()); actionCheckForBetaUpdates->setChecked(m_settings->autoUpdateCheckBeta() || lamexp_version_demo()); actionCheckForBetaUpdates->setEnabled(!lamexp_version_demo()); + actionHibernateComputer->setChecked(m_settings->hibernateComputer()); connect(actionDisableUpdateReminder, SIGNAL(triggered(bool)), this, SLOT(disableUpdateReminderActionTriggered(bool))); connect(actionDisableSounds, SIGNAL(triggered(bool)), this, SLOT(disableSoundsActionTriggered(bool))); connect(actionDisableNeroAacNotifications, SIGNAL(triggered(bool)), this, SLOT(disableNeroAacNotificationsActionTriggered(bool))); connect(actionDisableSlowStartupNotifications, SIGNAL(triggered(bool)), this, SLOT(disableSlowStartupNotificationsActionTriggered(bool))); connect(actionDisableShellIntegration, SIGNAL(triggered(bool)), this, SLOT(disableShellIntegrationActionTriggered(bool))); connect(actionShowDropBoxWidget, SIGNAL(triggered(bool)), this, SLOT(showDropBoxWidgetActionTriggered(bool))); + connect(actionHibernateComputer, SIGNAL(triggered(bool)), this, SLOT(hibernateComputerActionTriggered(bool))); connect(actionCheckForBetaUpdates, SIGNAL(triggered(bool)), this, SLOT(checkForBetaUpdatesActionTriggered(bool))); connect(actionImportCueSheet, SIGNAL(triggered(bool)), this, SLOT(importCueSheetActionTriggered(bool))); @@ -1449,9 +1451,9 @@ void MainWindow::disableUpdateReminderActionTriggered(bool checked) { if(checked) { - if(0 == QMessageBox::question(this, tr("Disable Update Reminder"), tr("Do you really want to disable the update reminder?"), tr("Yes"), tr("No"), QString(), 1)) + if(0 == QMessageBox::question(this, tr("Disable Update Reminder"), NOBR(tr("Do you really want to disable the update reminder?")), tr("Yes"), tr("No"), QString(), 1)) { - QMessageBox::information(this, tr("Update Reminder"), QString("%1
%2").arg(tr("The update reminder has been disabled."), tr("Please remember to check for updates at regular intervals!"))); + QMessageBox::information(this, tr("Update Reminder"), QString("%1
%2").arg(NOBR(tr("The update reminder has been disabled.")), NOBR(tr("Please remember to check for updates at regular intervals!")))); m_settings->autoUpdateEnabled(false); } else @@ -1461,7 +1463,7 @@ void MainWindow::disableUpdateReminderActionTriggered(bool checked) } else { - QMessageBox::information(this, tr("Update Reminder"), tr("The update reminder has been re-enabled.")); + QMessageBox::information(this, tr("Update Reminder"), NOBR(tr("The update reminder has been re-enabled."))); m_settings->autoUpdateEnabled(true); } @@ -1475,9 +1477,9 @@ void MainWindow::disableSoundsActionTriggered(bool checked) { if(checked) { - if(0 == QMessageBox::question(this, tr("Disable Sound Effects"), tr("Do you really want to disable all sound effects?"), tr("Yes"), tr("No"), QString(), 1)) + if(0 == QMessageBox::question(this, tr("Disable Sound Effects"), NOBR(tr("Do you really want to disable all sound effects?")), tr("Yes"), tr("No"), QString(), 1)) { - QMessageBox::information(this, tr("Sound Effects"), tr("All sound effects have been disabled.")); + QMessageBox::information(this, tr("Sound Effects"), NOBR(tr("All sound effects have been disabled."))); m_settings->soundsEnabled(false); } else @@ -1487,7 +1489,7 @@ void MainWindow::disableSoundsActionTriggered(bool checked) } else { - QMessageBox::information(this, tr("Sound Effects"), tr("The sound effects have been re-enabled.")); + QMessageBox::information(this, tr("Sound Effects"), NOBR(tr("The sound effects have been re-enabled."))); m_settings->soundsEnabled(true); } @@ -1501,9 +1503,9 @@ void MainWindow::disableNeroAacNotificationsActionTriggered(bool checked) { if(checked) { - if(0 == QMessageBox::question(this, tr("Nero AAC Notifications"), tr("Do you really want to disable all Nero AAC Encoder notifications?"), tr("Yes"), tr("No"), QString(), 1)) + if(0 == QMessageBox::question(this, tr("Nero AAC Notifications"), NOBR(tr("Do you really want to disable all Nero AAC Encoder notifications?")), tr("Yes"), tr("No"), QString(), 1)) { - QMessageBox::information(this, tr("Nero AAC Notifications"), tr("All Nero AAC Encoder notifications have been disabled.")); + QMessageBox::information(this, tr("Nero AAC Notifications"), NOBR(tr("All Nero AAC Encoder notifications have been disabled."))); m_settings->neroAacNotificationsEnabled(false); } else @@ -1513,39 +1515,13 @@ void MainWindow::disableNeroAacNotificationsActionTriggered(bool checked) } else { - QMessageBox::information(this, tr("Nero AAC Notifications"), tr("The Nero AAC Encoder notifications have been re-enabled.")); + QMessageBox::information(this, tr("Nero AAC Notifications"), NOBR(tr("The Nero AAC Encoder notifications have been re-enabled."))); m_settings->neroAacNotificationsEnabled(true); } actionDisableNeroAacNotifications->setChecked(!m_settings->neroAacNotificationsEnabled()); } -/* - * Disable WMA Decoder component action - */ -//void MainWindow::disableWmaDecoderNotificationsActionTriggered(bool checked) -//{ -// if(checked) -// { -// if(0 == QMessageBox::question(this, tr("WMA Decoder Notifications"), tr("Do you really want to disable all WMA Decoder notifications?"), tr("Yes"), tr("No"), QString(), 1)) -// { -// QMessageBox::information(this, tr("WMA Decoder Notifications"), tr("All WMA Decoder notifications have been disabled.")); -// m_settings->wmaDecoderNotificationsEnabled(false); -// } -// else -// { -// m_settings->wmaDecoderNotificationsEnabled(true); -// } -// } -// else -// { -// QMessageBox::information(this, tr("WMA Decoder Notifications"), tr("The WMA Decoder notifications have been re-enabled.")); -// m_settings->wmaDecoderNotificationsEnabled(true); -// } -// -// actionDisableWmaDecoderNotifications->setChecked(!m_settings->wmaDecoderNotificationsEnabled()); -//} - /* * Disable slow startup action */ @@ -1553,9 +1529,9 @@ void MainWindow::disableSlowStartupNotificationsActionTriggered(bool checked) { if(checked) { - if(0 == QMessageBox::question(this, tr("Slow Startup Notifications"), tr("Do you really want to disable the slow startup notifications?"), tr("Yes"), tr("No"), QString(), 1)) + if(0 == QMessageBox::question(this, tr("Slow Startup Notifications"), NOBR(tr("Do you really want to disable the slow startup notifications?")), tr("Yes"), tr("No"), QString(), 1)) { - QMessageBox::information(this, tr("Slow Startup Notifications"), tr("The slow startup notifications have been disabled.")); + QMessageBox::information(this, tr("Slow Startup Notifications"), NOBR(tr("The slow startup notifications have been disabled."))); m_settings->antivirNotificationsEnabled(false); } else @@ -1565,28 +1541,13 @@ void MainWindow::disableSlowStartupNotificationsActionTriggered(bool checked) } else { - QMessageBox::information(this, tr("Slow Startup Notifications"), tr("The slow startup notifications have been re-enabled.")); + QMessageBox::information(this, tr("Slow Startup Notifications"), NOBR(tr("The slow startup notifications have been re-enabled."))); m_settings->antivirNotificationsEnabled(true); } actionDisableSlowStartupNotifications->setChecked(!m_settings->antivirNotificationsEnabled()); } -/* - * Download and install WMA Decoder component - */ -//void MainWindow::installWMADecoderActionTriggered(bool checked) -//{ -// if(QMessageBox::question(this, tr("Install WMA Decoder"), tr("Do you want to download and install the WMA File Decoder component now?"), tr("Download && Install"), tr("Cancel")) == 0) -// { -// if(installWMADecoder()) -// { -// QApplication::quit(); -// return; -// } -// } -//} - /* * Import a Cue Sheet file */ @@ -1654,9 +1615,9 @@ void MainWindow::checkForBetaUpdatesActionTriggered(bool checked) if(checked) { - if(0 == QMessageBox::question(this, tr("Beta Updates"), tr("Do you really want LameXP to check for Beta (pre-release) updates?"), tr("Yes"), tr("No"), QString(), 1)) + if(0 == QMessageBox::question(this, tr("Beta Updates"), NOBR(tr("Do you really want LameXP to check for Beta (pre-release) updates?")), tr("Yes"), tr("No"), QString(), 1)) { - if(0 == QMessageBox::information(this, tr("Beta Updates"), tr("LameXP will check for Beta (pre-release) updates from now on."), tr("Check Now"), tr("Discard"))) + if(0 == QMessageBox::information(this, tr("Beta Updates"), NOBR(tr("LameXP will check for Beta (pre-release) updates from now on.")), tr("Check Now"), tr("Discard"))) { checkUpdatesNow = true; } @@ -1669,7 +1630,7 @@ void MainWindow::checkForBetaUpdatesActionTriggered(bool checked) } else { - QMessageBox::information(this, tr("Beta Updates"), tr("LameXP will not check for Beta (pre-release) updates from now on.")); + QMessageBox::information(this, tr("Beta Updates"), NOBR(tr("LameXP will not check for Beta (pre-release) updates from now on."))); m_settings->autoUpdateCheckBeta(false); } @@ -1684,6 +1645,32 @@ void MainWindow::checkForBetaUpdatesActionTriggered(bool checked) } } +/* + * Hibernate computer action + */ +void MainWindow::hibernateComputerActionTriggered(bool checked) +{ + if(checked) + { + if(0 == QMessageBox::question(this, tr("Hibernate Computer"), NOBR(tr("Do you really want the computer to be hibernated on shutdown?")), tr("Yes"), tr("No"), QString(), 1)) + { + QMessageBox::information(this, tr("Hibernate Computer"), NOBR(tr("LameXP will hibernate the computer on shutdown from now on."))); + m_settings->hibernateComputer(true); + } + else + { + m_settings->hibernateComputer(false); + } + } + else + { + QMessageBox::information(this, tr("Hibernate Computer"), NOBR(tr("LameXP will not hibernate the computer on shutdown from now on."))); + m_settings->hibernateComputer(false); + } + + actionHibernateComputer->setChecked(m_settings->hibernateComputer()); +} + /* * Disable shell integration action */ @@ -1691,10 +1678,10 @@ void MainWindow::disableShellIntegrationActionTriggered(bool checked) { if(checked) { - if(0 == QMessageBox::question(this, tr("Shell Integration"), tr("Do you really want to disable the LameXP shell integration?"), tr("Yes"), tr("No"), QString(), 1)) + if(0 == QMessageBox::question(this, tr("Shell Integration"), NOBR(tr("Do you really want to disable the LameXP shell integration?")), tr("Yes"), tr("No"), QString(), 1)) { ShellIntegration::remove(); - QMessageBox::information(this, tr("Shell Integration"), tr("The LameXP shell integration has been disabled.")); + QMessageBox::information(this, tr("Shell Integration"), NOBR(tr("The LameXP shell integration has been disabled."))); m_settings->shellIntegrationEnabled(false); } else @@ -1705,7 +1692,7 @@ void MainWindow::disableShellIntegrationActionTriggered(bool checked) else { ShellIntegration::install(); - QMessageBox::information(this, tr("Shell Integration"), tr("The LameXP shell integration has been re-enabled.")); + QMessageBox::information(this, tr("Shell Integration"), NOBR(tr("The LameXP shell integration has been re-enabled."))); m_settings->shellIntegrationEnabled(true); } diff --git a/src/Dialog_MainWindow.h b/src/Dialog_MainWindow.h index 7dfcf5e4..ef180a79 100644 --- a/src/Dialog_MainWindow.h +++ b/src/Dialog_MainWindow.h @@ -87,6 +87,7 @@ private slots: void gotoHomeFolderButtonClicked(void); void gotoMusicFolderButtonClicked(void); void handleDelayedFiles(void); + void hibernateComputerActionTriggered(bool checked); void importCueSheetActionTriggered(bool checked); void initOutputFolderModel(void); void languageActionActivated(QAction *action); diff --git a/src/Dialog_Processing.cpp b/src/Dialog_Processing.cpp index b4b586b4..331c9fe6 100644 --- a/src/Dialog_Processing.cpp +++ b/src/Dialog_Processing.cpp @@ -96,7 +96,7 @@ ProcessingDialog::ProcessingDialog(FileListModel *fileListModel, AudioFileModel m_systemTray(new QSystemTrayIcon(QIcon(":/icons/cd_go.png"), this)), m_settings(settings), m_metaInfo(metaInfo), - m_shutdownFlag(false), + m_shutdownFlag(shutdownFlag_None), m_diskObserver(NULL) { //Init the dialog, from the .ui file @@ -431,7 +431,7 @@ void ProcessingDialog::doneEncoding(void) { if(shutdownComputer()) { - m_shutdownFlag = true; + m_shutdownFlag = m_settings->hibernateComputer() ? shutdownFlag_Hibernate : shutdownFlag_TurnPowerOff; accept(); } } diff --git a/src/Dialog_Processing.h b/src/Dialog_Processing.h index 13eb76f8..c4caf06a 100644 --- a/src/Dialog_Processing.h +++ b/src/Dialog_Processing.h @@ -35,6 +35,13 @@ class AudioFileModel; class SettingsModel; class DiskObserverThread; +enum shutdownFlag_t +{ + shutdownFlag_None = 0, + shutdownFlag_TurnPowerOff = 1, + shutdownFlag_Hibernate = 2 +}; + class ProcessingDialog : public QDialog, private Ui::ProcessingDialog { Q_OBJECT @@ -43,7 +50,7 @@ public: ProcessingDialog(FileListModel *fileListModel, AudioFileModel *metaInfo, SettingsModel *settings, QWidget *parent = 0); ~ProcessingDialog(void); - bool getShutdownFlag(void) { return m_shutdownFlag; } + int getShutdownFlag(void) { return m_shutdownFlag; } private slots: void initEncoding(void); @@ -85,6 +92,6 @@ private: QList m_failedJobs; bool m_userAborted; QSystemTrayIcon *m_systemTray; - bool m_shutdownFlag; + int m_shutdownFlag; DiskObserverThread *m_diskObserver; }; diff --git a/src/Global.cpp b/src/Global.cpp index 0397c850..7f59d040 100644 --- a/src/Global.cpp +++ b/src/Global.cpp @@ -58,6 +58,7 @@ //COM includes #include +#include //Debug only includes #if LAMEXP_DEBUG @@ -1501,7 +1502,7 @@ __int64 lamexp_free_diskspace(const QString &path) /* * Shutdown the computer */ -bool lamexp_shutdown_computer(const QString &message, const unsigned long timeout, const bool forceShutdown) +bool lamexp_shutdown_computer(const QString &message, const unsigned long timeout, const bool forceShutdown, const bool hibernate) { HANDLE hToken = NULL; @@ -1516,8 +1517,15 @@ bool lamexp_shutdown_computer(const QString &message, const unsigned long timeou { if(AdjustTokenPrivileges(hToken, FALSE, &privileges, NULL, NULL, NULL)) { + if(hibernate) + { + if(SetSuspendState(TRUE, TRUE, TRUE)) + { + return true; + } + } const DWORD reason = SHTDN_REASON_MAJOR_APPLICATION | SHTDN_REASON_FLAG_PLANNED; - return InitiateSystemShutdownEx(NULL, const_cast(QWCHAR(message)), timeout, forceShutdown, FALSE, reason); + return InitiateSystemShutdownEx(NULL, const_cast(QWCHAR(message)), timeout, forceShutdown ? TRUE : FALSE, FALSE, reason); } } } diff --git a/src/Global.h b/src/Global.h index 71b512ff..6ca71619 100644 --- a/src/Global.h +++ b/src/Global.h @@ -103,7 +103,7 @@ void lamexp_ipc_read(unsigned int *command, char* message, size_t buffSize); void lamexp_ipc_send(unsigned int command, const char* message); lamexp_cpu_t lamexp_detect_cpu_features(int argc = 0, char **argv = NULL); bool lamexp_portable_mode(void); -bool lamexp_shutdown_computer(const QString &message, const unsigned long timeout = 30, const bool forceShutdown = true); +bool lamexp_shutdown_computer(const QString &message, const unsigned long timeout = 30, const bool forceShutdown = true, const bool hibernate = false); //Translation support QStringList lamexp_query_translations(void); diff --git a/src/Main.cpp b/src/Main.cpp index 369f68a9..54942db8 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -46,8 +46,8 @@ static int lamexp_main(int argc, char* argv[]) { int iResult = -1; + int iShutdown = shutdownFlag_None; bool bAccepted = true; - bool bShutdown = false; //Init console lamexp_init_console(argc, argv); @@ -145,7 +145,7 @@ static int lamexp_main(int argc, char* argv[]) MainWindow *poMainWindow = new MainWindow(fileListModel, metaInfo, settingsModel); //Main application loop - while(bAccepted && !bShutdown) + while(bAccepted && (iShutdown <= shutdownFlag_None)) { //Show main window poMainWindow->show(); @@ -157,7 +157,7 @@ static int lamexp_main(int argc, char* argv[]) { ProcessingDialog *processingDialog = new ProcessingDialog(fileListModel, metaInfo, settingsModel); processingDialog->exec(); - bShutdown = processingDialog->getShutdownFlag(); + iShutdown = processingDialog->getShutdownFlag(); LAMEXP_DELETE(processingDialog); } } @@ -172,9 +172,9 @@ static int lamexp_main(int argc, char* argv[]) qDebug("Shutting down, please wait...\n"); //Shotdown computer - if(bShutdown) + if(iShutdown > shutdownFlag_None) { - if(!lamexp_shutdown_computer(QApplication::applicationFilePath(), 12)) + if(!lamexp_shutdown_computer(QApplication::applicationFilePath(), 12, true, (iShutdown == shutdownFlag_Hibernate))) { QMessageBox messageBox(QMessageBox::Critical, "LameXP", "Sorry, LameXP was unable to shutdown your computer!", QMessageBox::NoButton, NULL, Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint | Qt::WindowStaysOnTopHint); } diff --git a/src/Model_Settings.cpp b/src/Model_Settings.cpp index fb4baad9..e565c1d3 100644 --- a/src/Model_Settings.cpp +++ b/src/Model_Settings.cpp @@ -113,6 +113,7 @@ LAMEXP_MAKE_ID(customParametersAften, "AdvancedOptions/CustomParameters/Aften"); LAMEXP_MAKE_ID(customParametersFLAC, "AdvancedOptions/CustomParameters/FLAC"); LAMEXP_MAKE_ID(renameOutputFilesEnabled, "AdvancedOptions/RenameOutputFiles/Enabled"); LAMEXP_MAKE_ID(renameOutputFilesPattern, "AdvancedOptions/RenameOutputFiles/Pattern"); +LAMEXP_MAKE_ID(hibernateComputer, "AdvancedOptions/HibernateComputerOnShutdown"); LAMEXP_MAKE_ID(metaInfoPosition, "MetaInformation/PlaylistPosition"); LAMEXP_MAKE_ID(maximumInstances, "AdvancedOptions/Threading/MaximumInstances"); LAMEXP_MAKE_ID(customTempPath, "AdvancedOptions/TempDirectory/CustomPath"); @@ -363,3 +364,4 @@ LAMEXP_MAKE_OPTION_S(customTempPath, QDesktopServices::storageLocation(QDesktopS LAMEXP_MAKE_OPTION_B(customTempPathEnabled, false); LAMEXP_MAKE_OPTION_B(slowStartup, false); LAMEXP_MAKE_OPTION_S(mostRecentInputPath, QDesktopServices::storageLocation(QDesktopServices::MusicLocation)); +LAMEXP_MAKE_OPTION_B(hibernateComputer, false); diff --git a/src/Model_Settings.h b/src/Model_Settings.h index 01bbf433..19a0fd24 100644 --- a/src/Model_Settings.h +++ b/src/Model_Settings.h @@ -128,6 +128,7 @@ public: LAMEXP_MAKE_OPTION_B(customTempPathEnabled); LAMEXP_MAKE_OPTION_B(slowStartup); LAMEXP_MAKE_OPTION_S(mostRecentInputPath); + LAMEXP_MAKE_OPTION_B(hibernateComputer); //Misc void validate(void);