diff options
| author | Michael Wilson | 2014-11-20 19:10:10 +0100 |
|---|---|---|
| committer | Michael Wilson | 2014-11-20 19:10:10 +0100 |
| commit | c067221e05dcf17d6b86772b1135640d14cfcd28 (patch) | |
| tree | 42a1dcac2c293fc5a8e2eefb85289ad6ff70a065 /dozentenmodul/src/main/java/gui/image/FTPEditDownloader_GUI.java | |
| parent | Lists now have the functionality to show complete lists, when role=="Admin" (diff) | |
| parent | • replaced getText() with getText().trim() (diff) | |
| download | tutor-module-c067221e05dcf17d6b86772b1135640d14cfcd28.tar.gz tutor-module-c067221e05dcf17d6b86772b1135640d14cfcd28.tar.xz tutor-module-c067221e05dcf17d6b86772b1135640d14cfcd28.zip | |
Merge branch 'master' of ssh://git.openslx.org/openslx-ng/tutor-module
Diffstat (limited to 'dozentenmodul/src/main/java/gui/image/FTPEditDownloader_GUI.java')
| -rw-r--r-- | dozentenmodul/src/main/java/gui/image/FTPEditDownloader_GUI.java | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/dozentenmodul/src/main/java/gui/image/FTPEditDownloader_GUI.java b/dozentenmodul/src/main/java/gui/image/FTPEditDownloader_GUI.java index b80ba12f..a3e4c6cf 100644 --- a/dozentenmodul/src/main/java/gui/image/FTPEditDownloader_GUI.java +++ b/dozentenmodul/src/main/java/gui/image/FTPEditDownloader_GUI.java @@ -107,6 +107,13 @@ public class FTPEditDownloader_GUI extends JFrame implements * Create the frame. */ public FTPEditDownloader_GUI(Component formerGUI) { + + try { + client.setTokenForSession(SessionData.session.getAuthToken()); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } final Object[] options = { "Beenden", "Abbrechen" }; @@ -198,7 +205,7 @@ public class FTPEditDownloader_GUI extends JFrame implements lblPath.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent arg0) { - if (lblPath.getText() == null) { + if (lblPath.getText().trim().trim() == null) { // wenn leer, dann upload button nicht freigeben btnDownloadStarten.setEnabled(false); btnDownloadStarten.setText("Bitte warten"); @@ -473,7 +480,7 @@ public class FTPEditDownloader_GUI extends JFrame implements }// end else // always save download path - File f = new File(lblPath.getText()); + File f = new File(lblPath.getText().trim().trim()); if (f.isDirectory()) { Config.setLastDownloadPath(f.toString()); } else if (f.getParentFile().isDirectory()) { @@ -498,13 +505,6 @@ public class FTPEditDownloader_GUI extends JFrame implements } }); menuBar.add(mnNewMenu_Info); - - try { - client.setTokenForSession(SessionData.session.getAuthToken()); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } c = this; @@ -534,7 +534,7 @@ public class FTPEditDownloader_GUI extends JFrame implements } task = new DownloadTask(host, port, user.userName, user.password, - downloadFile, lblPath.getText()); + downloadFile, lblPath.getText().trim().trim()); task.addPropertyChangeListener(this); task.execute(); taskrun = true; @@ -598,8 +598,8 @@ public class FTPEditDownloader_GUI extends JFrame implements public boolean isCurrentlyLoading() { isCurrentlyLoading = false; - if (lblVerbleibend.getText().equals("0 MB") - || lblVerbleibend.getText().equals("0")) { + if (lblVerbleibend.getText().trim().trim().equals("0 MB") + || lblVerbleibend.getText().trim().trim().equals("0")) { isCurrentlyLoading = false; } else { isCurrentlyLoading = true; |
