forked from j62/ctbrec
Code cleanup
This commit is contained in:
parent
9037b525bd
commit
60826323f3
|
@ -24,7 +24,9 @@ import javafx.scene.layout.BorderPane;
|
|||
|
||||
public class DesktopIntegration {
|
||||
|
||||
private static final transient Logger LOG = LoggerFactory.getLogger(DesktopIntegration.class);
|
||||
private DesktopIntegration() {}
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(DesktopIntegration.class);
|
||||
|
||||
private static SystemTray tray;
|
||||
private static TrayIcon trayIcon;
|
||||
|
@ -128,11 +130,11 @@ public class DesktopIntegration {
|
|||
"-t", "5000",
|
||||
"-a", title,
|
||||
header,
|
||||
msg.replaceAll("-", "\\\\-").replaceAll("\\s", "\\\\ "),
|
||||
msg.replace("-", "\\\\-").replace("\\s", "\\\\ "),
|
||||
"--icon=dialog-information"
|
||||
});
|
||||
new Thread(new StreamRedirectThread(p.getInputStream(), System.out)).start();
|
||||
new Thread(new StreamRedirectThread(p.getErrorStream(), System.err)).start();
|
||||
new Thread(new StreamRedirectThread(p.getInputStream(), System.out)).start(); // NOSONAR
|
||||
new Thread(new StreamRedirectThread(p.getErrorStream(), System.err)).start(); // NOSONAR
|
||||
} catch (IOException e1) {
|
||||
LOG.error("Notification failed", e1);
|
||||
}
|
||||
|
@ -146,7 +148,7 @@ public class DesktopIntegration {
|
|||
notifySystemTray(title, header, msg);
|
||||
}
|
||||
|
||||
private synchronized static void notifySystemTray(String title, String header, String msg) {
|
||||
private static synchronized void notifySystemTray(String title, String header, String msg) {
|
||||
if (SystemTray.isSupported()) {
|
||||
if (tray == null) {
|
||||
LOG.debug("Creating tray icon");
|
||||
|
|
Loading…
Reference in New Issue