1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-27 15:53:49 +01:00

Fix for bug #965

Not the best fix in the world, but once "modules" are brought into
the plugin handling, this'll be revised.
This commit is contained in:
Leland Lucius
2015-05-24 07:11:21 -05:00
parent b307ca01d2
commit 6ba5eb0a84

View File

@@ -62,6 +62,9 @@ void ModulePrefs::GetAllModuleStatuses(){
while ( bCont ) { while ( bCont ) {
int iStatus; int iStatus;
gPrefs->Read( str, &iStatus, kModuleDisabled ); gPrefs->Read( str, &iStatus, kModuleDisabled );
wxString fname;
gPrefs->Read( wxString( wxT("/Module/path:") ) + str, &fname, wxEmptyString );
if( fname != wxEmptyString && wxFileExists( fname ) ){
if( iStatus > kModuleNew ){ if( iStatus > kModuleNew ){
iStatus = kModuleNew; iStatus = kModuleNew;
gPrefs->Write( str, iStatus ); gPrefs->Write( str, iStatus );
@@ -69,6 +72,7 @@ void ModulePrefs::GetAllModuleStatuses(){
//wxLogDebug( wxT("Entry: %s Value: %i"), str.c_str(), iStatus ); //wxLogDebug( wxT("Entry: %s Value: %i"), str.c_str(), iStatus );
mModules.Add( str ); mModules.Add( str );
mStatuses.Add( iStatus ); mStatuses.Add( iStatus );
}
bCont = gPrefs->GetNextEntry(str, dummy); bCont = gPrefs->GetNextEntry(str, dummy);
} }
gPrefs->SetPath( wxT("") ); gPrefs->SetPath( wxT("") );
@@ -150,6 +154,8 @@ void ModulePrefs::SetModuleStatus( wxString fname, int iStatus ){
wxString ShortName = wxFileName( fname ).GetName(); wxString ShortName = wxFileName( fname ).GetName();
wxString PrefName = wxString( wxT("/Module/") ) + ShortName.Lower(); wxString PrefName = wxString( wxT("/Module/") ) + ShortName.Lower();
gPrefs->Write( PrefName, iStatus ); gPrefs->Write( PrefName, iStatus );
PrefName = wxString( wxT("/Module/path:") ) + ShortName.Lower();
gPrefs->Write( PrefName, fname );
gPrefs->Flush(); gPrefs->Flush();
} }