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 &lastMessage = mLastStatusMessages[ field - 1 ];
// compare full translations not msgids!
if ( msg.Translation() != lastMessage.Translation() ) {
lastMessage = msg;
wxCommandEvent evt{ EVT_PROJECT_STATUS_UPDATE };

View File

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

View File

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

View File

@ -189,7 +189,7 @@ ODManager::~ODManager()
}
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.
mQueues.clear();
}

View File

@ -84,7 +84,7 @@ class ODManager final
void ReplaceWaveTrack(Track *oldTrack,
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 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.
///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
/// will do the smallest unit of work possible
void ODTask::DoSome(float amountWork)

View File

@ -131,7 +131,7 @@ class ODTask /* not final */
virtual void CalculatePercentComplete() = 0;
///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.
virtual void DoSomeInternal() = 0;

View File

@ -412,7 +412,7 @@ bool KeyConfigPrefs::ContainsIllegalDups(
// 1. the shortcut for the operation isn't defined already
// 2. the added shortcut doesn't create illegal shortcut duplicate
// 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(
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
// the user.
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
// ignored.
void SetCustomMajorLabels(