未验证 提交 2bace2bd 编写于 作者: S Skylot

fix(gui): disable `shell folders` in file open dialog (#1709)

上级 1a9cb832
......@@ -12,6 +12,7 @@ import java.util.List;
import javax.swing.JDialog;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import javax.swing.filechooser.FileNameExtensionFilter;
import jadx.api.plugins.utils.CommonFileUtils;
......@@ -22,10 +23,16 @@ import jadx.gui.utils.NLS;
class CustomFileChooser extends JFileChooser {
static {
// disable left shortcut panel, can crush in "Win32ShellFolderManager2.getNetwork()" or similar call
UIManager.put("FileChooser.noPlacesBar", Boolean.TRUE);
}
private final FileDialogWrapper data;
public CustomFileChooser(FileDialogWrapper data) {
super(data.getCurrentDir() == null ? CommonFileUtils.CWD : data.getCurrentDir().toFile());
putClientProperty("FileChooser.useShellFolder", Boolean.FALSE);
this.data = data;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册