git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
limit images in scrollback
[fanfix.git]
/
src
/
jexer
/
TFileOpenBox.java
diff --git
a/src/jexer/TFileOpenBox.java
b/src/jexer/TFileOpenBox.java
index ac23cfd13557e58100bee15a9a878ecb55157b6d..a2cc0cf7e48f2e68efebfefec3c66d14775796c9 100644
(file)
--- a/
src/jexer/TFileOpenBox.java
+++ b/
src/jexer/TFileOpenBox.java
@@
-47,7
+47,7
@@
import static jexer.TKeypress.*;
*
* <pre>
* {@code
*
* <pre>
* {@code
- * filename =
application.
fileOpenBox("/path/to/file.ext",
+ * filename = fileOpenBox("/path/to/file.ext",
* TFileOpenBox.Type.OPEN);
* if (filename != null) {
* ... the user selected a file, go open it ...
* TFileOpenBox.Type.OPEN);
* if (filename != null) {
* ... the user selected a file, go open it ...
@@
-185,6
+185,7
@@
public class TFileOpenBox extends TWindow {
File selectedDir = ((TDirectoryTreeItem) item).getFile();
try {
directoryList.setPath(selectedDir.getCanonicalPath());
File selectedDir = ((TDirectoryTreeItem) item).getFile();
try {
directoryList.setPath(selectedDir.getCanonicalPath());
+ entryField.setText(selectedDir.getCanonicalPath());
if (type == Type.OPEN) {
openButton.setEnabled(false);
}
if (type == Type.OPEN) {
openButton.setEnabled(false);
}
@@
-391,7
+392,7
@@
public class TFileOpenBox extends TWindow {
private void checkFilename(final String newFilename) throws IOException {
File newFile = new File(newFilename);
if (newFile.exists()) {
private void checkFilename(final String newFilename) throws IOException {
File newFile = new File(newFilename);
if (newFile.exists()) {
- if (newFile.isFile()) {
+ if (newFile.isFile()
|| (type == Type.SELECT)
) {
filename = newFilename;
getApplication().closeWindow(this);
return;
filename = newFilename;
getApplication().closeWindow(this);
return;