forked from dorkbox/SystemTray
Added vounds checking for FORCE_TRAY_TYPE
This commit is contained in:
parent
36229e8aaa
commit
77b0fc4691
@ -115,7 +115,7 @@ class SystemTray {
|
|||||||
* <p>
|
* <p>
|
||||||
* This is an advanced feature, and it is recommended to leave at 0.
|
* This is an advanced feature, and it is recommended to leave at 0.
|
||||||
*/
|
*/
|
||||||
public static int FORCE_TRAY_TYPE = 0;
|
public static int FORCE_TRAY_TYPE = 3;
|
||||||
|
|
||||||
@Property
|
@Property
|
||||||
/**
|
/**
|
||||||
@ -243,6 +243,10 @@ class SystemTray {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FORCE_TRAY_TYPE < 0 || FORCE_TRAY_TYPE > 3) {
|
||||||
|
throw new RuntimeException("Invalid option for FORCE_TRAY_TYPE: " + FORCE_TRAY_TYPE);
|
||||||
|
}
|
||||||
|
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
switch (FORCE_TRAY_TYPE) {
|
switch (FORCE_TRAY_TYPE) {
|
||||||
case 1: logger.debug("Forced tray type: GtkStatusIcon"); break;
|
case 1: logger.debug("Forced tray type: GtkStatusIcon"); break;
|
||||||
|
Loading…
Reference in New Issue
Block a user