summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2019-10-14 17:29:02 +0200
committerSimon Rettberg2019-10-14 17:29:02 +0200
commit7eff4eff0f77df5b7c7b0f6b85e7985a7b776650 (patch)
tree5da29a6012f0bae4c923fa4c8c1d3b4ccf01c19f
parent[client] Properly set visibility flag (diff)
downloadtutor-module-7eff4eff0f77df5b7c7b0f6b85e7985a7b776650.tar.gz
tutor-module-7eff4eff0f77df5b7c7b0f6b85e7985a7b776650.tar.xz
tutor-module-7eff4eff0f77df5b7c7b0f6b85e7985a7b776650.zip
[client] Add update check button to login window
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java8
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java3
2 files changed, 11 insertions, 0 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 8f5dc68a..d089fafd 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
@@ -35,6 +35,7 @@ import org.openslx.dozmod.authentication.ShibbolethEcp.ReturnCode;
import org.openslx.dozmod.authentication.TestAccountAuthenticator;
import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.MainWindow;
+import org.openslx.dozmod.gui.activity.UpdatePanel;
import org.openslx.dozmod.gui.helper.MessageType;
import org.openslx.dozmod.gui.helper.TextChangeListener;
import org.openslx.dozmod.gui.window.layout.LoginWindowLayout;
@@ -196,6 +197,13 @@ public class LoginWindow extends LoginWindowLayout {
DesktopEnvironment.openLocal(new File(Config.getPath()));
}
});
+
+ btnUpdateCheck.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ CheckUpdateWindow.open(SwingUtilities.getWindowAncestor(btnUpdateCheck));
+ }
+ });
txtUsername.getDocument().addDocumentListener(new TextChangeListener() {
@Override
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java
index 4696f392..e5970b9f 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java
@@ -70,6 +70,7 @@ public abstract class LoginWindowLayout extends JDialog {
// advanced panel
protected final JButton btnSettings;
protected final JButton btnLogDir;
+ protected final JButton btnUpdateCheck;
/**
* Create a new login composite
@@ -91,6 +92,7 @@ public abstract class LoginWindowLayout extends JDialog {
rdoLoginType[2] = new JRadioButton("Direkter Zugang zum Satelliten");
btnSettings = new JButton("Einstellungen");
btnLogDir = new JButton("Logverzeichnis");
+ btnUpdateCheck = new JButton("Update");
cboOrganization = new ComboBox<>(new ComboBoxRenderer<Organization>() {
@Override
@@ -173,6 +175,7 @@ public abstract class LoginWindowLayout extends JDialog {
p.setBorder(new TitledBorder(ADVANCED_LABEL));
p.add(btnSettings);
p.add(btnLogDir);
+ p.add(btnUpdateCheck);
return p;
}