forked from I2P_Developers/i2p.i2p
Console: Custom icons for non-webapp plugins, from cacapo (ticket #1550)
This commit is contained in:
@@ -22,6 +22,7 @@ import net.i2p.I2PAppContext;
|
||||
import net.i2p.app.ClientApp;
|
||||
import net.i2p.app.ClientAppState;
|
||||
import net.i2p.data.DataHelper;
|
||||
import net.i2p.data.Base64;
|
||||
import net.i2p.router.RouterContext;
|
||||
import net.i2p.router.RouterVersion;
|
||||
import net.i2p.router.startup.ClientAppConfig;
|
||||
@@ -353,6 +354,20 @@ public class PluginStarter implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//handle console icons for plugins without web-resources through prop icon-code
|
||||
String fullprop = props.getProperty("icon-code");
|
||||
if(fullprop != null && fullprop.length() > 1){
|
||||
byte[] decoded = Base64.decode(fullprop);
|
||||
if(decoded != null) {
|
||||
NavHelper.setBinary(appName, decoded);
|
||||
iconfile = "/Plugins/pluginicon?plugin=" + appName;
|
||||
} else {
|
||||
iconfile = "/themes/console/images/plugin.png";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// load and start things in clients.config
|
||||
File clientConfig = new File(pluginDir, "clients.config");
|
||||
if (clientConfig.exists()) {
|
||||
|
||||
Reference in New Issue
Block a user