diff options
author | Jonathan Bauer | 2016-08-30 16:22:00 +0200 |
---|---|---|
committer | Jonathan Bauer | 2016-08-30 16:22:00 +0200 |
commit | a86ce12c98f39f48b3029f53fcf9b6b9af7426f5 (patch) | |
tree | ccccdb1a52c56e9d8e1afd85fdab4376415f3d57 | |
parent | [client] added "expires" column in ImageTable + increased MainWindow width a bit (diff) | |
download | tutor-module-a86ce12c98f39f48b3029f53fcf9b6b9af7426f5.tar.gz tutor-module-a86ce12c98f39f48b3029f53fcf9b6b9af7426f5.tar.xz tutor-module-a86ce12c98f39f48b3029f53fcf9b6b9af7426f5.zip |
[client] fix "Show published images" button not beeing properly initialized
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java | 2 | ||||
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java index 21cb927e..50034bf0 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java @@ -32,6 +32,7 @@ import org.openslx.dozmod.gui.wizard.ImageCreationWizard; import org.openslx.dozmod.gui.wizard.LectureWizard; import org.openslx.dozmod.permissions.ImagePerms; import org.openslx.dozmod.thrift.ImageLocalDetailsActions; +import org.openslx.dozmod.thrift.Session; import org.openslx.dozmod.thrift.ThriftActions; import org.openslx.dozmod.thrift.ThriftActions.DeleteCallback; import org.openslx.dozmod.thrift.ThriftActions.DownloadCallback; @@ -417,6 +418,7 @@ public class ImageListWindow extends ImageListWindowLayout implements DownloadCa // we need to enable the "Show published images" button here, since we need to check // Session.getSatApiVersion() which is not set when this class is instantiated ctlImageListViewer.refreshList(false, 1); + btnShowPublishedImages.setVisible(Session.isImagePublishSupported()); } } diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java index df47ecf1..937c5c3c 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java @@ -78,6 +78,7 @@ public abstract class ImageListWindowLayout extends CompositePage { "New Lecture", ICON_SIZE_Y, buttonPanel)); btnShowPublishedImages = new JButton(showPublishedImagesLabel, Gui.getScaledIconResource("/img/published-vm-icon.png", "Published Lectures", ICON_SIZE_Y, buttonPanel)); + btnShowPublishedImages.setVisible(false); // this gets enabled later when the API version can be queried btnSwitchView = new JButton(switchViewButtonLabel, Gui.getScaledIconResource("/img/switch-icon.png", "Switch", ICON_SIZE_Y, buttonPanel)); buttonPanel.add(btnNewVm); @@ -87,10 +88,8 @@ public abstract class ImageListWindowLayout extends CompositePage { buttonPanel.add(btnDownload); buttonPanel.add(Box.createHorizontalStrut(5)); buttonPanel.add(btnNewLecture); - if (Session.isImagePublishSupported()) { - buttonPanel.add(Box.createHorizontalStrut(5)); - buttonPanel.add(btnShowPublishedImages); - } + buttonPanel.add(Box.createHorizontalStrut(5)); + buttonPanel.add(btnShowPublishedImages); buttonPanel.add(Box.createHorizontalGlue()); buttonPanel.add(btnSwitchView); |