1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

2540 and more disk-full warning adjustments.

- Add text to tell people about the help button.
- Use alternative to 'wxFilename::GetVolume' that works on macOS.
This commit is contained in:
James Crook
2020-09-25 15:04:52 +01:00
parent 4810897b74
commit f0fb7e5be5
2 changed files with 11 additions and 5 deletions

View File

@@ -15,6 +15,7 @@
#include "KeyboardCapture.h"
#include "FileNames.h"
#include "./widgets/ErrorDialog.h"
#include "./FileException.h"
#include <wx/display.h>
#include <wx/filename.h>
@@ -132,12 +133,13 @@ AudacityProject::AudacityProject()
auto path = FileNames::TempDir();
if (wxGetDiskSpace(path, NULL, &freeSpace)) {
if (freeSpace < wxLongLong(wxLL(100 * 1048576))) {
auto volume = wxFileName(path).GetVolume();
auto volume = FileException::AbbreviatePath( path );
/* 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 on %s:\n"
"Please select a bigger temporary directory in Preferences.").Format( volume ),
XO("There is very little free disk space left on %s\n"
"Please select a bigger temporary directory location in\n"
"Directories Preferences.").Format( volume ),
"Error:_Disk_full_or_not_writable"
);
}