Define 'ul destination' as dropped folder
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
230dece91f
commit
e176460061
3 changed files with 13 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
|
|
||||||
Copyright "2022" Dmitry Isaenko
|
Copyright 2022-2023 Dmitry Isaenko
|
||||||
|
|
||||||
This file is part of Tihwin.
|
This file is part of Tihwin.
|
||||||
|
|
||||||
|
@ -36,5 +36,10 @@ public class AwesomeMediator {
|
||||||
INSTANCE.mainAppUi.notifySplitFinished();
|
INSTANCE.mainAppUi.notifySplitFinished();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setDiskImage(File file){INSTANCE.mainAppUi.setDiskImageFile(file);}
|
public static void setDiskImage(File file){
|
||||||
|
INSTANCE.mainAppUi.setDiskImageFile(file);
|
||||||
|
}
|
||||||
|
public static void setDestination(File folder){
|
||||||
|
INSTANCE.mainAppUi.setDestinationDir(folder);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2022 Dmitry Isaenko
|
Copyright 2022-2023 Dmitry Isaenko
|
||||||
|
|
||||||
This file is part of Tihwin.
|
This file is part of Tihwin.
|
||||||
|
|
||||||
|
@ -152,7 +152,7 @@ public class MainAppUi extends JFrame {
|
||||||
setDestinationDir(fileChooser.getSelectedFile());
|
setDestinationDir(fileChooser.getSelectedFile());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setDestinationDir(File folder) {
|
public void setDestinationDir(File folder) {
|
||||||
destinationDirectoryLbl.setText(folder.getAbsolutePath());
|
destinationDirectoryLbl.setText(folder.getAbsolutePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,8 +46,10 @@ public class FilesDropListener extends DropTargetAdapter {
|
||||||
List<File> files = (List<File>) transferable.getTransferData(DataFlavor.javaFileListFlavor);
|
List<File> files = (List<File>) transferable.getTransferData(DataFlavor.javaFileListFlavor);
|
||||||
|
|
||||||
for (File file : files) {
|
for (File file : files) {
|
||||||
if (file.isDirectory())
|
if (file.isDirectory()){
|
||||||
continue;
|
AwesomeMediator.setDestination(file);
|
||||||
|
break;
|
||||||
|
}
|
||||||
// Pick up first ISO file found and drop iteration
|
// Pick up first ISO file found and drop iteration
|
||||||
if (file.getName().toLowerCase().endsWith(".iso")) {
|
if (file.getName().toLowerCase().endsWith(".iso")) {
|
||||||
AwesomeMediator.setDiskImage(file);
|
AwesomeMediator.setDiskImage(file);
|
||||||
|
|
Loading…
Reference in a new issue