From 09b934690034d95227a6a090c54d40f1fd3266ff Mon Sep 17 00:00:00 2001 From: Avery King Date: Sat, 7 Dec 2024 19:12:00 -0800 Subject: [PATCH] Preferences: Update manual links We now have a proper section in the manual for track behaviors and spectrogram settings. Update the help buttons in the appropriate preference panels to refer to these sections in the manual. Note: Effect manual pages remain unchanged as they are not yet documented. They will be documented later. Signed-off-by: Avery King (cherry picked from commit 0b54198ef5ae04cdf5201c8ef86ab8c82ee85e86) --- libraries/lib-files/FileException.cpp | 4 ++-- libraries/lib-files/TempDirectory.cpp | 4 ++-- src/DBConnection.cpp | 2 +- src/ProjectFileIO.cpp | 16 ++++++++-------- src/ProjectFileManager.cpp | 10 +++++----- src/ProjectHistory.cpp | 2 +- src/SqliteSampleBlock.cpp | 2 +- src/TenacityFileConfig.cpp | 2 +- src/WaveClip.cpp | 2 +- src/WaveTrack.cpp | 6 +++--- src/export/Export.cpp | 4 ++-- src/import/RawAudioGuess.cpp | 2 +- src/menus/EditMenus.cpp | 4 ++-- src/prefs/SpectrumPrefs.cpp | 2 +- src/prefs/TracksBehaviorsPrefs.cpp | 2 +- src/widgets/UnwritableLocationErrorDialog.cpp | 2 +- 16 files changed, 33 insertions(+), 33 deletions(-) diff --git a/libraries/lib-files/FileException.cpp b/libraries/lib-files/FileException.cpp index 3beaf863c7..629ca102ef 100644 --- a/libraries/lib-files/FileException.cpp +++ b/libraries/lib-files/FileException.cpp @@ -44,11 +44,11 @@ wxString FileException::ErrorHelpUrl() const switch (cause) { case Cause::Open: case Cause::Read: - return "Error:_Opening_or_reading_file"; + return "Editing_Part_2#a-file-failed-to-open-or-be-read-from"; break; case Cause::Write: case Cause::Rename: - return "Error:_Disk_full_or_not_writable"; + return "Editing_part_2#your-disk-is-full-or-not-writable"; default: break; } diff --git a/libraries/lib-files/TempDirectory.cpp b/libraries/lib-files/TempDirectory.cpp index 0058bdd9e6..3a8bfc1d2e 100644 --- a/libraries/lib-files/TempDirectory.cpp +++ b/libraries/lib-files/TempDirectory.cpp @@ -37,7 +37,7 @@ wxString TempDirectory::TempDir() XO("Unsuitable"), XO("The temporary files directory is on a FAT formatted drive.\n" "Resetting to default location."), - "Error:_Unsuitable_drive" + "Editing_Part_2#fat32-drives" ); path = DefaultTempDir(); @@ -120,7 +120,7 @@ bool TempDirectory::FATFilesystemDenied( const FilePath &path, GenericUI::ShowErrorDialog( placement, XO("Unsuitable"), XO("%s\n\nFor tips on suitable drives, click the help button.").Format(msg), - "Error:_Unsuitable_drive" + "Editing_Part_2.html#fat32-drives" ); return true; diff --git a/src/DBConnection.cpp b/src/DBConnection.cpp index b76ffaa534..7aa6952949 100644 --- a/src/DBConnection.cpp +++ b/src/DBConnection.cpp @@ -500,7 +500,7 @@ void DBConnection::CheckpointThread(sqlite3 *db, const FilePath &fileName) GuardedCall( [&message, rc] { throw SimpleMessageBoxException{ rc != SQLITE_FULL ? ExceptionType::Internal : ExceptionType::BadEnvironment, - message, XO("Warning"), "Error:_Disk_full_or_not_writable" }; }, + message, XO("Warning"), "Editing_Part_2#your-disk-is-full-or-not-writable" }; }, SimpleGuard{}, [this](TenacityException * e) { // This executes in the main thread. diff --git a/src/ProjectFileIO.cpp b/src/ProjectFileIO.cpp index a55fa7cf64..32e0d6afc1 100644 --- a/src/ProjectFileIO.cpp +++ b/src/ProjectFileIO.cpp @@ -514,7 +514,7 @@ ProjectFileIO::ProjectFileIO(TenacityProject &project) 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" + "Editing_Part_2#your-disk-is-full-or-not-writable" ); } } @@ -542,7 +542,7 @@ DBConnection &ProjectFileIO::GetConnection() ExceptionType::Internal, XO("Failed to open the project's database"), XO("Warning"), - "Error:_Disk_full_or_not_writable" + "Editing_Part_2#your-disk-is-full-or-not-writable" }; } } @@ -1344,7 +1344,7 @@ bool ProjectFileIO::RenameOrWarn(const FilePath &src, const FilePath &dst) "The disk might be full or isn't writable.\n" "For tips on freeing up space, click the help button.") .Format(dst), - "Error:_Disk_full_or_not_writable" + "Editing_Part_2#your-disk-is-full-or-not-writable" ); return false; } @@ -2178,7 +2178,7 @@ bool ProjectFileIO::SaveProject( XO( "The project's database failed to reopen, " "possibly because of limited space on the storage device."), - "Error:_Disk_full_or_not_writable" + "Editing_Part_2#your-disk-is-full-or-not-writable" ); wxCommandEvent evt{ EVT_RECONNECTION_FAILURE }; mProject.ProcessEvent(evt); @@ -2200,7 +2200,7 @@ bool ProjectFileIO::SaveProject( ShowError( {}, XO("Error Saving Project"), FileException::WriteFailureMessage(fileName), - "Error:_Disk_full_or_not_writable" + "Editing_Part_2#your-disk-is-full-or-not-writable" ); return false; } @@ -2256,7 +2256,7 @@ bool ProjectFileIO::SaveProject( XO("Error Saving Project"), XO("The project failed to open, possibly due to limited space\n" "on the storage device.\n\n%s").Format(GetLastError()), - "Error:_Disk_full_or_not_writable"); + "Editing_Part_2#your-disk-is-full-or-not-writable"); newConn = nullptr; @@ -2278,7 +2278,7 @@ bool ProjectFileIO::SaveProject( XO("Error Saving Project"), XO("Unable to remove autosave information, possibly due to limited space\n" "on the storage device.\n\n%s").Format(GetLastError()), - "Error:_Disk_full_or_not_writable"); + "Editing_Part_2#your-disk-is-full-or-not-writable"); newConn = nullptr; @@ -2320,7 +2320,7 @@ bool ProjectFileIO::SaveProject( ShowError( {}, XO("Error Saving Project"), FileException::WriteFailureMessage(fileName), - "Error:_Disk_full_or_not_writable" + "Editing_Part_2#your-disk-is-full-or-not-writable" ); return false; } diff --git a/src/ProjectFileManager.cpp b/src/ProjectFileManager.cpp index 5ac079b5c2..37d0f5d0a9 100644 --- a/src/ProjectFileManager.cpp +++ b/src/ProjectFileManager.cpp @@ -317,7 +317,7 @@ bool ProjectFileManager::DoSave(const FilePath & fileName, const bool fromSaveAs XO("Insufficient Disk Space"), XO("The project size exceeds the available free space on the target disk.\n\n" "Please select a different disk with more free space."), - "Error:_Disk_full_or_not_writable" + "Editing_Part_2#your-disk-is-full-or-not-writable" ); return false; @@ -342,7 +342,7 @@ bool ProjectFileManager::DoSave(const FilePath & fileName, const bool fromSaveAs GenericUI::ShowErrorDialog( *ProjectFramePlacement( &proj ), XO("Error Saving Project"), XO("The project exceeds the maximum size of 4GB when writing to a FAT32 formatted filesystem."), - "Error:_Unsuitable_drive" + "Editing_Part_2#fat32-drives" ); return false; } @@ -358,7 +358,7 @@ bool ProjectFileManager::DoSave(const FilePath & fileName, const bool fromSaveAs ShowErrorDialog( *ProjectFramePlacement( &proj ), XO("Error Saving Project"), FileException::WriteFailureMessage(fileName), - "Error:_Disk_full_or_not_writable", + "Editing_Part_2#your-disk-is-full-or-not-writable", ErrorDialogOptions{ ErrorDialogType::ModalErrorReport } ); } return false; @@ -658,7 +658,7 @@ bool ProjectFileManager::SaveCopy(const FilePath &fileName /* = wxT("") */) XO("Insufficient Disk Space"), XO("The project size exceeds the available free space on the target disk.\n\n" "Please select a different disk with more free space."), - "Error:_Unsuitable_drive" + "Editing_Part_2#your-disk-is-full-or-not-writable" ); continue; @@ -672,7 +672,7 @@ bool ProjectFileManager::SaveCopy(const FilePath &fileName /* = wxT("") */) GenericUI::ShowErrorDialog( *ProjectFramePlacement( &project ), XO("Error Saving Project"), XO("The project exceeds the maximum size of 4GB when writing to a FAT32 formatted filesystem."), - "Error:_Unsuitable_drive" + "Editing_Part_2#fat32-drives" ); if (project.mBatchMode) diff --git a/src/ProjectHistory.cpp b/src/ProjectHistory.cpp index 1edb0658d0..8723a7c501 100644 --- a/src/ProjectHistory.cpp +++ b/src/ProjectHistory.cpp @@ -82,7 +82,7 @@ namespace { ExceptionType::Internal, XO("Automatic database backup failed."), XO("Warning"), - "Error:_Disk_full_or_not_writable" + "Editing_Part_2#your-disk-is-full-or-not-writable" }; } } diff --git a/src/SqliteSampleBlock.cpp b/src/SqliteSampleBlock.cpp index aaa582b882..157da84d57 100644 --- a/src/SqliteSampleBlock.cpp +++ b/src/SqliteSampleBlock.cpp @@ -340,7 +340,7 @@ DBConnection *SqliteSampleBlock::Conn() const ExceptionType::Internal, XO("Connection to project file is null"), XO("Warning"), - "Error:_Disk_full_or_not_writable" + "Editing_Part_2#your-disk-is-full-or-not-writable" }; } return pConnection.get(); diff --git a/src/TenacityFileConfig.cpp b/src/TenacityFileConfig.cpp index 6f91c8d5c9..dc3f09c0d8 100644 --- a/src/TenacityFileConfig.cpp +++ b/src/TenacityFileConfig.cpp @@ -120,7 +120,7 @@ void TenacityFileConfig::Warn() OpenInDefaultBrowser("https://" + HelpSystem::HelpHostname + HelpSystem::HelpServerHomeDir + - "Error:_Audacity_settings_file_unwritable"); + "Preferences#inaccessible-or-unwritable-preferences"); break; case wxID_CANCEL: diff --git a/src/WaveClip.cpp b/src/WaveClip.cpp index 5e056e237e..9277c36ca5 100644 --- a/src/WaveClip.cpp +++ b/src/WaveClip.cpp @@ -1740,7 +1740,7 @@ void WaveClip::Resample(int rate, ProgressDialog *progress) ExceptionType::Internal, XO("Resampling failed."), XO("Warning"), - "Error:_Resampling" + "Editing_Part_2#resampling-fails" }; else { diff --git a/src/WaveTrack.cpp b/src/WaveTrack.cpp index 5bae43425d..fc14142af4 100644 --- a/src/WaveTrack.cpp +++ b/src/WaveTrack.cpp @@ -1513,7 +1513,7 @@ void WaveTrack::PasteWaveTrack(double t0, const WaveTrack* other) ExceptionType::BadUserAction, XO("There is not enough room available to paste the selection"), XO("Warning"), - "Error:_Insufficient_space_in_track" + "Editing_Part_2#insufficient-track-space" }; } } @@ -1533,7 +1533,7 @@ void WaveTrack::PasteWaveTrack(double t0, const WaveTrack* other) ExceptionType::BadUserAction, XO("There is not enough room available to paste the selection"), XO("Warning"), - "Error:_Insufficient_space_in_track" + "Editing_Part_2#insufficient-track-space" }; for (const auto& clip : other->mClips) @@ -2642,7 +2642,7 @@ void WaveTrack::ExpandCutLine(double cutLinePosition, double* cutlineStart, ExceptionType::BadUserAction, XO("There is not enough room available to expand the cut line"), XO("Warning"), - "Error:_Insufficient_space_in_track" + "Editing_Part_2#insufficient-track-space" }; } } diff --git a/src/export/Export.cpp b/src/export/Export.cpp index 2f0ba122af..014272a97e 100644 --- a/src/export/Export.cpp +++ b/src/export/Export.cpp @@ -1333,7 +1333,7 @@ void ShowExportErrorDialog(wxString ErrorCode, ShowErrorDialog( {}, caption, message.Format( ErrorCode ), - "Error:_Unable_to_export", // URL. + "Editing_Part_2#your-disk-is-full-or-not-writable", // URL. ErrorDialogOptions{ ErrorDialogType::ModalErrorReport } ); } @@ -1342,7 +1342,7 @@ void ShowDiskFullExportErrorDialog(const wxFileNameWrapper &fileName) GenericUI::ShowErrorDialog( {}, XO("Warning"), FileException::WriteFailureMessage(fileName), - "Error:_Disk_full_or_not_writable" + "Editing_Part_2#your-disk-is-full-or-not-writable" ); } diff --git a/src/import/RawAudioGuess.cpp b/src/import/RawAudioGuess.cpp index cc86d7342f..c08553acf3 100644 --- a/src/import/RawAudioGuess.cpp +++ b/src/import/RawAudioGuess.cpp @@ -213,7 +213,7 @@ static void Extract(bool bits16, ExceptionType::BadUserAction, XO("Bad data size. Could not import audio"), XO("Warning"), - "Error:_Importing_raw_audio" + "Importing_and_Exporting#errors-while-importing-raw-data" }; size_t dataSize = (size_t)dataSizeIn; diff --git a/src/menus/EditMenus.cpp b/src/menus/EditMenus.cpp index db2171a1e7..7af788ea8e 100644 --- a/src/menus/EditMenus.cpp +++ b/src/menus/EditMenus.cpp @@ -513,7 +513,7 @@ void OnPaste(const CommandContext &context) ExceptionType::BadUserAction, XO("Pasting one type of track into another is not allowed."), XO("Warning"), - "Error:_Copying_or_Pasting" + "Editing_Part_2#cutting-copying-and-pasting" }; // We should need this check only each time we visit the leading @@ -544,7 +544,7 @@ void OnPaste(const CommandContext &context) ExceptionType::BadUserAction, XO("Copying stereo audio into a mono track is not allowed."), XO("Warning"), - "Error:_Copying_or_Pasting" + "Editing_Part_2#pasting-stereo-clips-into-mono-tracks" }; } } diff --git a/src/prefs/SpectrumPrefs.cpp b/src/prefs/SpectrumPrefs.cpp index f5289b662d..e9034ff831 100644 --- a/src/prefs/SpectrumPrefs.cpp +++ b/src/prefs/SpectrumPrefs.cpp @@ -89,7 +89,7 @@ ManualPageID SpectrumPrefs::HelpPageName() // return mWt // ? "Spectrogram_Settings" // : "Spectrograms_Preferences"; - return "Preferences#tracks"; + return "Preferences#spectrograms"; } enum { diff --git a/src/prefs/TracksBehaviorsPrefs.cpp b/src/prefs/TracksBehaviorsPrefs.cpp index 94bd00c75f..18339b978e 100644 --- a/src/prefs/TracksBehaviorsPrefs.cpp +++ b/src/prefs/TracksBehaviorsPrefs.cpp @@ -46,7 +46,7 @@ TranslatableString TracksBehaviorsPrefs::GetDescription() ManualPageID TracksBehaviorsPrefs::HelpPageName() { - return "Preferences#tracks"; + return "Preferences#tracks-behaviors"; } void TracksBehaviorsPrefs::Populate() diff --git a/src/widgets/UnwritableLocationErrorDialog.cpp b/src/widgets/UnwritableLocationErrorDialog.cpp index 0275bc4b6b..56ed8046dc 100644 --- a/src/widgets/UnwritableLocationErrorDialog.cpp +++ b/src/widgets/UnwritableLocationErrorDialog.cpp @@ -98,5 +98,5 @@ void UnwritableLocationErrorDialog::OnOk(wxCommandEvent&) void UnwritableLocationErrorDialog::OnError(wxCommandEvent&) { - HelpSystem::ShowHelp(this, "Error:_Disk_full_or_not_writable", false); + HelpSystem::ShowHelp(this, "Editing_Part_2#your-disk-is-full-or-not-writable", false); }