mirror of
https://github.com/KOHGYLW/kiftd-source.git
synced 2025-01-09 04:27:56 +08:00
update to v1.2.0 “文件”中增加了双击快速预留功能
This commit is contained in:
parent
f13cea1e21
commit
6198d149ce
@ -14,7 +14,6 @@ import java.awt.dnd.DropTargetListener;
|
|||||||
import java.awt.event.MouseEvent;
|
import java.awt.event.MouseEvent;
|
||||||
import java.awt.event.MouseListener;
|
import java.awt.event.MouseListener;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -319,30 +318,26 @@ public class FSViewer extends KiftdDynamicWindow {
|
|||||||
fsd.show();
|
fsd.show();
|
||||||
});
|
});
|
||||||
t.start();
|
t.start();
|
||||||
try {
|
SwingUtilities.invokeLater(() -> {
|
||||||
boolean exportSuccess = FileSystemManager.getInstance().exportTo(
|
try {
|
||||||
new String[0], new String[] { n.getFileId() }, previewDir, null);
|
boolean exportSuccess = FileSystemManager.getInstance().exportTo(
|
||||||
fsd.close();
|
new String[0], new String[] { n.getFileId() }, previewDir,
|
||||||
SwingUtilities.invokeLater(() -> {
|
null);
|
||||||
// 后续操作需等待进度条关闭后再进行,避免卡死
|
fsd.close();
|
||||||
if (exportSuccess) {
|
if (exportSuccess) {
|
||||||
// 如果导出成功,将此文件设置为“只读”并以系统默认方式打开
|
// 如果导出成功,将此文件设置为“只读”并以系统默认方式打开
|
||||||
File pf = new File(previewDir, n.getFileName());
|
File pf = new File(previewDir, n.getFileName());
|
||||||
if (pf.isFile() && pf.setReadOnly()) {
|
if (pf.isFile() && pf.setReadOnly()) {
|
||||||
try {
|
Desktop.getDesktop().open(pf);
|
||||||
Desktop.getDesktop().open(pf);
|
|
||||||
} catch (IOException e1) {
|
|
||||||
Printer.instance.print(e1.toString());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
} catch (Exception e1) {
|
||||||
} catch (Exception e1) {
|
fsd.close();
|
||||||
fsd.close();
|
Printer.instance.print(e1.toString());
|
||||||
Printer.instance.print(e1.toString());
|
JOptionPane.showMessageDialog(window, "导出文件时失败,该操作已被中断,未能全部导出。", "错误",
|
||||||
JOptionPane.showMessageDialog(window, "导出文件时失败,该操作已被中断,未能全部导出。", "错误",
|
JOptionPane.ERROR_MESSAGE);
|
||||||
JOptionPane.ERROR_MESSAGE);
|
}
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#Generated by Maven Integration for Eclipse
|
#Generated by Maven Integration for Eclipse
|
||||||
#Fri Dec 29 14:35:51 CST 2023
|
#Fri Dec 29 14:43:53 CST 2023
|
||||||
m2e.projectLocation=/Users/kohgylw/Programs/java_workspace/kiftd
|
m2e.projectLocation=/Users/kohgylw/Programs/java_workspace/kiftd
|
||||||
m2e.projectName=kiftd
|
m2e.projectName=kiftd
|
||||||
groupId=kohgylw
|
groupId=kohgylw
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user