| 129 | } |
| 130 | |
| 131 | bool AudacityCommand::LoadSettingsFromString(const wxString & parms) |
| 132 | { |
| 133 | wxString preset = parms; |
| 134 | |
| 135 | CommandParameters eap(parms); |
| 136 | ShuttleSetAutomation S; |
| 137 | |
| 138 | S.SetForWriting( &eap ); |
| 139 | bool bResult = VisitSettings( S ); |
| 140 | wxASSERT_MSG( bResult, "You did not define DefineParameters() for this command" ); |
| 141 | static_cast<void>(bResult); // fix unused variable warning in release mode |
| 142 | if (!S.bOK) |
| 143 | { |
| 144 | AudacityCommand::MessageBox( |
| 145 | XO( |
| 146 | "%s: Could not load settings below. Default settings will be used.\n\n%s") |
| 147 | .Format( GetName(), preset ) ); |
| 148 | |
| 149 | // fror now always succeed, so that we can prompt the user. |
| 150 | return true; |
| 151 | } |
| 152 | |
| 153 | return TransferDataToWindow(); |
| 154 | } |
| 155 | |
| 156 | bool AudacityCommand::DoAudacityCommand( |
| 157 | const CommandContext& context, bool shouldPrompt /* = true */) |
no outgoing calls
no test coverage detected