Added SWT version enforcement. We are incompatible with versions <= 4.3
This commit is contained in:
parent
7a9dafad6a
commit
d7ca1adea5
@ -481,9 +481,22 @@ class SystemTray {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (Swt.isLoaded) {
|
||||||
|
// versions of SWT older than v4.4, are INCOMPATIBLE with us.
|
||||||
|
// Of note, v4.3 is the "last released" version of SWT by eclipse AND IT WILL NOT WORK!!
|
||||||
|
// for NEWER versions of SWT via maven, use http://maven-eclipse.github.io/maven
|
||||||
|
if (Swt.getVersion() < 4430) {
|
||||||
|
logger.error("Unable to use currently loaded version of SWT, it is TOO OLD. Please use version 4.4+.");
|
||||||
|
|
||||||
|
systemTrayMenu = null;
|
||||||
|
systemTray = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// cannot mix Swing and SWT on MacOSX (for all versions of java) so we force native menus instead, which work just fine with SWT
|
// cannot mix Swing and SWT on MacOSX (for all versions of java) so we force native menus instead, which work just fine with SWT
|
||||||
// http://mail.openjdk.java.net/pipermail/bsd-port-dev/2008-December/000173.html
|
// http://mail.openjdk.java.net/pipermail/bsd-port-dev/2008-December/000173.html
|
||||||
if (Swt.isLoaded && FORCE_TRAY_TYPE == TrayType.Swing) {
|
if (FORCE_TRAY_TYPE == TrayType.Swing) {
|
||||||
if (AUTO_FIX_INCONSISTENCIES) {
|
if (AUTO_FIX_INCONSISTENCIES) {
|
||||||
logger.warn("Unable to load Swing + SWT (for all versions of Java). Using the AWT Tray type instead.");
|
logger.warn("Unable to load Swing + SWT (for all versions of Java). Using the AWT Tray type instead.");
|
||||||
|
|
||||||
@ -498,6 +511,7 @@ class SystemTray {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (FORCE_TRAY_TYPE != TrayType.AutoDetect && FORCE_TRAY_TYPE != TrayType.Swing && FORCE_TRAY_TYPE != TrayType.AWT) {
|
if (FORCE_TRAY_TYPE != TrayType.AutoDetect && FORCE_TRAY_TYPE != TrayType.Swing && FORCE_TRAY_TYPE != TrayType.AWT) {
|
||||||
// MacOsX can only use swing and AWT
|
// MacOsX can only use swing and AWT
|
||||||
@ -702,6 +716,10 @@ class SystemTray {
|
|||||||
logger.debug("Is Auto sizing tray/menu? {}", AUTO_SIZE);
|
logger.debug("Is Auto sizing tray/menu? {}", AUTO_SIZE);
|
||||||
logger.debug("Is JavaFX detected? {}", JavaFX.isLoaded);
|
logger.debug("Is JavaFX detected? {}", JavaFX.isLoaded);
|
||||||
logger.debug("Is SWT detected? {}", Swt.isLoaded);
|
logger.debug("Is SWT detected? {}", Swt.isLoaded);
|
||||||
|
if (Swt.isLoaded) {
|
||||||
|
logger.debug("SWT version: {}", Swt.getVersion());
|
||||||
|
}
|
||||||
|
|
||||||
logger.debug("Java Swing L&F: {}", UIManager.getLookAndFeel().getID());
|
logger.debug("Java Swing L&F: {}", UIManager.getLookAndFeel().getID());
|
||||||
if (FORCE_TRAY_TYPE == TrayType.AutoDetect) {
|
if (FORCE_TRAY_TYPE == TrayType.AutoDetect) {
|
||||||
logger.debug("Auto-detecting tray type");
|
logger.debug("Auto-detecting tray type");
|
||||||
|
Loading…
Reference in New Issue
Block a user