mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-31 16:09:28 +02:00
Modules renamed as 'mods' for user.
We previously had both 'modules' and 'plug-ins' and the files are called things like mod-script-pipe.dll. Three different things. From a user's point of view it is easier to think of them as modifications to the basic program, like mods in Minecraft. Hence the name change. The search path now has 'mods' in it rather than 'modules'. Didn't see a need to rename the 'Modules' source code as programmers know what modules are and the mods are modules too.
This commit is contained in:
parent
7bf8f2021e
commit
00d8875fd7
@ -108,8 +108,8 @@ bool Module::Load()
|
||||
tVersionFn versionFn = (tVersionFn)(mLib->GetSymbol(wxT(versionFnName)));
|
||||
if (versionFn == NULL){
|
||||
wxString ShortName = wxFileName( mName ).GetName();
|
||||
wxMessageBox(wxString::Format(_("The module %s does not provide a version string.\nIt will not be loaded."), ShortName.c_str()), _("Module Unsuitable"));
|
||||
wxLogMessage(wxString::Format(_("The module %s does not provide a version string. It will not be loaded."), mName.c_str()));
|
||||
wxMessageBox(wxString::Format(_("The mod %s does not provide a version string.\nIt will not be loaded."), ShortName.c_str()), _("Module Unsuitable"));
|
||||
wxLogMessage(wxString::Format(_("The mod %s does not provide a version string. It will not be loaded."), mName.c_str()));
|
||||
mLib->Unload();
|
||||
return false;
|
||||
}
|
||||
@ -117,8 +117,8 @@ bool Module::Load()
|
||||
wxString moduleVersion = versionFn();
|
||||
if( !moduleVersion.IsSameAs(AUDACITY_VERSION_STRING)) {
|
||||
wxString ShortName = wxFileName( mName ).GetName();
|
||||
wxMessageBox(wxString::Format(_("The module %s is matched with Audacity version %s.\n\nIt will not be loaded."), ShortName.c_str(), moduleVersion.c_str()), _("Module Unsuitable"));
|
||||
wxLogMessage(wxString::Format(_("The module %s is matched with Audacity version %s. It will not be loaded."), mName.c_str(), moduleVersion.c_str()));
|
||||
wxMessageBox(wxString::Format(_("The mod %s is matched with Audacity version %s.\n\nIt will not be loaded."), ShortName.c_str(), moduleVersion.c_str()), _("Module Unsuitable"));
|
||||
wxLogMessage(wxString::Format(_("The mod %s is matched with Audacity version %s. It will not be loaded."), mName.c_str(), moduleVersion.c_str()));
|
||||
mLib->Unload();
|
||||
return false;
|
||||
}
|
||||
@ -201,7 +201,7 @@ void ModuleManager::Initialize(CommandHandler &cmdHandler)
|
||||
|
||||
for (i = 0; i < audacityPathList.GetCount(); i++) {
|
||||
wxString prefix = audacityPathList[i] + wxFILE_SEP_PATH;
|
||||
wxGetApp().AddUniquePathToPathList(prefix + wxT("modules"),
|
||||
wxGetApp().AddUniquePathToPathList(prefix + wxT("mods"),
|
||||
pathList);
|
||||
}
|
||||
|
||||
@ -241,11 +241,11 @@ void ModuleManager::Initialize(CommandHandler &cmdHandler)
|
||||
{
|
||||
wxString ShortName = wxFileName( files[i] ).GetName();
|
||||
wxString msg;
|
||||
msg.Printf(_("Module \"%s\" found."), ShortName.c_str());
|
||||
msg += _("\n\nOnly use modules from trusted sources");
|
||||
msg.Printf(_("Found \"%s\"."), ShortName.c_str());
|
||||
msg += _("\n\nOnly use mods from trusted sources");
|
||||
const wxChar *buttons[] = {_("Yes"), _("No"), NULL}; // could add a button here for 'yes and remember that', and put it into the cfg file. Needs more thought.
|
||||
int action;
|
||||
action = ShowMultiDialog(msg, _("Audacity Module Loader"), buttons, _("Try and load this module?"), false);
|
||||
action = ShowMultiDialog(msg, _("Audacity Mod Loader"), buttons, _("Try and load this mod"), false);
|
||||
#ifdef EXPERIMENTAL_MODULE_PREFS
|
||||
// If we're not prompting always, accept the answer permanantly
|
||||
if( iModuleStatus == kModuleNew ){
|
||||
|
@ -13,7 +13,9 @@
|
||||
*******************************************************************//**
|
||||
|
||||
\class ModulePrefs
|
||||
\brief A PrefsPanel to enable/disable certain modules.
|
||||
\brief A PrefsPanel to enable/disable certain mods. 'Mods' are
|
||||
modules that modify Audacity. They are plug-ins with names like
|
||||
mnod-script-pipe that add new features.
|
||||
|
||||
*//*******************************************************************/
|
||||
|
||||
@ -29,8 +31,9 @@
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/* i18n-hint: 'Mods' normally shouldn't be translated. 'Mods' modify the program.*/
|
||||
ModulePrefs::ModulePrefs(wxWindow * parent)
|
||||
: PrefsPanel(parent, _("Modules"))
|
||||
: PrefsPanel(parent, _("Mods"))
|
||||
{
|
||||
Populate();
|
||||
}
|
||||
@ -58,7 +61,7 @@ void ModulePrefs::GetAllModuleStatuses(){
|
||||
|
||||
// Iterate through all Modules listed in prefs.
|
||||
// Get their names and values.
|
||||
gPrefs->SetPath( wxT("Module/") );
|
||||
gPrefs->SetPath( wxT("Mod/") );
|
||||
bool bCont = gPrefs->GetFirstEntry(str, dummy);
|
||||
while ( bCont ) {
|
||||
int iStatus;
|
||||
@ -99,9 +102,9 @@ void ModulePrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
|
||||
S.StartStatic(_(""));
|
||||
{
|
||||
S.AddFixedText(_("These are experimental Modules. Enable them only if you've read the manual\nand know what you are doing.") );
|
||||
S.AddFixedText(wxString(wxT(" ")) + _("'Ask' means Audacity will ask if you want to load the plug-in each time it starts.") );
|
||||
S.AddFixedText(wxString(wxT(" ")) + _("'Failed' means Audacity thinks the plug-in is broken and won't run it.") );
|
||||
S.AddFixedText(_("These are experimental mods. Enable them only if you've read the manual\nand know what you are doing.") );
|
||||
S.AddFixedText(wxString(wxT(" ")) + _("'Ask' means Audacity will ask if you want to load the mod each time it starts.") );
|
||||
S.AddFixedText(wxString(wxT(" ")) + _("'Failed' means Audacity thinks the mod is broken and won't run it.") );
|
||||
S.AddFixedText(wxString(wxT(" ")) + _("'New' means no choice has been made yet.") );
|
||||
S.AddFixedText(_("Changes to these settings only take effect when Audacity starts up."));
|
||||
S.StartScroller();
|
||||
@ -114,7 +117,7 @@ void ModulePrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
}
|
||||
if( mModules.GetCount() < 1 )
|
||||
{
|
||||
S.AddFixedText( _("No Modules were found") );
|
||||
S.AddFixedText( _("No mods were found") );
|
||||
}
|
||||
S.EndScroller();
|
||||
}
|
||||
@ -138,7 +141,7 @@ int ModulePrefs::GetModuleStatus( wxString fname ){
|
||||
int iStatus = kModuleNew;
|
||||
|
||||
wxString ShortName = wxFileName( fname ).GetName();
|
||||
wxString PrefName = wxString( wxT("/Module/") ) + ShortName.Lower();
|
||||
wxString PrefName = wxString( wxT("/Mod/") ) + ShortName.Lower();
|
||||
|
||||
gPrefs->Read( PrefName, &iStatus, kModuleNew );
|
||||
// fix up a bad status.
|
||||
@ -149,7 +152,7 @@ int ModulePrefs::GetModuleStatus( wxString fname ){
|
||||
|
||||
void ModulePrefs::SetModuleStatus( wxString fname, int iStatus ){
|
||||
wxString ShortName = wxFileName( fname ).GetName();
|
||||
wxString PrefName = wxString( wxT("/Module/") ) + ShortName.Lower();
|
||||
wxString PrefName = wxString( wxT("/Mod/") ) + ShortName.Lower();
|
||||
gPrefs->Write( PrefName, iStatus );
|
||||
gPrefs->Flush();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user