Fixed issues with isGnome() detection on Unix (FreeBSD)
This commit is contained in:
parent
e57724229e
commit
3919e1ce9e
@ -214,7 +214,7 @@ class Extension {
|
|||||||
*/
|
*/
|
||||||
public static
|
public static
|
||||||
void install() {
|
void install() {
|
||||||
if (!ENABLE_EXTENSION_INSTALL || !OSUtil.Linux.DesktopEnv.isGnome()) {
|
if (!ENABLE_EXTENSION_INSTALL || !OSUtil.DesktopEnv.isGnome()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,7 +222,7 @@ class Extension {
|
|||||||
boolean hasSystemTray;
|
boolean hasSystemTray;
|
||||||
|
|
||||||
// should just be 3.14.1 or 3.20 or similar
|
// should just be 3.14.1 or 3.20 or similar
|
||||||
String gnomeVersion = OSUtil.Linux.DesktopEnv.getGnomeVersion();
|
String gnomeVersion = OSUtil.DesktopEnv.getGnomeVersion();
|
||||||
if (gnomeVersion == null) {
|
if (gnomeVersion == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -382,7 +382,7 @@ class Extension {
|
|||||||
|
|
||||||
public static
|
public static
|
||||||
void unInstall() {
|
void unInstall() {
|
||||||
if (!ENABLE_EXTENSION_INSTALL || !OSUtil.Linux.DesktopEnv.isGnome()) {
|
if (!ENABLE_EXTENSION_INSTALL || !OSUtil.DesktopEnv.isGnome()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ class ImageUtils {
|
|||||||
SystemTray.logger.debug("Windows version: '{}'", Arrays.toString(version));
|
SystemTray.logger.debug("Windows version: '{}'", Arrays.toString(version));
|
||||||
SystemTray.logger.debug("Windows DPI settings: '{}'", dpiX);
|
SystemTray.logger.debug("Windows DPI settings: '{}'", dpiX);
|
||||||
}
|
}
|
||||||
} else if (OS.isLinux()) {
|
} else if (OS.isLinux() || OS.isUnix()) {
|
||||||
// GtkStatusIcon will USUALLY automatically scale the icon
|
// GtkStatusIcon will USUALLY automatically scale the icon
|
||||||
// AppIndicator MIGHT scale the icon (depends on the OS)
|
// AppIndicator MIGHT scale the icon (depends on the OS)
|
||||||
|
|
||||||
@ -155,14 +155,14 @@ class ImageUtils {
|
|||||||
String XDG = System.getenv("XDG_CURRENT_DESKTOP");
|
String XDG = System.getenv("XDG_CURRENT_DESKTOP");
|
||||||
if (XDG == null) {
|
if (XDG == null) {
|
||||||
// Check if plasmashell is running, if it is -- then we are most likely KDE
|
// Check if plasmashell is running, if it is -- then we are most likely KDE
|
||||||
double plasmaVersion = OSUtil.Linux.DesktopEnv.getPlasmaVersion();
|
double plasmaVersion = OSUtil.DesktopEnv.getPlasmaVersion();
|
||||||
if (plasmaVersion > 0) {
|
if (plasmaVersion > 0) {
|
||||||
XDG = "kde";
|
XDG = "kde";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("kde".equalsIgnoreCase(XDG)) {
|
if ("kde".equalsIgnoreCase(XDG)) {
|
||||||
double plasmaVersion = OSUtil.Linux.DesktopEnv.getPlasmaVersion();
|
double plasmaVersion = OSUtil.DesktopEnv.getPlasmaVersion();
|
||||||
|
|
||||||
// 1 = 16
|
// 1 = 16
|
||||||
// 2 = 32
|
// 2 = 32
|
||||||
|
Loading…
Reference in New Issue
Block a user