--- org/gudy/azureus2/pluginsimpl/update/PluginUpdatePlugin.java.orig 2006-02-09 23:32:49.000000000 -0500
+++ org/gudy/azureus2/pluginsimpl/update/PluginUpdatePlugin.java 2006-02-09 23:33:49.000000000 -0500
@@ -130,20 +130,6 @@
config.addBooleanParameter2( "enable.update", "Plugin.pluginupdate.enablecheck", true );
- UpdateManager update_manager = plugin_interface.getUpdateManager();
-
- update_manager.addListener(
- new UpdateManagerListener()
- {
- public void
- checkInstanceCreated(
- UpdateCheckInstance inst )
- {
- SFPluginDetailsLoaderFactory.getSingleton().reset();
- }
-
- });
-
final PluginManager plugin_manager = plugin_interface.getPluginManager();
PluginInterface[] plugins = plugin_manager.getPlugins();
@@ -169,134 +155,6 @@
final int f_non_mandatory_count = non_mandatory_count;
final int f_mandatory_count = mandatory_count;
-
- update_manager.registerUpdatableComponent(
- new UpdatableComponent()
- {
- public String
- getName()
- {
- return( "Non-mandatory plugins" );
- }
-
- public int
- getMaximumCheckTime()
- {
- return( f_non_mandatory_count * (( RD_SIZE_RETRIES * RD_SIZE_TIMEOUT )/1000));
- }
-
- public void
- checkForUpdate(
- UpdateChecker checker )
- {
- if ( checkForUpdateSupport( checker, null, false ) == 0 ){
-
- String[] rps = VersionCheckClient.getSingleton(). getRecommendedPlugins();
-
- boolean found_one = false;
-
- for (int i=0;i<rps.length;i++){
-
- String rp_id = rps[i];
-
- if ( plugin_manager.getPluginInterfaceByID( rp_id ) != null ){
-
- // already installed
-
- continue;
- }
-
- final String config_key = "recommended.processed." + rp_id;
-
- if ( !plugin_config.getPluginBooleanParameter( config_key, false )){
-
- try{
- final PluginInstaller installer = plugin_interface.getPluginManager().getPluginInstaller();
-
- StandardPlugin[] sps = installer.getStandardPlugins();
-
- for (int j=0;j<sps.length;j++){
-
- final StandardPlugin sp = sps[j];
-
- if ( sp.getId().equals( rp_id )){
-
- found_one = true;
-
- checker.getCheckInstance().addListener(
- new UpdateCheckInstanceListener()
- {
- public void
- cancelled(
- UpdateCheckInstance instance )
- {
- }
-
- public void
- complete(
- UpdateCheckInstance instance )
- {
- if ( instance.getUpdates().length == 0 ){
-
- installRecommendedPlugin( installer, sp );
-
- plugin_config.setPluginParameter( config_key, true );
- }
- }
- });
-
- break;
- }
- }
-
- }catch( Throwable e ){
-
- }
- }
-
- if ( found_one ){
-
- break;
- }
- }
- }
- }
-
- }, false );
-
- update_manager.registerUpdatableComponent(
- new UpdatableComponent()
- {
- public String
- getName()
- {
- return( "Mandatory plugins" );
- }
-
- public int
- getMaximumCheckTime()
- {
- return( f_mandatory_count * (( RD_SIZE_RETRIES * RD_SIZE_TIMEOUT )/1000));
- }
-
- public void
- checkForUpdate(
- UpdateChecker checker )
- {
- checkForUpdateSupport( checker, null, true );
- }
- }, true );
-
- update_manager.addListener(
- new UpdateManagerListener()
- {
- public void
- checkInstanceCreated(
- UpdateCheckInstance instance )
- {
- log.log( LoggerChannel.LT_INFORMATION, "**** Update check starts ****" );
- }
- });
}
protected void