1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-09-18 09:00:52 +02:00

Add and correct various comments

This commit is contained in:
Paul Licameli 2020-05-23 06:00:56 -04:00
parent 71e5f150ed
commit 2527bdecaf
9 changed files with 11 additions and 6 deletions

View File

@ -66,6 +66,7 @@ void ProjectStatus::Set(const TranslatableString &msg, StatusBarField field )
{ {
auto &project = mProject; auto &project = mProject;
auto &lastMessage = mLastStatusMessages[ field - 1 ]; auto &lastMessage = mLastStatusMessages[ field - 1 ];
// compare full translations not msgids!
if ( msg.Translation() != lastMessage.Translation() ) { if ( msg.Translation() != lastMessage.Translation() ) {
lastMessage = msg; lastMessage = msg;
wxCommandEvent evt{ EVT_PROJECT_STATUS_UPDATE }; wxCommandEvent evt{ EVT_PROJECT_STATUS_UPDATE };

View File

@ -283,6 +283,7 @@ void UndoManager::PushState(const TrackList * l,
unsigned int i; unsigned int i;
if ( ((flags & UndoPush::CONSOLIDATE) != UndoPush::MINIMAL) && if ( ((flags & UndoPush::CONSOLIDATE) != UndoPush::MINIMAL) &&
// compare full translations not msgids!
lastAction.Translation() == longDescription.Translation() && lastAction.Translation() == longDescription.Translation() &&
mayConsolidate ) { mayConsolidate ) {
ModifyState(l, selectedRegion, tags); ModifyState(l, selectedRegion, tags);

View File

@ -537,6 +537,7 @@ void AddEffectMenuItemGroup(
int groupCnt = namesCnt; int groupCnt = namesCnt;
for (int i = 0; i < namesCnt; i++) for (int i = 0; i < namesCnt; i++)
{ {
// compare full translations not msgids!
while (i + 1 < namesCnt && names[i].Translation() == names[i + 1].Translation()) while (i + 1 < namesCnt && names[i].Translation() == names[i + 1].Translation())
{ {
i++; i++;
@ -573,12 +574,14 @@ void AddEffectMenuItemGroup(
pTable = &temp1; pTable = &temp1;
} }
// compare full translations not msgids!
if (i + 1 < namesCnt && names[i].Translation() == names[i + 1].Translation()) if (i + 1 < namesCnt && names[i].Translation() == names[i + 1].Translation())
{ {
// collect a sub-menu for like-named items // collect a sub-menu for like-named items
const auto name = names[i]; const auto name = names[i];
const auto translation = name.Translation(); const auto translation = name.Translation();
BaseItemPtrs temp2; BaseItemPtrs temp2;
// compare full translations not msgids!
while (i < namesCnt && names[i].Translation() == translation) while (i < namesCnt && names[i].Translation() == translation)
{ {
const PluginDescriptor *plug = const PluginDescriptor *plug =

View File

@ -189,7 +189,7 @@ ODManager::~ODManager()
} }
mTerminatedMutex.Unlock(); mTerminatedMutex.Unlock();
//get rid of all the queues. The queues get rid of the tasks, so we don't worry abut them. //get rid of all the queues. The queues get rid of the tasks, so we don't worry about them.
//nothing else should be running on OD related threads at this point, so we don't lock. //nothing else should be running on OD related threads at this point, so we don't lock.
mQueues.clear(); mQueues.clear();
} }

View File

@ -84,7 +84,7 @@ class ODManager final
void ReplaceWaveTrack(Track *oldTrack, void ReplaceWaveTrack(Track *oldTrack,
const std::shared_ptr< Track > &newTrack); const std::shared_ptr< Track > &newTrack);
///Adds a task to the running queue. Threas-safe. ///Adds a task to the running queue. Thread-safe.
void AddTask(ODTask* task); void AddTask(ODTask* task);
void RemoveTaskIfInQueue(ODTask* task); void RemoveTaskIfInQueue(ODTask* task);

View File

@ -65,7 +65,7 @@ void ODTask::TerminateAndBlock()
} }
///Do a modular part of the task. For example, if the task is to load the entire file, load one BlockFile. ///Do a modular part of the task. For example, if the task is to load the entire file, load one BlockFile.
///Relies on DoSomeInternal(), which is the subclasses must implement. ///Relies on DoSomeInternal(), which the subclasses must implement.
///@param amountWork the percent amount of the total job to do. 1.0 represents the entire job. the default of 0.0 ///@param amountWork the percent amount of the total job to do. 1.0 represents the entire job. the default of 0.0
/// will do the smallest unit of work possible /// will do the smallest unit of work possible
void ODTask::DoSome(float amountWork) void ODTask::DoSome(float amountWork)

View File

@ -131,7 +131,7 @@ class ODTask /* not final */
virtual void CalculatePercentComplete() = 0; virtual void CalculatePercentComplete() = 0;
///pure virtual function that does some part of the task this object represents. ///pure virtual function that does some part of the task this object represents.
///this function is meant to be called repeatedly until the IsComplete is true. ///this function is meant to be called repeatedly until IsComplete is true.
///Does the smallest unit of work for this task. ///Does the smallest unit of work for this task.
virtual void DoSomeInternal() = 0; virtual void DoSomeInternal() = 0;

View File

@ -412,7 +412,7 @@ bool KeyConfigPrefs::ContainsIllegalDups(
// 1. the shortcut for the operation isn't defined already // 1. the shortcut for the operation isn't defined already
// 2. the added shortcut doesn't create illegal shortcut duplicate // 2. the added shortcut doesn't create illegal shortcut duplicate
// The names of operations for which the second condition was violated // The names of operations for which the second condition was violated
// are returned in a single wxString // are returned in a single error message
TranslatableString KeyConfigPrefs::MergeWithExistingKeys( TranslatableString KeyConfigPrefs::MergeWithExistingKeys(
const std::vector<NormalizedKeyString> &toAdd) const std::vector<NormalizedKeyString> &toAdd)
{ {

View File

@ -122,7 +122,7 @@ class AUDACITY_DLL_API Ruler {
// useful the definition of a label array and label step by // useful the definition of a label array and label step by
// the user. // the user.
void SetCustomMode(bool value); void SetCustomMode(bool value);
// If this is the case, you should provide a wxString array of labels, start // If this is the case, you should provide an array of labels, start
// label position, and labels step. The range eventually specified will be // label position, and labels step. The range eventually specified will be
// ignored. // ignored.
void SetCustomMajorLabels( void SetCustomMajorLabels(