mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-29 15:09:30 +02:00
White space changes
The Objective C++ syntax '[[' used in a couple of places (Mac only), breaks the parser in kdevelop. As suggested by Paul, a space between the brackets fixes the problem. Also removed some trailing spaces.
This commit is contained in:
parent
18646a2668
commit
5be7f7db0b
@ -148,7 +148,7 @@ public:
|
||||
[
|
||||
NSEvent addLocalMonitorForEventsMatchingMask:mask handler:^NSEvent *(NSEvent *event)
|
||||
{
|
||||
WXWidget widget = (WXWidget) [[event window] firstResponder];
|
||||
WXWidget widget = (WXWidget) [ [event window] firstResponder];
|
||||
if (widget)
|
||||
{
|
||||
wxWidgetCocoaImpl *impl = (wxWidgetCocoaImpl *)
|
||||
@ -339,7 +339,7 @@ private:
|
||||
#elif defined(__WXGTK__)
|
||||
|
||||
chars.Append((wxChar) gdk_keyval_to_unicode(event.GetRawKeyCode()));
|
||||
|
||||
|
||||
#elif defined(__WXMAC__)
|
||||
|
||||
if (!mEvent) {
|
||||
@ -377,7 +377,7 @@ private:
|
||||
{
|
||||
return chars;
|
||||
}
|
||||
|
||||
|
||||
const UniCharCount maxStringLength = 255;
|
||||
UniCharCount actualStringLength = 0;
|
||||
UniChar unicodeString[maxStringLength];
|
||||
@ -387,7 +387,7 @@ private:
|
||||
(nsflags & NSControlKeyMask ? controlKey : 0) |
|
||||
(nsflags & NSAlternateKeyMask ? optionKey : 0) |
|
||||
(nsflags & NSCommandKeyMask ? cmdKey : 0);
|
||||
|
||||
|
||||
OSStatus status = UCKeyTranslate(keyboardLayout,
|
||||
[mEvent keyCode],
|
||||
kUCKeyActionDown,
|
||||
@ -398,13 +398,13 @@ private:
|
||||
maxStringLength,
|
||||
&actualStringLength,
|
||||
unicodeString);
|
||||
|
||||
|
||||
if (status != noErr)
|
||||
{
|
||||
return chars;
|
||||
}
|
||||
|
||||
chars = [[NSString stringWithCharacters:unicodeString
|
||||
|
||||
chars = [ [NSString stringWithCharacters:unicodeString
|
||||
length:(NSInteger)actualStringLength] UTF8String];
|
||||
|
||||
#endif
|
||||
@ -414,7 +414,7 @@ private:
|
||||
|
||||
private:
|
||||
|
||||
#if defined(__WXMAC__)
|
||||
#if defined(__WXMAC__)
|
||||
id mHandler;
|
||||
NSEvent *mEvent {};
|
||||
UInt32 mDeadKeyState;
|
||||
@ -511,7 +511,7 @@ const std::vector<NormalizedKeyString> &CommandManager::ExcludedList()
|
||||
return list;
|
||||
}
|
||||
|
||||
// CommandManager needs to know which defaults are standard and which are in the
|
||||
// CommandManager needs to know which defaults are standard and which are in the
|
||||
// full (max) list.
|
||||
void CommandManager::SetMaxList()
|
||||
{
|
||||
@ -520,7 +520,7 @@ void CommandManager::SetMaxList()
|
||||
// KeyConfigPrefs::OnImportDefaults(wxCommandEvent & event)
|
||||
|
||||
// TODO: At a later date get rid of the maxList entirely and
|
||||
// instead use flags in the menu entrys to indicate whether the default
|
||||
// instead use flags in the menu entrys to indicate whether the default
|
||||
// shortcut is standard or full.
|
||||
|
||||
mMaxListOnly.clear();
|
||||
@ -598,11 +598,11 @@ wxMenuBar * CommandManager::CurrentMenuBar() const
|
||||
return mMenuBarList.back().menubar;
|
||||
}
|
||||
|
||||
///
|
||||
///
|
||||
/// Swap the last two menu bars in the list,
|
||||
/// to make the previous menu bar 'current' again.
|
||||
/// Typically used to switch back and forth
|
||||
/// between adding to a hidden menu bar and
|
||||
/// Typically used to switch back and forth
|
||||
/// between adding to a hidden menu bar and
|
||||
/// adding to one that is visible,
|
||||
///
|
||||
void CommandManager::SwapMenuBars()
|
||||
@ -825,7 +825,7 @@ void CommandManager::AddItem(const wxChar *name,
|
||||
CommandFunctorPointer callback,
|
||||
CommandFlag flags,
|
||||
CommandMask mask,
|
||||
bool bIsEffect,
|
||||
bool bIsEffect,
|
||||
const CommandParameter ¶meter)
|
||||
{
|
||||
AddItem(name, label, hasDialog, finder, callback, wxT(""), flags, mask, -1, bIsEffect, parameter);
|
||||
@ -840,19 +840,19 @@ void CommandManager::AddItem(const wxChar *name,
|
||||
CommandFlag flags,
|
||||
CommandMask mask,
|
||||
int checkmark,
|
||||
bool bIsEffect,
|
||||
bool bIsEffect,
|
||||
const CommandParameter ¶meter)
|
||||
{
|
||||
wxString cookedParameter;
|
||||
if( parameter == "" )
|
||||
cookedParameter = name;
|
||||
else
|
||||
else
|
||||
cookedParameter = parameter;
|
||||
CommandListEntry *entry =
|
||||
NewIdentifier(name,
|
||||
label_in,
|
||||
mLongNameForItem,
|
||||
hasDialog,
|
||||
NewIdentifier(name,
|
||||
label_in,
|
||||
mLongNameForItem,
|
||||
hasDialog,
|
||||
accel, CurrentMenu(), finder, callback,
|
||||
{}, 0, 0, bIsEffect, cookedParameter);
|
||||
mLongNameForItem = "";
|
||||
@ -1159,7 +1159,7 @@ wxString CommandManager::GetLabel(const CommandListEntry *entry) const
|
||||
// The problem is that as soon as we show accelerators in the menu, the menu might
|
||||
// catch them in normal wxWidgets processing, rather than passing the key presses on
|
||||
// to the controls that had the focus. We would like all the menu accelerators to be
|
||||
// disabled, in fact.
|
||||
// disabled, in fact.
|
||||
wxString CommandManager::GetLabelWithDisabledAccel(const CommandListEntry *entry) const
|
||||
{
|
||||
wxString label = entry->label;
|
||||
@ -1389,7 +1389,7 @@ void CommandManager::TellUserWhyDisallowed( const wxString & Name, CommandFlag f
|
||||
ShowErrorDialog(
|
||||
NULL,
|
||||
title,
|
||||
reason,
|
||||
reason,
|
||||
helpPage);
|
||||
}
|
||||
|
||||
@ -1500,9 +1500,9 @@ bool CommandManager::FilterKeyEvent(AudacityProject *project, const wxKeyEvent &
|
||||
bIntercept = pWnd && ( dynamic_cast<LyricsPanel*>(pWnd) == NULL );
|
||||
}
|
||||
//wxLogDebug("Focus: %p TrackPanel: %p", pWnd, pTrackPanel );
|
||||
// We allow the keystrokes below to be handled by wxWidgets controls IF we are
|
||||
// We allow the keystrokes below to be handled by wxWidgets controls IF we are
|
||||
// in some sub window rather than in the TrackPanel itself.
|
||||
// Otherwise they will go to our command handler and if it handles them
|
||||
// Otherwise they will go to our command handler and if it handles them
|
||||
// they will NOT be available to wxWidgets.
|
||||
if( bIntercept ){
|
||||
switch( evt.GetKeyCode() ){
|
||||
@ -1578,7 +1578,7 @@ bool CommandManager::HandleCommandEntry(const CommandListEntry * entry,
|
||||
NiceName.Replace("&", "");// remove &
|
||||
NiceName.Replace(".","");// remove ...
|
||||
// NB: The call may have the side effect of changing flags.
|
||||
bool allowed = proj->ReportIfActionNotAllowed(
|
||||
bool allowed = proj->ReportIfActionNotAllowed(
|
||||
NiceName, flags, entry->flags, combinedMask );
|
||||
// If the function was disallowed, it STILL should count as having been
|
||||
// handled (by doing nothing or by telling the user of the problem).
|
||||
@ -1724,7 +1724,7 @@ void CommandManager::GetAllCommandLabels(wxArrayString &names,
|
||||
for(const auto &entry : mCommandList) {
|
||||
// This is fetching commands from the menus, for use as batch commands.
|
||||
// Until we have properly merged EffectManager and CommandManager
|
||||
// we explicitly exclude effects, as they are already handled by the
|
||||
// we explicitly exclude effects, as they are already handled by the
|
||||
// effects Manager.
|
||||
if ( entry->isEffect )
|
||||
continue;
|
||||
|
@ -2841,7 +2841,7 @@ EffectUIHost::EffectUIHost(wxWindow *parent,
|
||||
{
|
||||
#if defined(__WXMAC__)
|
||||
// Make sure the effect window actually floats above the main window
|
||||
[[((NSView *)GetHandle()) window] setLevel:NSFloatingWindowLevel];
|
||||
[ [((NSView *)GetHandle()) window] setLevel:NSFloatingWindowLevel];
|
||||
#endif
|
||||
|
||||
SetName( effect->GetTranslatedName() );
|
||||
@ -2874,7 +2874,7 @@ EffectUIHost::EffectUIHost(wxWindow *parent,
|
||||
{
|
||||
#if defined(__WXMAC__)
|
||||
// Make sure the effect window actually floats above the main window
|
||||
[[((NSView *)GetHandle()) window] setLevel:NSFloatingWindowLevel];
|
||||
[ [((NSView *)GetHandle()) window] setLevel:NSFloatingWindowLevel];
|
||||
#endif
|
||||
|
||||
//SetName( command->GetTranslatedName() );
|
||||
|
@ -141,7 +141,7 @@ NyquistEffect::NyquistEffect(const wxString &fName)
|
||||
mCopyright = XO("n/a");
|
||||
|
||||
// set clip/split handling when applying over clip boundary.
|
||||
mRestoreSplits = true; // Default: Restore split lines.
|
||||
mRestoreSplits = true; // Default: Restore split lines.
|
||||
mMergeClips = -1; // Default (auto): Merge if length remains unchanged.
|
||||
|
||||
mVersion = 4;
|
||||
@ -201,7 +201,7 @@ NyquistEffect::~NyquistEffect()
|
||||
wxString NyquistEffect::GetPath()
|
||||
{
|
||||
if (mIsPrompt)
|
||||
return (mType == EffectTypeTool) ?
|
||||
return (mType == EffectTypeTool) ?
|
||||
NYQUIST_TOOLS_PROMPT_ID :
|
||||
NYQUIST_EFFECTS_PROMPT_ID;
|
||||
|
||||
@ -211,7 +211,7 @@ wxString NyquistEffect::GetPath()
|
||||
IdentInterfaceSymbol NyquistEffect::GetSymbol()
|
||||
{
|
||||
if (mIsPrompt)
|
||||
return (mType == EffectTypeTool) ?
|
||||
return (mType == EffectTypeTool) ?
|
||||
XO("Nyquist Prompt") :
|
||||
XO("Nyquist Effects Prompt");
|
||||
|
||||
@ -556,7 +556,7 @@ bool NyquistEffect::Init()
|
||||
if (!bAllowSpectralEditing || ((mF0 < 0.0) && (mF1 < 0.0))) {
|
||||
Effect::MessageBox(_("To use 'Spectral effects', enable 'Spectral Selection'\n"
|
||||
"in the track Spectrogram settings and select the\n"
|
||||
"frequency range for the effect to act on."),
|
||||
"frequency range for the effect to act on."),
|
||||
wxOK | wxICON_EXCLAMATION | wxCENTRE, _("Error"));
|
||||
|
||||
return false;
|
||||
@ -569,7 +569,7 @@ bool NyquistEffect::Init()
|
||||
//we will need to modify this test.
|
||||
//Note that removing it stops the caching of parameter values,
|
||||
//(during this session).
|
||||
if (mFileName.GetModificationTime().IsLaterThan(mFileModified))
|
||||
if (mFileName.GetModificationTime().IsLaterThan(mFileModified))
|
||||
{
|
||||
SaveUserPreset(GetCurrentSettingsGroup());
|
||||
|
||||
@ -600,7 +600,7 @@ bool NyquistEffect::Process()
|
||||
// Check for reentrant Nyquist commands.
|
||||
// I'm choosing to mark skipped Nyquist commands as successful even though
|
||||
// they are skipped. The reason is that when Nyquist calls out to a chain,
|
||||
// and that chain contains Nyquist, it will be clearer if the chain completes
|
||||
// and that chain contains Nyquist, it will be clearer if the chain completes
|
||||
// skipping Nyquist, rather than doing nothing at all.
|
||||
if( mReentryCount > 0 )
|
||||
return true;
|
||||
@ -1042,7 +1042,7 @@ bool NyquistEffect::ProcessOne()
|
||||
// A tool may be using AUD-DO which will potentially invalidate *TRACK*
|
||||
// so tools do not get *TRACK*.
|
||||
if (GetType() == EffectTypeTool)
|
||||
cmd += wxT("(setf S 0.25)\n"); // No Track.
|
||||
cmd += wxT("(setf S 0.25)\n"); // No Track.
|
||||
else if (mVersion >= 4) {
|
||||
nyx_set_audio_name("*TRACK*");
|
||||
cmd += wxT("(setf S 0.25)\n");
|
||||
@ -1052,7 +1052,7 @@ bool NyquistEffect::ProcessOne()
|
||||
cmd += wxT("(setf *TRACK* '*unbound*)\n");
|
||||
}
|
||||
|
||||
if( (mVersion >= 4) && (GetType() != EffectTypeTool) ) {
|
||||
if( (mVersion >= 4) && (GetType() != EffectTypeTool) ) {
|
||||
cmd += mProps;
|
||||
cmd += mPerTrackProps;
|
||||
|
||||
@ -1206,7 +1206,7 @@ bool NyquistEffect::ProcessOne()
|
||||
// If in tool mode, then we don't do anything with the track and selection.
|
||||
if (GetType() == EffectTypeTool) {
|
||||
nyx_set_audio_params(44100, 0);
|
||||
}
|
||||
}
|
||||
else if (GetType() == EffectTypeGenerate) {
|
||||
nyx_set_audio_params(mCurTrack[0]->GetRate(), 0);
|
||||
}
|
||||
@ -1503,7 +1503,7 @@ bool NyquistEffect::ProcessOne()
|
||||
|
||||
if (mMergeClips < 0) {
|
||||
// Use sample counts to determine default behaviour - times will rarely be equal.
|
||||
bool bMergeClips = (out->TimeToLongSamples(mT0) + out->TimeToLongSamples(mOutputTime) ==
|
||||
bool bMergeClips = (out->TimeToLongSamples(mT0) + out->TimeToLongSamples(mOutputTime) ==
|
||||
out->TimeToLongSamples(mT1));
|
||||
mCurTrack[i]->ClearAndPaste(mT0, mT1, out, mRestoreSplits, bMergeClips);
|
||||
}
|
||||
@ -1659,7 +1659,7 @@ double NyquistEffect::GetCtrlValue(const wxString &s)
|
||||
/* For this to work correctly requires that the plug-in header is
|
||||
* parsed on each run so that the correct value for "half-srate" may
|
||||
* be determined.
|
||||
*
|
||||
*
|
||||
AudacityProject *project = GetActiveProject();
|
||||
double rate = INT_MAX;
|
||||
if (project && s.IsSameAs(wxT("half-srate"), false)) {
|
||||
@ -2002,8 +2002,8 @@ bool NyquistEffect::Parse(
|
||||
// valStr may or may not be a quoted string
|
||||
ctrl.valStr = len > 5 ? tokens[5] : wxT("");
|
||||
ctrl.val = GetCtrlValue(ctrl.valStr);
|
||||
if (ctrl.valStr.Len() > 0 &&
|
||||
(ctrl.valStr[0] == wxT('(') ||
|
||||
if (ctrl.valStr.Len() > 0 &&
|
||||
(ctrl.valStr[0] == wxT('(') ||
|
||||
ctrl.valStr[0] == wxT('"')))
|
||||
ctrl.valStr = UnQuote( ctrl.valStr );
|
||||
|
||||
@ -2138,8 +2138,8 @@ bool NyquistEffect::ParseProgram(wxInputStream & stream)
|
||||
mTrace = false;
|
||||
mDebugButton = true; // Debug button enabled by default.
|
||||
mEnablePreview = true; // Preview button enabled by default.
|
||||
|
||||
// Bug 1934.
|
||||
|
||||
// Bug 1934.
|
||||
// All Nyquist plug-ins should have a ';type' field, but if they don't we default to
|
||||
// being an Effect.
|
||||
mType = EffectTypeProcess;
|
||||
@ -2576,7 +2576,7 @@ void NyquistEffect::BuildPromptWindow(ShuttleGui & S)
|
||||
S.AddSpace(1, 1);
|
||||
|
||||
mVersionCheckBox = S.AddCheckBox(_("&Use legacy (version 3) syntax."),
|
||||
(mVersion == 3) ? wxT("true") : wxT("false"));
|
||||
(mVersion == 3) ? wxT("true") : wxT("false"));
|
||||
}
|
||||
S.EndMultiColumn();
|
||||
|
||||
@ -2910,7 +2910,7 @@ void NyquistEffect::OnFileButton(wxCommandEvent& evt)
|
||||
if (wildcards % 2 != 0 || !validWildcards || ctrl.lowStr.EndsWith("|"))
|
||||
{
|
||||
Effect::MessageBox(_("Invalid wildcard string in 'path' control.'\n"
|
||||
"Using empty string instead."),
|
||||
"Using empty string instead."),
|
||||
wxOK | wxICON_EXCLAMATION | wxCENTRE, _("Error"));
|
||||
ctrl.lowStr = "";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user