From ed399a07d85c7929b47b32751d30fcd25eb6bc20 Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Sun, 24 Oct 2010 16:16:46 +0000 Subject: [PATCH] systray short doc and main() --- apps/systray/doc/README.txt | 21 +++++++++++++++++++ .../src/net/i2p/apps/systray/SysTray.java | 16 ++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 apps/systray/doc/README.txt diff --git a/apps/systray/doc/README.txt b/apps/systray/doc/README.txt new file mode 100644 index 0000000000..3123d533fc --- /dev/null +++ b/apps/systray/doc/README.txt @@ -0,0 +1,21 @@ +Bundled in ../java/lib/ are the binaries for systray4j version 2.4.1 2004-03-28, +which is still the latest. + +Files are from systray4j-2.4.1-win32.zip. + +SHA1Sums: + 28acaea97816f53d188d01fd88b72e670e67286b systray4j-2.4.1-win32.zip + a7f5e02c3652f3f1a72559e54ee69226b8b97859 systray4j.dll + 947bd91c483494256cf48ad87c211e8701b4f85b systray4j.jar + + +systray4j is GPLv2, see LICENSE.systray4j.txt. +I2P systray code in ../java/src is public domain. + +SysTray is really obsolete. It supports Windows and kde3 only. +We only instantiate it on Windows. + +The java.awt.SystemTray classes added in Java 6 +(and used by apps/desktopgui) are the way to go now. + +We could either rewrite this to use SystemTray, or switch to desktopgui. diff --git a/apps/systray/java/src/net/i2p/apps/systray/SysTray.java b/apps/systray/java/src/net/i2p/apps/systray/SysTray.java index f7e6499421..23a11ef231 100644 --- a/apps/systray/java/src/net/i2p/apps/systray/SysTray.java +++ b/apps/systray/java/src/net/i2p/apps/systray/SysTray.java @@ -184,4 +184,20 @@ public class SysTray implements SysTrayMenuListener { _sysTrayMenu.addItem(_itemOpenConsole); refreshDisplay(); } + + /** + * Starts SysTray, even on linux (but requires kde3 libsystray4j.so to do anything) + * @since 0.8.1 + */ + public static void main(String args[]) { + System.err.println("SysTray4j version " + SysTrayMenu.VERSION); + System.err.println("Hit ^C to exit"); + new SysTray(); + Thread t = Thread.currentThread(); + synchronized(t) { + try { + t.wait(); + } catch (InterruptedException ie) {} + } + } } -- GitLab