1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-27 07:43:50 +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,13 +62,17 @@ void ModulePrefs::GetAllModuleStatuses(){
while ( bCont ) { while ( bCont ) {
int iStatus; int iStatus;
gPrefs->Read( str, &iStatus, kModuleDisabled ); gPrefs->Read( str, &iStatus, kModuleDisabled );
if( iStatus > kModuleNew ){ wxString fname;
iStatus = kModuleNew; gPrefs->Read( wxString( wxT("/Module/path:") ) + str, &fname, wxEmptyString );
gPrefs->Write( str, iStatus ); if( fname != wxEmptyString && wxFileExists( fname ) ){
if( iStatus > kModuleNew ){
iStatus = kModuleNew;
gPrefs->Write( str, iStatus );
}
//wxLogDebug( wxT("Entry: %s Value: %i"), str.c_str(), iStatus );
mModules.Add( str );
mStatuses.Add( iStatus );
} }
//wxLogDebug( wxT("Entry: %s Value: %i"), str.c_str(), iStatus );
mModules.Add( str );
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();
} }