summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'dozentenmodul/src/main/java')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java6
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/MainWindow.java11
2 files changed, 12 insertions, 5 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 1a497ffc..6896835a 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
@@ -313,13 +313,15 @@ public class LoginWindow extends LoginWindowLayout {
// TODO HACK HACK
ThriftManager.setSatelliteAddress("132.230.8.113");
- MainWindow.setContent(new MainMenuWindow(getShell()));
+ // TODO set session stuff
+
// now read the config to see if the user already agreed to the disclaimer
if (!Config.getDisclaimerAgreement())
MainWindow.openPopup(DisclaimerWindow.class, true);
if (!Config.getVmwareLicenseAgreement())
MainWindow.openPopup(VirtualizerNoticeWindow.class, true);
- // TODO: See MainWindowLayout comments
+
+ this.getParent().dispose();
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/MainWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/MainWindow.java
index 75b37475..0dc6b5a7 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/MainWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/MainWindow.java
@@ -19,6 +19,7 @@ import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Monitor;
import org.eclipse.swt.widgets.Shell;
import org.openslx.dozmod.gui.helper.MessageType;
+import org.openslx.dozmod.thrift.Session;
import org.openslx.thrifthelper.ThriftManager;
import org.openslx.thrifthelper.ThriftManager.ErrorCallback;
@@ -143,8 +144,8 @@ public abstract class MainWindow {
// Set layout for the mainshell, items added to the shell should get a gridData
mainShell.setLayout(new GridLayout(1, true));
- // Add LoginWindow as the first window to be shown
- setContent(new LoginWindow(mainShell));
+ // always show the main menu
+ setContent(new MainMenuWindow(mainShell));
// center the window on the primary monitor
Monitor primary = display.getPrimaryMonitor();
@@ -159,7 +160,11 @@ public abstract class MainWindow {
mainShell.pack();
mainShell.open();
- LOGGER.info("GUI initialised.");
+ // here we can check for Session information
+ if (Session.getSatelliteToken() == null) {
+ // User did not login, show the login mask
+ openPopup(LoginWindow.class, true);
+ }
while (!mainShell.isDisposed()) {
if (!display.readAndDispatch())