mirror of
https://github.com/tonikelope/megabasterd.git
synced 2025-05-22 19:09:05 +02:00
7.58
Regression fix 7.56 and 7.57 in upload filegrabber dialog MUST UPDATE
This commit is contained in:
parent
431f047c8e
commit
59ffd33c3e
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.tonikelope</groupId>
|
||||
<artifactId>MegaBasterd</artifactId>
|
||||
<version>7.57</version>
|
||||
<version>7.58</version>
|
||||
<packaging>jar</packaging>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
@ -596,7 +596,7 @@ public class FileGrabberDialog extends javax.swing.JDialog {
|
||||
if (filechooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION && filechooser.getSelectedFile().canRead()) {
|
||||
|
||||
THREAD_POOL.execute(() -> {
|
||||
MiscTools.GUIRun(() -> {
|
||||
MiscTools.GUIRunAndWait(() -> {
|
||||
total_file_size_label.setText("[0 B]");
|
||||
|
||||
_base_path = filechooser.getSelectedFile().getAbsolutePath();
|
||||
@ -607,14 +607,20 @@ public class FileGrabberDialog extends javax.swing.JDialog {
|
||||
|
||||
dir_name_label.setEnabled(true);
|
||||
});
|
||||
|
||||
DefaultMutableTreeNode root = new DefaultMutableTreeNode(filechooser.getSelectedFile().getAbsolutePath());
|
||||
|
||||
_genFileTree(filechooser.getSelectedFile().getAbsolutePath(), root, null);
|
||||
|
||||
DefaultTreeModel tree_model = new DefaultTreeModel(sortTree(root));
|
||||
MiscTools.GUIRun(() -> {
|
||||
|
||||
MiscTools.GUIRunAndWait(() -> {
|
||||
file_tree.setModel(tree_model);
|
||||
});
|
||||
|
||||
_genFileList();
|
||||
MiscTools.GUIRun(() -> {
|
||||
|
||||
MiscTools.GUIRunAndWait(() -> {
|
||||
add_files_button.setEnabled(true);
|
||||
|
||||
add_folder_button.setEnabled(true);
|
||||
|
@ -58,7 +58,7 @@ import javax.swing.UIManager;
|
||||
*/
|
||||
public final class MainPanel {
|
||||
|
||||
public static final String VERSION = "7.57";
|
||||
public static final String VERSION = "7.58";
|
||||
public static final boolean FORCE_SMART_PROXY = false; //TRUE FOR DEBUGING SMART PROXY
|
||||
public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
|
||||
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;
|
||||
|
@ -93,10 +93,16 @@ public class MiscTools {
|
||||
} else if (!a.isLeaf() && b.isLeaf()) {
|
||||
return -1;
|
||||
} else {
|
||||
String sa = (String) ((Map) a.getUserObject()).get("name");
|
||||
String sb = (String) ((Map) b.getUserObject()).get("name");
|
||||
|
||||
return MiscTools.naturalCompare(sa, sb, true);
|
||||
Object ca = a.getUserObject();
|
||||
|
||||
Object cb = b.getUserObject();
|
||||
|
||||
if (ca instanceof String) {
|
||||
return MiscTools.naturalCompare((String) ca, (String) cb, true);
|
||||
} else {
|
||||
return MiscTools.naturalCompare((String) ((Map) ca).get("name"), (String) ((Map) cb).get("name"), true);
|
||||
}
|
||||
}
|
||||
};
|
||||
private static final Logger LOG = Logger.getLogger(MiscTools.class.getName());
|
||||
|
Loading…
x
Reference in New Issue
Block a user