Updated logic for loading Gtk/AppIndicator based on OS info
This commit is contained in:
parent
88707b5786
commit
3ee25b3935
@ -48,7 +48,8 @@ class AppIndicator {
|
|||||||
boolean _isVersion3 = false;
|
boolean _isVersion3 = false;
|
||||||
boolean _isLoaded = false;
|
boolean _isLoaded = false;
|
||||||
|
|
||||||
if (!OS.isLinux()) {
|
boolean shouldLoadAppIndicator = !(OS.isWindows() || OS.isMacOsX());
|
||||||
|
if (!shouldLoadAppIndicator) {
|
||||||
_isLoaded = true;
|
_isLoaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -230,7 +231,7 @@ class AppIndicator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OS.isLinux()) {
|
if (shouldLoadAppIndicator) {
|
||||||
isLoaded = _isLoaded;
|
isLoaded = _isLoaded;
|
||||||
isVersion3 = _isVersion3;
|
isVersion3 = _isVersion3;
|
||||||
} else {
|
} else {
|
||||||
|
@ -84,7 +84,8 @@ class Gtk {
|
|||||||
boolean _isLoaded = false;
|
boolean _isLoaded = false;
|
||||||
boolean _alreadyRunningGTK = false;
|
boolean _alreadyRunningGTK = false;
|
||||||
|
|
||||||
if (!OS.isLinux()) {
|
boolean shouldLoadGtk = !(OS.isWindows() || OS.isMacOsX());
|
||||||
|
if (!shouldLoadGtk) {
|
||||||
_isLoaded = true;
|
_isLoaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,7 +187,7 @@ class Gtk {
|
|||||||
isGtk3 = false;
|
isGtk3 = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OS.isLinux() && !_isLoaded) {
|
if (shouldLoadGtk && !_isLoaded) {
|
||||||
throw new RuntimeException("We apologize for this, but we are unable to determine the GTK library is in use, " +
|
throw new RuntimeException("We apologize for this, but we are unable to determine the GTK library is in use, " +
|
||||||
"or even if it is in use... Please create an issue for this and include your OS type and configuration.");
|
"or even if it is in use... Please create an issue for this and include your OS type and configuration.");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user