From: Paul G. <pa...@us...> - 2004-11-30 21:57:08
|
Update of /cvsroot/azureus/azureus2/org/gudy/azureus2/pluginsimpl/local/installer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14811/org/gudy/azureus2/pluginsimpl/local/installer Modified Files: PluginInstallerImpl.java Log Message: fix update name Index: PluginInstallerImpl.java =================================================================== RCS file: /cvsroot/azureus/azureus2/org/gudy/azureus2/pluginsimpl/local/installer/PluginInstallerImpl.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- PluginInstallerImpl.java 30 Nov 2004 15:15:23 -0000 1.9 +++ PluginInstallerImpl.java 30 Nov 2004 21:56:58 -0000 1.10 @@ -439,9 +439,36 @@ } }); + // the plugin may have > 1 plugin interfaces, make the name up appropriately + + String update_name = ""; + + PluginInterface[] ifs = manager.getPluginInterfaces(); + + Arrays.sort( + ifs, + new Comparator() + { + public int + compare( + Object o1, + Object o2) + { + return(((PluginInterface)o1).getPluginName().compareTo(((PluginInterface)o2).getPluginName())); + } + }); + + for (int i=0;i<ifs.length;i++){ + + if ( ifs[i].getPluginID().equals(pi.getPluginID())){ + + update_name += (update_name.length()==0?"":",") + ifs[i].getPluginName(); + } + } + checker.addUpdate( - pi.getPluginName(), - new String[]{ "Uninstall" }, + update_name, + new String[]{ "Uninstall: " + plugin_dir}, pi.getPluginVersion(), rd, pi.isUnloadable()?Update.RESTART_REQUIRED_NO:Update.RESTART_REQUIRED_YES ); |