forked from dorkbox/SystemTray
Cleaned up comments. Fixed gnome-shell detection (accidentally broke it)
This commit is contained in:
parent
18aa47ae5b
commit
107757ff68
@ -72,8 +72,8 @@ class SystemTray {
|
||||
public static boolean FORCE_GTK2 = true;
|
||||
|
||||
@Property
|
||||
/** If != 0, forces the system tray in linux to be GTK (1), AppIndicator (2), or Swing (3). This is an advanced feature. */
|
||||
public static int FORCE_LINUX_TYPE = 1;
|
||||
/** Forces the system tray detection to be Automatic (0), GTK (1), AppIndicator (2), or Swing (3). This is an advanced feature. */
|
||||
public static int FORCE_LINUX_TYPE = 0;
|
||||
|
||||
@Property
|
||||
/**
|
||||
@ -201,11 +201,11 @@ class SystemTray {
|
||||
|
||||
if (DEBUG) {
|
||||
switch (FORCE_LINUX_TYPE) {
|
||||
case 1: logger.debug("Forcing GTK type"); break;
|
||||
case 2: logger.debug("Forcing AppIndicator type"); break;
|
||||
case 3: logger.debug("Forcing Swing type"); break;
|
||||
case 1: logger.debug("Forced tray type: GtkStatusIcon"); break;
|
||||
case 2: logger.debug("Forced tray type: AppIndicator"); break;
|
||||
case 3: logger.debug("Forced tray type: Swing"); break;
|
||||
|
||||
default: logger.debug("Auto-detecting indicator type"); break;
|
||||
default: logger.debug("Auto-detecting tray type"); break;
|
||||
}
|
||||
logger.debug("FORCE_GTK2: {}", FORCE_GTK2);
|
||||
}
|
||||
@ -232,7 +232,7 @@ class SystemTray {
|
||||
// appindicator3 doesn't support menu icons via GTK2!!
|
||||
if (Gtk.isGtk2 || AppIndicator.isVersion3) {
|
||||
if (DEBUG) {
|
||||
logger.trace("Loading libraries");
|
||||
logger.debug("Loading libraries");
|
||||
}
|
||||
}
|
||||
|
||||
@ -295,6 +295,7 @@ class SystemTray {
|
||||
}
|
||||
|
||||
|
||||
if (trayType == null) {
|
||||
if ("unity".equalsIgnoreCase(XDG)) {
|
||||
try {
|
||||
trayType = AppIndicatorTray.class;
|
||||
@ -382,6 +383,8 @@ class SystemTray {
|
||||
GnomeShellExtension.SHELL_RESTART_COMMAND = "unity --replace &";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// is likely 'gnome' (gnome-shell exists on the platform), but it can also be unknown (or something completely different),
|
||||
// install extension and go from there
|
||||
@ -407,6 +410,7 @@ class SystemTray {
|
||||
}
|
||||
|
||||
GnomeShellExtension.install(output);
|
||||
// we might be running gnome-shell, we MIGHT NOT. If we are forced to be app-indicator or swing, don't do this.
|
||||
if (trayType == null) {
|
||||
trayType = GtkSystemTray.class;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user