Author: jflesch
Date: 2006-07-16 18:53:46 +0000 (Sun, 16 Jul 2006)
New Revision: 9638
Modified:
trunk/apps/Thaw/src/thaw/core/FileChooser.java
trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties
trunk/apps/Thaw/src/thaw/plugins/fetchPlugin/FetchPanel.java
Log:
Remember the last folder where downloaded files were saved
Modified: trunk/apps/Thaw/src/thaw/core/FileChooser.java
===================================================================
--- trunk/apps/Thaw/src/thaw/core/FileChooser.java 2006-07-16 18:23:17 UTC
(rev 9637)
+++ trunk/apps/Thaw/src/thaw/core/FileChooser.java 2006-07-16 18:53:46 UTC
(rev 9638)
@@ -15,6 +15,10 @@
fileChooser = new JFileChooser();
}
+ public FileChooser(String path) {
+ fileChooser = new JFileChooser(path);
+ }
+
public void setTitle(String title) {
fileChooser.setDialogTitle(title);
}
Modified: trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties
===================================================================
--- trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties 2006-07-16 18:23:17 UTC
(rev 9637)
+++ trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties 2006-07-16 18:53:46 UTC
(rev 9638)
@@ -53,7 +53,7 @@
thaw.common.unspecified=Non sp?cifi?
thaw.common.unknown=Inconnu
thaw.common.estimation=estimation
-thaw.common.failed=ECHOUE
+thaw.common.failed=ECHEC
## Errors
thaw.error.idAlreadyUsed=Impossible de se connecter. Notre Id est d?j? utilis?
par un autre client connect? au noeud.
Modified: trunk/apps/Thaw/src/thaw/plugins/fetchPlugin/FetchPanel.java
===================================================================
--- trunk/apps/Thaw/src/thaw/plugins/fetchPlugin/FetchPanel.java
2006-07-16 18:23:17 UTC (rev 9637)
+++ trunk/apps/Thaw/src/thaw/plugins/fetchPlugin/FetchPanel.java
2006-07-16 18:53:46 UTC (rev 9638)
@@ -157,6 +157,8 @@
dstChoosePanel.setLayout(new GridLayout(3,1, 5, 5));
destinationField = new JTextField("");
+ if(core.getConfig().getValue("lastDestinationDirectory") !=
null)
+
destinationField.setText(core.getConfig().getValue("lastDestinationDirectory"));
destinationField.setEditable(false);
destinationButton = new
JButton(I18n.getMessage("thaw.plugin.fetch.chooseDestination"));
@@ -213,7 +215,9 @@
new thaw.core.WarningWindow(core, "You must
choose a destination");
return;
}
+
+
/*
fetchPlugin.fetchFiles(fileList.getText().split("\n"),
priority, persistence,
globalQueue,
@@ -229,9 +233,16 @@
if(e.getSource() == destinationButton) {
- FileChooser fileChooser = new FileChooser();
+ FileChooser fileChooser;
+
+ if(destinationField.getText() != null &&
!destinationField.getText().equals("")) {
+ fileChooser = new
FileChooser(destinationField.getText());
+ } else {
+ fileChooser = new FileChooser();
+ }
+
File dir = null;
-
+
fileChooser.setTitle(I18n.getMessage("thaw.plugin.fetch.destinationDirectory"));
fileChooser.setDirectoryOnly(true);
fileChooser.setDialogType(JFileChooser.SAVE_DIALOG);
@@ -244,6 +255,8 @@
}
destinationField.setText(dir.getPath());
+ core.getConfig().setValue("lastDestinationDirectory",
destinationField.getText());
+
}
if(e.getSource() == loadListButton) {