OnCloseMode
* Toggle Switch in general settings effects the onCloseMode of the window. * Saving in prefs. * Styled the general settings screen and added some text.
This commit is contained in:
@ -132,7 +132,12 @@ public class Startup {
|
||||
new StatusTrayIcon(chatWindow).show();
|
||||
|
||||
// If the tray icon is supported, hide the chat window on close
|
||||
chatWindow.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
|
||||
if(Settings.getInstance().getCurrentOnCloseMode() == 1) {
|
||||
chatWindow.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
|
||||
}else {
|
||||
chatWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
}
|
||||
|
||||
} catch (EnvoyException e) {
|
||||
logger.warning("The StatusTrayIcon is not supported on this platform!");
|
||||
}
|
||||
|
Reference in New Issue
Block a user