Revert "Call OnLibraryAdded for all available librarys (bug 5925, pull request #4)"
This reverts commit ac11eb8910.
			
			
This commit is contained in:
		
							parent
							
								
									ac11eb8910
								
							
						
					
					
						commit
						cfde247ef7
					
				| @ -427,24 +427,6 @@ APLRes CPlugin::Call_AskPluginLoad(char *error, size_t maxlength) | |||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPlugin::Call_OnLibraryAdded(const char *lib) |  | ||||||
| { |  | ||||||
| 	if (m_status > Plugin_Paused) |  | ||||||
| 	{ |  | ||||||
| 		return; |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| 	cell_t result; |  | ||||||
| 	IPluginFunction *pFunction = m_pRuntime->GetFunctionByName("OnLibraryAdded"); |  | ||||||
| 	if (!pFunction) |  | ||||||
| 	{ |  | ||||||
| 		return; |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| 	pFunction->PushString(lib); |  | ||||||
| 	pFunction->Execute(&result); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| void *CPlugin::GetPluginStructure() | void *CPlugin::GetPluginStructure() | ||||||
| { | { | ||||||
| 	return NULL; | 	return NULL; | ||||||
| @ -1423,20 +1405,6 @@ bool CPluginManager::RunSecondPass(CPlugin *pPlugin, char *error, size_t maxleng | |||||||
| 	/* :TODO: optimize? does this even matter? */ | 	/* :TODO: optimize? does this even matter? */ | ||||||
| 	pPlugin->GetPhrases()->AddPhraseFile("core.phrases"); | 	pPlugin->GetPhrases()->AddPhraseFile("core.phrases"); | ||||||
| 
 | 
 | ||||||
| 	/* Go through all other already loaded plugins and tell this plugin, that their libraries are loaded */ |  | ||||||
| 	for (List<CPlugin *>::iterator pl_iter = m_plugins.begin(); pl_iter != m_plugins.end(); pl_iter++) |  | ||||||
| 	{ |  | ||||||
| 		CPlugin *pl = (*pl_iter); |  | ||||||
| 		/* Don't call our own libraries again and only care for already loaded plugins */ |  | ||||||
| 		if (pl == pPlugin || pl->GetStatus() != Plugin_Running) |  | ||||||
| 			continue; |  | ||||||
| 
 |  | ||||||
| 		for (s_iter=pl->m_Libraries.begin(); s_iter!=pl->m_Libraries.end(); s_iter++) |  | ||||||
| 		{ |  | ||||||
| 			pPlugin->Call_OnLibraryAdded((*s_iter).c_str()); |  | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| 	return true; | 	return true; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -204,11 +204,6 @@ public: | |||||||
| 	 */ | 	 */ | ||||||
| 	void Call_OnAllPluginsLoaded(); | 	void Call_OnAllPluginsLoaded(); | ||||||
| 
 | 
 | ||||||
| 	/**
 |  | ||||||
| 	 * Calls the OnLibraryAdded function. |  | ||||||
| 	 */ |  | ||||||
| 	void Call_OnLibraryAdded(const char *lib); |  | ||||||
| 
 |  | ||||||
| 	/**
 | 	/**
 | ||||||
| 	 * Returns true if a plugin is usable. | 	 * Returns true if a plugin is usable. | ||||||
| 	 */ | 	 */ | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user