diff --git a/src/dorkbox/systemTray/nativeUI/_AppIndicatorNativeTray.java b/src/dorkbox/systemTray/nativeUI/_AppIndicatorNativeTray.java index 85785cb..192609c 100644 --- a/src/dorkbox/systemTray/nativeUI/_AppIndicatorNativeTray.java +++ b/src/dorkbox/systemTray/nativeUI/_AppIndicatorNativeTray.java @@ -76,7 +76,7 @@ import dorkbox.systemTray.util.ImageResizeUtil; * http://bazaar.launchpad.net/~ubuntu-desktop/ido/gtk3/files */ @SuppressWarnings("Duplicates") -public +public final class _AppIndicatorNativeTray extends Tray implements NativeUI { private volatile AppIndicatorInstanceStruct appIndicator; private boolean isActive = false; @@ -239,7 +239,7 @@ class _AppIndicatorNativeTray extends Tray implements NativeUI { } @Override - public final + public boolean hasImage() { return imageFile != null; } diff --git a/src/dorkbox/systemTray/nativeUI/_AwtTray.java b/src/dorkbox/systemTray/nativeUI/_AwtTray.java index 65dd19d..582f2ed 100644 --- a/src/dorkbox/systemTray/nativeUI/_AwtTray.java +++ b/src/dorkbox/systemTray/nativeUI/_AwtTray.java @@ -41,7 +41,7 @@ import dorkbox.util.SwingUtil; * Also, on linux, this WILL NOT CLOSE properly -- there is a frame handle that keeps the JVM open. MacOS does not have this problem. */ @SuppressWarnings({"SynchronizationOnLocalVariableOrMethodParameter", "WeakerAccess"}) -public +public final class _AwtTray extends Tray implements NativeUI { private volatile SystemTray tray; private volatile TrayIcon trayIcon; diff --git a/src/dorkbox/systemTray/nativeUI/_GtkStatusIconNativeTray.java b/src/dorkbox/systemTray/nativeUI/_GtkStatusIconNativeTray.java index faa1261..3e1a7e2 100644 --- a/src/dorkbox/systemTray/nativeUI/_GtkStatusIconNativeTray.java +++ b/src/dorkbox/systemTray/nativeUI/_GtkStatusIconNativeTray.java @@ -35,7 +35,7 @@ import dorkbox.systemTray.jna.linux.Gtk; * This is the "old" way to do it, and does not work with some newer desktop environments. */ @SuppressWarnings("Duplicates") -public +public final class _GtkStatusIconNativeTray extends Tray implements NativeUI { private volatile Pointer trayIcon; @@ -55,6 +55,8 @@ class _GtkStatusIconNativeTray extends Tray implements NativeUI { private volatile boolean visible = true; private volatile File imageFile; + private final GtkMenu gtkMenu; + // called on the EDT public _GtkStatusIconNativeTray(final SystemTray systemTray) { @@ -63,7 +65,7 @@ class _GtkStatusIconNativeTray extends Tray implements NativeUI { Gtk.startGui(); // we override various methods, because each tray implementation is SLIGHTLY different. This allows us customization. - final GtkMenu gtkMenu = new GtkMenu() { + gtkMenu = new GtkMenu() { @Override public void setEnabled(final MenuItem menuItem) { @@ -215,7 +217,7 @@ class _GtkStatusIconNativeTray extends Tray implements NativeUI { } @Override - public final + public boolean hasImage() { return imageFile != null; }