summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java
diff options
context:
space:
mode:
authorStephan Schwaer2015-08-11 15:55:16 +0200
committerStephan Schwaer2015-08-11 15:55:16 +0200
commite6a8d59d401a878ca3f8f4cd1cfb207925f5c286 (patch)
treed47d42162c5b4fa8d1f9d1012a87cff0c024a942 /dozentenmodul/src/main/java
parent[client] lecture wizard quasi complete (diff)
downloadtutor-module-e6a8d59d401a878ca3f8f4cd1cfb207925f5c286.tar.gz
tutor-module-e6a8d59d401a878ca3f8f4cd1cfb207925f5c286.tar.xz
tutor-module-e6a8d59d401a878ca3f8f4cd1cfb207925f5c286.zip
[client] Refined download of image a bit.
Diffstat (limited to 'dozentenmodul/src/main/java')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java11
1 files changed, 5 insertions, 6 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 0e000011..c5af467c 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
@@ -88,7 +88,7 @@ public class ImageListWindow extends ImageListWindowLayout {
startLectureWizard();
}
if (e.getSource().equals(popupItemDownload)) {
- performImageDownload();
+ performImageDownload(imageTable.getSelectedItem().getLatestVersionId());
LOGGER.debug("Download image clicked");
}
if (e.getSource().equals(popupItemDelete)) {
@@ -155,7 +155,7 @@ public class ImageListWindow extends ImageListWindowLayout {
downloadButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
- performImageDownload();
+ performImageDownload(imageTable.getSelectedItem().latestVersionId);
}
});
@@ -259,7 +259,7 @@ public class ImageListWindow extends ImageListWindowLayout {
refreshList(false);
}
- private void performImageDownload() {
+ private void performImageDownload(String versionId) {
FileChooser fc = new FileChooser(false);
int action = fc.showOpenDialog(me);
File file = fc.getSelectedFile();
@@ -267,7 +267,7 @@ public class ImageListWindow extends ImageListWindowLayout {
return;
TransferInformation transInf = null;
try {
- transInf = ThriftManager.getSatClient().requestDownload(Session.getSatelliteToken(), imageTable.getSelectedItem().latestVersionId);
+ transInf = ThriftManager.getSatClient().requestDownload(Session.getSatelliteToken(), versionId);
} catch ( TException e) {
LOGGER.error("Failed to get transfer information: ", e);
return;
@@ -280,8 +280,8 @@ public class ImageListWindow extends ImageListWindowLayout {
DownloadTask dlTask = new DownloadTask(Session.getSatelliteAddress(), transInf.getPlainPort(), transInf.getToken(), new File(file.getAbsolutePath() + "/HanneloreKraft"), imageTable.getSelectedItem().getFileSize(), null);
} catch (FileNotFoundException e) {
LOGGER.error("Got transfer information but failed to download: ", e);
+ return;
}
- LOGGER.info(file.getAbsolutePath());
}
private void applyFilterTable(){
@@ -300,7 +300,6 @@ public class ImageListWindow extends ImageListWindowLayout {
case 1:
// filter for owner
String userFilter = FormatHelper.userName(UserCache.find(Session.getUserId()));
- LOGGER.info(userFilter);
filters.add(RowFilter.regexFilter("(?i)"+userFilter, 2));
break;
case 2: