|
|
@ -54,12 +54,12 @@ public final class yacyTray {
|
|
|
|
public static void init(final plasmaSwitchboard par_sb) {
|
|
|
|
public static void init(final plasmaSwitchboard par_sb) {
|
|
|
|
sb = par_sb;
|
|
|
|
sb = par_sb;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
final boolean trayIcon = sb.getConfig("trayIcon", "false").equals("true");
|
|
|
|
final boolean trayIcon = sb.getConfigBool("trayIcon", false);
|
|
|
|
if (trayIcon) {
|
|
|
|
if (trayIcon) {
|
|
|
|
System.setProperty("java.awt.headless", "false");
|
|
|
|
System.setProperty("java.awt.headless", "false");
|
|
|
|
|
|
|
|
|
|
|
|
if(nativeTrayIcon.isSupported()) {
|
|
|
|
if(nativeTrayIcon.isSupported()) {
|
|
|
|
final String iconpath = sb.getRootPath().toString() + "/addon/YaCy_TrayIcon.gif".replace("/", File.separator);
|
|
|
|
final String iconpath = sb.getRootPath().toString() + "/addon/YaCy_TrayIcon.png".replace("/", File.separator);
|
|
|
|
ActionListener al = new ActionListener() {
|
|
|
|
ActionListener al = new ActionListener() {
|
|
|
|
public void actionPerformed(final ActionEvent e) {
|
|
|
|
public void actionPerformed(final ActionEvent e) {
|
|
|
|
trayClickAction();
|
|
|
|
trayClickAction();
|
|
|
|