1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-30 15:49:41 +02:00

Bug 2540 - No low disk space warning on startup

Fix residuals:
1 - Name the drive in the warning message.
2 - Remove the now redundant preference to disable the warning.
This commit is contained in:
James Crook 2020-09-24 11:10:11 +01:00
parent d7b333ac41
commit 05a389f787
2 changed files with 5 additions and 5 deletions

View File

@ -17,6 +17,7 @@
#include "./widgets/ErrorDialog.h"
#include <wx/display.h>
#include <wx/filename.h>
#include <wx/frame.h>
wxDEFINE_EVENT(EVT_TRACK_PANEL_TIMER, wxCommandEvent);
@ -131,10 +132,12 @@ AudacityProject::AudacityProject()
auto path = FileNames::TempDir();
if (wxGetDiskSpace(path, NULL, &freeSpace)) {
if (freeSpace < wxLongLong(wxLL(100 * 1048576))) {
auto volume = wxFileName(path).GetVolume();
/* i18n-hint: %s will be replaced by the drive letter (on Windows) */
ShowErrorDialog(nullptr,
XO("Warning"),
XO("There is very little free disk space left.\n"
"Please select a bigger temporary directory in Preferences."),
XO("There is very little free disk space left on %s:\n"
"Please select a bigger temporary directory in Preferences.").Format( volume ),
"Error:_Disk_full_or_not_writable"
);
}

View File

@ -75,9 +75,6 @@ void WarningsPrefs::PopulateOrExchange(ShuttleGui & S)
S.TieCheckBox(XXO("Saving &empty project"),
{wxT("/GUI/EmptyCanBeDirty"),
true});
S.TieCheckBox(XXO("&Low disk space at launch or new project"),
{wxT("/Warnings/DiskSpaceWarning"),
true});
S.TieCheckBox(XXO("Mixing down to &mono during export"),
{wxT("/Warnings/MixMono"),
true});