Commit f1f45a7c authored by legoc's avatar legoc
Browse files

Version 4.0.61

parent 69b86eff
4.0.61 dd/mm/2020
4.0.61 08/09/2020
------
* Improvement: When "view logs" menu displays the message "you must log in to view logs!", automatically opens the login popup.
* Add 2 preference values to restore main window x and y.
......
......@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>fr.ill.ics</groupId>
<artifactId>nomadgui</artifactId>
<version>4.0.61-SNAPSHOT</version>
<version>4.0.61</version>
<name>NomadGUI</name>
<description>Graphical user interface for Nomad</description>
<scm>
......
......@@ -420,8 +420,8 @@ public class MainWindow implements ServerConfigurationChangeListener, ServerEnde
ConfigManager.getInstance().savePreference(ConfigManager.MAGNIFY_FACTOR_INDEX, Magnifier.getScaleIndex() + "");
ConfigManager.getInstance().savePreference(ConfigManager.X_MAIN_WINDOW, String.valueOf(MainWindowPeer.getInstance().getX()));
ConfigManager.getInstance().savePreference(ConfigManager.Y_MAIN_WINDOW, String.valueOf(MainWindowPeer.getInstance().getY()));
// ConfigManager.getInstance().savePreference(ConfigManager.X_MAIN_WINDOW, String.valueOf(MainWindowPeer.getInstance().getX()));
// ConfigManager.getInstance().savePreference(ConfigManager.Y_MAIN_WINDOW, String.valueOf(MainWindowPeer.getInstance().getY()));
ConfigManager.getInstance().savePreferences();
......
......@@ -150,7 +150,7 @@ public class TokenManager implements TokenEventListener {
if (RemoteControlManager.getInstance().isDisabled() && ConfigManager.getInstance().isRemoteClient()) {
tokenStateChanged = !tokenState.isDisabled();
tokenState.setDisabled();
tokenState.setOwner(null);
//tokenState.setOwner(null);
} else if (getTokenStateMessage && event.getState() == TokenServerState.FREE) {
if (ownedByMe) {
// that changes nothing, as long as token is free, client keeps it but it is available on server side
......@@ -159,19 +159,19 @@ public class TokenManager implements TokenEventListener {
} else {
tokenStateChanged = !tokenState.isFree();
tokenState.setFree();
tokenState.setOwner(null);
//tokenState.setOwner(null);
chatMessage = ConfigManager.getInstance().getString("tokenIsFreeMessage");
}
} else if (getTokenStateMessage && event.getState() == TokenServerState.OWNED) {
if (ownedByMe) {
tokenStateChanged = !tokenState.isOwnedByMe();
tokenState.setOwnedByMe();
tokenState.setOwner(event.getUser());
//tokenState.setOwner(event.getUser());
chatMessage = ConfigManager.getInstance().getString("tokenIsOwnedByMe");
} else {
tokenStateChanged = !tokenState.isOwnedByOther();
tokenState.setOwnedByOther();
tokenState.setOwner(event.getUser());
//tokenState.setOwner(event.getUser());
chatMessage = event.getUser() + " " + ConfigManager.getInstance().getString("tokenIsOwnedByOtherMessage");
}
}
......@@ -262,6 +262,7 @@ public class TokenManager implements TokenEventListener {
}
public Object getOwner() {
return tokenState.getOwner();
//return tokenState.getOwner();
return null;
}
}
......@@ -367,12 +367,12 @@ public class SWTMainWindowPeer extends MainWindowPeer {
int x = (screenWidth - shellWidth) / 2;
int y = (screenHeight - shellHeight) / 2;
String xString = ConfigManager.getInstance().getPreferenceValue(ConfigManager.X_MAIN_WINDOW);
String yString = ConfigManager.getInstance().getPreferenceValue(ConfigManager.Y_MAIN_WINDOW);
if (xString != null && yString != null) {
x = Integer.valueOf(xString);
y = Integer.valueOf(yString);
}
// String xString = ConfigManager.getInstance().getPreferenceValue(ConfigManager.X_MAIN_WINDOW);
// String yString = ConfigManager.getInstance().getPreferenceValue(ConfigManager.Y_MAIN_WINDOW);
// if (xString != null && yString != null) {
// x = Integer.valueOf(xString);
// y = Integer.valueOf(yString);
// }
shell.setLocation(x, y);
shell.setRedraw(false);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment