Now sets the systemtray also to null it fails to load.
This commit is contained in:
parent
2e55b34ec8
commit
297d68e06e
@ -273,6 +273,7 @@ class SystemTray {
|
|||||||
" NOT extend the JavaFX 'Application' class.");
|
" NOT extend the JavaFX 'Application' class.");
|
||||||
|
|
||||||
systemTrayMenu = null;
|
systemTrayMenu = null;
|
||||||
|
systemTray = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -289,6 +290,7 @@ class SystemTray {
|
|||||||
logger.error("Cannot use the SystemTray in a headless environment");
|
logger.error("Cannot use the SystemTray in a headless environment");
|
||||||
|
|
||||||
systemTrayMenu = null;
|
systemTrayMenu = null;
|
||||||
|
systemTray = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -342,6 +344,7 @@ class SystemTray {
|
|||||||
"initialized, or set `SystemTray.FORCE_GTK2=false;`");
|
"initialized, or set `SystemTray.FORCE_GTK2=false;`");
|
||||||
|
|
||||||
systemTrayMenu = null;
|
systemTrayMenu = null;
|
||||||
|
systemTray = null;
|
||||||
return;
|
return;
|
||||||
} else if (!isSwt_GTK3 && !FORCE_GTK2 && AUTO_FIX_INCONSISTENCIES) {
|
} else if (!isSwt_GTK3 && !FORCE_GTK2 && AUTO_FIX_INCONSISTENCIES) {
|
||||||
// we must use GTK2, because SWT is GTK2
|
// we must use GTK2, because SWT is GTK2
|
||||||
@ -369,6 +372,7 @@ class SystemTray {
|
|||||||
"GTK2. Please set `SystemTray.FORCE_GTK2=false;` if that is not possible then it will not work.");
|
"GTK2. Please set `SystemTray.FORCE_GTK2=false;` if that is not possible then it will not work.");
|
||||||
|
|
||||||
systemTrayMenu = null;
|
systemTrayMenu = null;
|
||||||
|
systemTray = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (!isJFX_GTK3 && !FORCE_GTK2 && AUTO_FIX_INCONSISTENCIES) {
|
} else if (!isJFX_GTK3 && !FORCE_GTK2 && AUTO_FIX_INCONSISTENCIES) {
|
||||||
@ -617,6 +621,7 @@ class SystemTray {
|
|||||||
"and include your OS type and configuration");
|
"and include your OS type and configuration");
|
||||||
|
|
||||||
systemTrayMenu = null;
|
systemTrayMenu = null;
|
||||||
|
systemTray = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -674,6 +679,7 @@ class SystemTray {
|
|||||||
logger.error("SystemTray initialization failed. (Unable to discover which implementation to use). Something is seriously wrong.");
|
logger.error("SystemTray initialization failed. (Unable to discover which implementation to use). Something is seriously wrong.");
|
||||||
|
|
||||||
systemTrayMenu = null;
|
systemTrayMenu = null;
|
||||||
|
systemTray = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -692,6 +698,7 @@ class SystemTray {
|
|||||||
if (!Gtk.isLoaded) {
|
if (!Gtk.isLoaded) {
|
||||||
logger.error("Unable to initialize GTK! Something is severely wrong!");
|
logger.error("Unable to initialize GTK! Something is severely wrong!");
|
||||||
systemTrayMenu = null;
|
systemTrayMenu = null;
|
||||||
|
systemTray = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -710,11 +717,13 @@ class SystemTray {
|
|||||||
logger.error("Unable to initialize AppIndicator for Arch linux, it requires GTK2! " +
|
logger.error("Unable to initialize AppIndicator for Arch linux, it requires GTK2! " +
|
||||||
"Please install libappindicator, for example: 'sudo pacman -S libappindicator'");
|
"Please install libappindicator, for example: 'sudo pacman -S libappindicator'");
|
||||||
systemTrayMenu = null;
|
systemTrayMenu = null;
|
||||||
|
systemTray = null;
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
logger.error("Unable to initialize AppIndicator for Arch linux, it requires GTK3! " +
|
logger.error("Unable to initialize AppIndicator for Arch linux, it requires GTK3! " +
|
||||||
"Please install libappindicator3, for example: 'sudo pacman -S libappindicator3'"); // GTK3
|
"Please install libappindicator3, for example: 'sudo pacman -S libappindicator3'"); // GTK3
|
||||||
systemTrayMenu = null;
|
systemTrayMenu = null;
|
||||||
|
systemTray = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -738,6 +747,7 @@ class SystemTray {
|
|||||||
" Please install libappindicator1 OR GTK3, for example: 'sudo apt-get install libappindicator1'");
|
" Please install libappindicator1 OR GTK3, for example: 'sudo apt-get install libappindicator1'");
|
||||||
|
|
||||||
systemTrayMenu = null;
|
systemTrayMenu = null;
|
||||||
|
systemTray = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -775,6 +785,7 @@ class SystemTray {
|
|||||||
"(EDT). Something is seriously wrong.");
|
"(EDT). Something is seriously wrong.");
|
||||||
|
|
||||||
systemTrayMenu = null;
|
systemTrayMenu = null;
|
||||||
|
systemTray = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -832,6 +843,7 @@ class SystemTray {
|
|||||||
logger.error("Unable to correctly initialize the System Tray. Please write an issue and include your " +
|
logger.error("Unable to correctly initialize the System Tray. Please write an issue and include your " +
|
||||||
"OS type and configuration");
|
"OS type and configuration");
|
||||||
systemTrayMenu = null;
|
systemTrayMenu = null;
|
||||||
|
systemTray = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user