From de46409b8fe567007c4a7a498c2ed5d3f10e44a0 Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 23 Sep 2016 13:28:23 +0200 Subject: [PATCH] Added more detection for specified tray types --- src/dorkbox/systemTray/linux/jna/AppIndicator.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/dorkbox/systemTray/linux/jna/AppIndicator.java b/src/dorkbox/systemTray/linux/jna/AppIndicator.java index e8d2753..1eb9578 100644 --- a/src/dorkbox/systemTray/linux/jna/AppIndicator.java +++ b/src/dorkbox/systemTray/linux/jna/AppIndicator.java @@ -32,9 +32,7 @@ import dorkbox.systemTray.SystemTray; public class AppIndicator { public static boolean isVersion3 = false; - private static boolean isLoaded = false; - private static boolean LIBRARY_DEBUG = false; /** @@ -55,6 +53,9 @@ class AppIndicator { if (SystemTray.FORCE_LINUX_TYPE == SystemTray.LINUX_GTK) { // if we force GTK type system tray, don't attempt to load AppIndicator libs + if (LIBRARY_DEBUG) { + logger.error("Forcing GTK tray, not using appindicator"); + } isLoaded = true; } @@ -208,11 +209,6 @@ class AppIndicator { } } } - - if (!isLoaded) { - throw new RuntimeException("We apologize for this, but we are unable to determine which the appIndicator library is in use, if " + - "or even if it is in use... Please create an issue for this and include your OS type and configuration."); - } } // Note: AppIndicators DO NOT support tooltips, as per mark shuttleworth. Rather stupid IMHO.