Code cleanup

This commit is contained in:
nathan 2016-12-23 22:26:31 +01:00
parent ce12c0c208
commit 10ba55b9e7
4 changed files with 6 additions and 11 deletions

View File

@ -33,6 +33,7 @@ import dorkbox.systemTray.jna.JnaHelper;
public
class AppIndicator {
public static boolean isVersion3 = false;
public static boolean isLoaded = false;
/**
* Loader for AppIndicator, because it is absolutely mindboggling how those whom maintain the standard, can't agree to what that
@ -43,8 +44,6 @@ class AppIndicator {
* This is so hacky it makes me sick.
*/
static {
boolean isLoaded = false;
// objdump -T /usr/lib/x86_64-linux-gnu/libappindicator.so.1 | grep foo
// objdump -T /usr/lib/x86_64-linux-gnu/libappindicator3.so.1 | grep foo
@ -174,8 +173,6 @@ class AppIndicator {
}
}
}
}
// If we are GTK2, change the order we check and load libraries

View File

@ -49,12 +49,12 @@ class Gtk {
// NOTE: AppIndicator uses this info to figure out WHAT VERSION OF appindicator to use: GTK2 -> appindicator1, GTK3 -> appindicator3
public static volatile boolean isGtk2 = false;
public static boolean isLoaded = false;
public static Function gtk_status_icon_position_menu = null;
private static boolean alreadyRunningGTK = false;
private static boolean isLoaded = false;
// This is required because the EDT needs to have it's own value for this boolean, that is a different value than the main thread
private static ThreadLocal<Boolean> isDispatch = new ThreadLocal<Boolean>() {
@ -193,14 +193,15 @@ class Gtk {
if (!alreadyRunningGTK ) {
// If JavaFX/SWT is used, this is UNNECESSARY (we can detect if the GTK main_loop is running)
if (SystemTray.DEBUG) {
logger.debug("Running GTK Native Event Loop");
}
gtkUpdateThread = new Thread() {
@Override
public
void run() {
if (SystemTray.DEBUG) {
logger.debug("Running GTK Native Event Loop");
}
// prep for the event loop.
// GThread.g_thread_init(null); would be needed for g_idle_add()

View File

@ -71,8 +71,6 @@ class JavaFX {
public static
void init() {
// empty method to initialize class
if (dispatchMethod == null || isEventThreadMethod == null) {
SystemTray.logger.error("Unable to initialize JavaFX! Please create an issue with your OS and Java " +
"version so we may further investigate this issue.");

View File

@ -38,7 +38,6 @@ class Swt {
public static
void init() {
// empty method to initialize class
if (currentDisplay == null) {
logger.error("Unable to get the current display for SWT. Please create an issue with your OS and Java " +
"version so we may further investigate this issue.");