summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java
diff options
context:
space:
mode:
authorSimon Rettberg2015-08-20 16:12:52 +0200
committerSimon Rettberg2015-08-20 16:12:52 +0200
commita805193eebc028ba4a47fd6a31094e23c3d78379 (patch)
tree99012c344cad5156ce0e40a80bc597d9bf997d67 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java
parent[client] Fix logic operator in if-statement (diff)
downloadtutor-module-a805193eebc028ba4a47fd6a31094e23c3d78379.tar.gz
tutor-module-a805193eebc028ba4a47fd6a31094e23c3d78379.tar.xz
tutor-module-a805193eebc028ba4a47fd6a31094e23c3d78379.zip
[client] Minor fixes
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java15
1 files changed, 6 insertions, 9 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java
index dfbb35f2..50aae9e2 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java
@@ -10,7 +10,6 @@ import java.awt.event.KeyEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.util.Collections;
-import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
@@ -38,6 +37,7 @@ import org.openslx.dozmod.gui.MainWindow;
import org.openslx.dozmod.gui.helper.MessageType;
import org.openslx.dozmod.gui.window.layout.LoginWindowLayout;
import org.openslx.dozmod.thrift.Session;
+import org.openslx.dozmod.thrift.Sorters;
import org.openslx.dozmod.thrift.cache.OrganizationCache;
import org.openslx.thrifthelper.ThriftManager;
import org.openslx.util.QuickTimer;
@@ -139,11 +139,7 @@ public class LoginWindow extends LoginWindowLayout {
iterator.remove();
}
// all fine, lets sort it
- Collections.sort(orgs, new Comparator<Organization>() {
- public int compare(Organization o1, Organization o2) {
- return o1.getDisplayName().compareTo(o2.getDisplayName());
- }
- });
+ Collections.sort(orgs, Sorters.organization);
// now send the organisations back to the LoginWindow
// through populateIdpCombo()
Gui.asyncExec(new Runnable() {
@@ -334,8 +330,8 @@ public class LoginWindow extends LoginWindowLayout {
// TODO: Show satellite selection if > 1
//String satAddress = data.satellites.get(0).addressList.get(0);
String satAddress = "132.230.8.113"; // TODO: HACK HACK
- Client client = ThriftManager.getNewSatelliteClient(GraphicalCertHandler.getSslContext(satAddress), satAddress,
- App.THRIFT_SSL_PORT, App.THRIFT_TIMEOUT_MS);
+ Client client = ThriftManager.getNewSatelliteClient(GraphicalCertHandler.getSslContext(satAddress),
+ satAddress, App.THRIFT_SSL_PORT, App.THRIFT_TIMEOUT_MS);
if (client == null) {
Gui.showMessageBox(this, "Login erfolgreich, aber der Satellit antwortet nicht",
MessageType.ERROR, LOGGER, null);
@@ -362,7 +358,8 @@ public class LoginWindow extends LoginWindowLayout {
}
if (whoami != null) {
Session.initialize(whoami, satAddress, data.satelliteToken, data.masterToken);
- ThriftManager.setSatelliteAddress(GraphicalCertHandler.getSslContext(Session.getSatelliteAddress()),
+ ThriftManager.setSatelliteAddress(
+ GraphicalCertHandler.getSslContext(Session.getSatelliteAddress()),
Session.getSatelliteAddress(), App.THRIFT_SSL_PORT, App.THRIFT_TIMEOUT_MS);
// now read the config to see if the user already agreed to the disclaimer
// if (DisclaimerWindow.shouldBeShown())