Compare commits

...

7 commits

Author SHA1 Message Date
Dmitry Isaenko
619a2b157e Remove select-folders button, add settings option
Hide 'Select split-files' button when 'Search-for-roms' option enabled in options
Add settings option for this
Update l10n
Update icons, correct css.
2020-11-29 17:19:57 +03:00
Dmitry Isaenko
0a8440ef34 Minor corrections to wolfposd's implementation 2020-11-29 02:18:35 +03:00
Dmitry Isaenko
dcabf76522
Merge pull request #82 from wolfposd/master
allows adding files and folders via filechooser and drag and drop #51
2020-11-29 00:12:11 +03:00
Wolf Posdorfer
112a0f80e0 tooltips for a great user experience =) 2020-11-24 20:05:18 +01:00
Wolf Posdorfer
2936d65a31 looking through the whole hdd takes time, peform on background, update list on ui-thread 2020-11-24 19:54:06 +01:00
Wolf Posdorfer
b2202cf483 Reverting FileChooser and adding DirChooser
- old filechooser
- directory chooser can choose any directory and recursively adds all *.xyz files
- add button template
2020-11-24 19:12:19 +01:00
Wolf Posdorfer
503aa8cbe2 allows adding files and folders via filechooser and drag and drop
need to switch to JFileChooser, as javafx filechooser doesnt allow files+folders selection
selection folders (filechooser/dragndrop) now recursively walks the directory and adds every file.xyz it finds
2020-11-21 17:32:11 +01:00
23 changed files with 305 additions and 74 deletions

View file

@ -102,6 +102,9 @@ public class AppPreferences {
public boolean getAutoCheckUpdates(){return preferences.getBoolean("AUTOCHECK4UPDATES", false); }
public void setAutoCheckUpdates(boolean prop){preferences.putBoolean("AUTOCHECK4UPDATES", prop); }
public boolean getDirectoriesChooserForRoms(){return preferences.getBoolean("dirchooser4roms", false); }
public void setDirectoriesChooserForRoms(boolean prop){preferences.putBoolean("dirchooser4roms", prop); }
public boolean getTfXCI(){return preferences.getBoolean("TF_XCI", true);}
public void setTfXCI(boolean prop){ preferences.putBoolean("TF_XCI", prop); }

View file

@ -1,5 +1,5 @@
/*
Copyright 2019-2020 Dmitry Isaenko
Copyright 2019-2020 Dmitry Isaenko, wolfposd
This file is part of NS-USBloader.
@ -18,6 +18,7 @@
*/
package nsusbloader.Controllers;
import javafx.application.Platform;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
@ -40,11 +41,19 @@ import nsusbloader.ServiceWindow;
import java.io.File;
import java.net.URL;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.ResourceBundle;
import java.util.function.Consumer;
import java.util.function.Supplier;
public class GamesController implements Initializable {
private static final String REGEX_ONLY_NSP = ".*\\.nsp$";
private static final String REGEX_ALLFILES_TINFOIL = ".*\\.(nsp$|xci$|nsz$|xcz$)";
private static final String REGEX_ALLFILES = ".*";
@FXML
private AnchorPane usbNetPane;
@ -62,7 +71,7 @@ public class GamesController implements Initializable {
@FXML
private Button selectNspBtn, selectSplitNspBtn, uploadStopBtn;
private String previouslyOpenedPath;
private Region btnUpStopImage;
private Region btnUpStopImage, btnSelectImage;
private ResourceBundle resourceBundle;
private CancellableRunnable usbNetCommunications;
private Thread workThread;
@ -70,11 +79,12 @@ public class GamesController implements Initializable {
@Override
public void initialize(URL url, ResourceBundle resourceBundle) {
this.resourceBundle = resourceBundle;
AppPreferences preferences = AppPreferences.getInstance();
ObservableList<String> choiceProtocolList = FXCollections.observableArrayList("TinFoil", "GoldLeaf");
choiceProtocol.setItems(choiceProtocolList);
choiceProtocol.getSelectionModel().select(AppPreferences.getInstance().getProtocol());
choiceProtocol.getSelectionModel().select(preferences.getProtocol());
choiceProtocol.setOnAction(e-> {
tableFilesListController.setNewProtocol(getSelectedProtocol());
if (getSelectedProtocol().equals("GoldLeaf")) {
@ -97,7 +107,7 @@ public class GamesController implements Initializable {
ObservableList<String> choiceNetUsbList = FXCollections.observableArrayList("USB", "NET");
choiceNetUsb.setItems(choiceNetUsbList);
choiceNetUsb.getSelectionModel().select(AppPreferences.getInstance().getNetUsb());
choiceNetUsb.getSelectionModel().select(preferences.getNetUsb());
if (getSelectedProtocol().equals("GoldLeaf")) {
choiceNetUsb.setDisable(true);
choiceNetUsb.getSelectionModel().select("USB");
@ -113,7 +123,7 @@ public class GamesController implements Initializable {
}
});
// Set and configure NS IP field behavior
nsIpTextField.setText(AppPreferences.getInstance().getNsIp());
nsIpTextField.setText(preferences.getNsIp());
if (getSelectedProtocol().equals("TinFoil") && getSelectedNetUsb().equals("NET")){
nsIpLbl.setVisible(true);
nsIpTextField.setVisible(true);
@ -130,16 +140,15 @@ public class GamesController implements Initializable {
switchThemeBtn.setGraphic(btnSwitchImage);
this.switchThemeBtn.setOnAction(e->switchTheme());
uploadStopBtn.setDisable(getSelectedProtocol().equals("TinFoil"));
selectNspBtn.setOnAction(e-> selectFilesBtnAction());
selectNspBtn.getStyleClass().add("buttonSelect");
this.btnSelectImage = new Region();
setFilesSelectorButtonBehaviour(preferences.getDirectoriesChooserForRoms());
selectSplitNspBtn.setOnAction(e-> selectSplitBtnAction());
selectSplitNspBtn.getStyleClass().add("buttonSelect");
uploadStopBtn.setOnAction(e-> uploadBtnAction());
selectNspBtn.getStyleClass().add("buttonSelect");
uploadStopBtn.setDisable(getSelectedProtocol().equals("TinFoil"));
this.btnUpStopImage = new Region();
btnUpStopImage.getStyleClass().add("regionUpload");
@ -147,7 +156,7 @@ public class GamesController implements Initializable {
uploadStopBtn.getStyleClass().add("buttonUp");
uploadStopBtn.setGraphic(btnUpStopImage);
this.previouslyOpenedPath = AppPreferences.getInstance().getRecent();
this.previouslyOpenedPath = preferences.getRecent();
}
/**
* Changes UI theme on the go
@ -186,32 +195,135 @@ public class GamesController implements Initializable {
return nsIpTextField.getText();
}
private boolean isGoldLeaf() {
return getSelectedProtocol().equals("GoldLeaf");
}
private boolean isTinfoil() {
return getSelectedProtocol().equals("TinFoil");
}
private boolean isAllFiletypesAllowedForGL() {
return ! MediatorControl.getInstance().getSettingsController().getGoldleafSettings().getNSPFileFilterForGL();
}
private boolean isXciNszXczSupport() {
return MediatorControl.getInstance().getSettingsController().getTinfoilSettings().isXciNszXczSupport();
}
/**
* regex for selected program and selected file filter </br>
* tinfoil + xcinszxcz </br>
* tinfoil + nsponly </br>
* goldleaf </br>
* etc..
*/
private String getRegexForFiles() {
if (isTinfoil() && isXciNszXczSupport())
return REGEX_ALLFILES_TINFOIL;
else if (isGoldLeaf() && isAllFiletypesAllowedForGL())
return REGEX_ALLFILES;
else
return REGEX_ONLY_NSP;
}
private String getRegexForFolders() {
final String regexForFiles = getRegexForFiles();
if (regexForFiles.equals(REGEX_ALLFILES))
return REGEX_ALLFILES_TINFOIL;
else
return regexForFiles;
}
/**
* Functionality for selecting NSP button.
* */
private void selectFilesBtnAction(){
List<File> filesList;
*/
private void selectFilesBtnAction() {
FileChooser fileChooser = new FileChooser();
fileChooser.setTitle(resourceBundle.getString("btn_OpenFile"));
fileChooser.setInitialDirectory(new File(FilesHelper.getRealFolder(previouslyOpenedPath)));
if (getSelectedProtocol().equals("TinFoil") && MediatorControl.getInstance().getContoller().getSettingsCtrlr().getTinfoilSettings().isXciNszXczSupport())
if (isTinfoil() && isXciNszXczSupport()) {
fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("NSP/XCI/NSZ/XCZ", "*.nsp", "*.xci", "*.nsz", "*.xcz"));
else if (getSelectedProtocol().equals("GoldLeaf") && (! MediatorControl.getInstance().getContoller().getSettingsCtrlr().getGoldleafSettings().getNSPFileFilterForGL()))
}
else if (isGoldLeaf() && isAllFiletypesAllowedForGL()) {
fileChooser.getExtensionFilters().addAll(new FileChooser.ExtensionFilter("Any file", "*.*"),
new FileChooser.ExtensionFilter("NSP ROM", "*.nsp")
);
else
new FileChooser.ExtensionFilter("NSP ROM", "*.nsp"));
}
else {
fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("NSP ROM", "*.nsp"));
}
filesList = fileChooser.showOpenMultipleDialog(usbNetPane.getScene().getWindow());
List<File> filesList = fileChooser.showOpenMultipleDialog(usbNetPane.getScene().getWindow());
if (filesList != null && !filesList.isEmpty()) {
tableFilesListController.setFiles(filesList);
uploadStopBtn.setDisable(false);
previouslyOpenedPath = filesList.get(0).getParent();
}
}
/**
* Functionality for selecting folders button.
* will scan all folders recursively for nsp-files
*/
private void selectFoldersBtnAction() {
DirectoryChooser chooser = new DirectoryChooser();
chooser.setTitle(resourceBundle.getString("btn_OpenFolders"));
chooser.setInitialDirectory(new File(FilesHelper.getRealFolder(previouslyOpenedPath)));
File startFolder = chooser.showDialog(usbNetPane.getScene().getWindow());
performInBackgroundAndUpdate(() -> {
final List<File> allFiles = new ArrayList<>();
collectFiles(allFiles, startFolder, getRegexForFiles(), getRegexForFolders());
return allFiles;
}, (files) -> {
if (!files.isEmpty()) {
tableFilesListController.setFiles(files);
uploadStopBtn.setDisable(false);
previouslyOpenedPath = startFolder.getParent();
}
});
}
/**
* used to recursively walk all directories, every file will be added to the storage list
* @param storage used to hold files
* @param startFolder where to start
* @param filesRegex for filenames
*/
// TODO: Too sophisticated. Should be moved to simple class to keep things simplier
private void collectFiles(List<File> storage,
File startFolder,
final String filesRegex,
final String foldersRegex)
{
if (startFolder == null)
return;
final String startFolderNameInLowercase = startFolder.getName().toLowerCase();
if (startFolder.isFile()) {
if (startFolderNameInLowercase.matches(filesRegex)) {
storage.add(startFolder);
}
return;
}
if (startFolderNameInLowercase.matches(foldersRegex)) {
storage.add(startFolder);
return;
}
File[] files = startFolder.listFiles();
if (files == null)
return;
for (File file : files)
collectFiles(storage, file, filesRegex, foldersRegex);
}
/**
* Functionality for selecting Split NSP button.
* */
@ -257,7 +369,7 @@ public class GamesController implements Initializable {
nspToUpload = new LinkedList<>();
}
SettingsController settings = MediatorControl.getInstance().getContoller().getSettingsCtrlr();
SettingsController settings = MediatorControl.getInstance().getSettingsController();
// If USB selected
if (getSelectedProtocol().equals("GoldLeaf") ){
final SettingsBlockGoldleafController goldleafSettings = settings.getGoldleafSettings();
@ -324,25 +436,27 @@ public class GamesController implements Initializable {
* Drag-n-drop support (drop consumer)
* */
@FXML
private void handleDrop(DragEvent event){
List<File> filesDropped = event.getDragboard().getFiles();
SettingsController settingsController = MediatorControl.getInstance().getContoller().getSettingsCtrlr();
SettingsBlockTinfoilController tinfoilSettings = settingsController.getTinfoilSettings();
SettingsBlockGoldleafController goldleafController = settingsController.getGoldleafSettings();
private void handleDrop(DragEvent event) {
final String regexForFiles = getRegexForFiles();
final String regexForFolders = getRegexForFolders();
if (getSelectedProtocol().equals("TinFoil") && tinfoilSettings.isXciNszXczSupport())
filesDropped.removeIf(file -> ! file.getName().toLowerCase().matches("(.*\\.nsp$)|(.*\\.xci$)|(.*\\.nsz$)|(.*\\.xcz$)"));
else if (getSelectedProtocol().equals("GoldLeaf") && (! goldleafController.getNSPFileFilterForGL()))
filesDropped.removeIf(file -> (file.isDirectory() && ! file.getName().toLowerCase().matches(".*\\.nsp$")));
else
filesDropped.removeIf(file -> ! file.getName().toLowerCase().matches(".*\\.nsp$"));
List<File> files = event.getDragboard().getFiles();
if ( ! filesDropped.isEmpty() )
tableFilesListController.setFiles(filesDropped);
performInBackgroundAndUpdate(() -> {
List<File> allFiles = new ArrayList<>();
if (files != null && files.size() != 0) {
files.forEach(f -> collectFiles(allFiles, f, regexForFiles, regexForFolders));
}
return allFiles;
}, allFiles -> {
if (!allFiles.isEmpty())
tableFilesListController.setFiles(allFiles);
event.setDropCompleted(true);
event.consume();
event.setDropCompleted(true);
event.consume();
});
}
/**
* This thing modify UI for reusing 'Upload to NS' button and make functionality set for "Stop transmission"
* Called from mediator
@ -384,6 +498,37 @@ public class GamesController implements Initializable {
else
uploadStopBtn.setDisable(false);
}
/**
* Utility function to perform a task in the background and pass the results to a task on the javafx-ui-thread
* @param background performed in background
* @param update performed with results on ui-thread
*/
private <T> void performInBackgroundAndUpdate(Supplier<T> background, Consumer<T> update) {
new Thread(() -> {
final T result = background.get();
Platform.runLater(() -> update.accept(result));
}).start();
}
public void updateFilesSelectorButtonBehaviour(boolean isDirectoryChooser){
btnSelectImage.getStyleClass().clear();
setFilesSelectorButtonBehaviour(isDirectoryChooser);
}
private void setFilesSelectorButtonBehaviour(boolean isDirectoryChooser){
if (isDirectoryChooser){
selectNspBtn.setOnAction(e -> selectFoldersBtnAction());
btnSelectImage.getStyleClass().add("regionScanFolders");
selectSplitNspBtn.setVisible(false);
}
else {
selectNspBtn.setOnAction(e -> selectFilesBtnAction());
btnSelectImage.getStyleClass().add("regionSelectFiles");
selectSplitNspBtn.setVisible(true);
}
selectNspBtn.setGraphic(btnSelectImage);
//selectFolderBtn.setTooltip(new Tooltip(resourceBundle.getString("btn_OpenFolders_tooltip")));
}
/**
* Get 'Recent' path
*/
@ -399,4 +544,4 @@ public class GamesController implements Initializable {
preferences.setNetUsb(getSelectedNetUsb());
preferences.setNsIp(getNsIp());
}
}
}

View file

@ -41,7 +41,7 @@ public class NSLMainController implements Initializable {
public ProgressBar progressBar; // Accessible from Mediator
@FXML
public GamesController GamesTabController; // Accessible from Mediator | todo: incapsulate
private GamesController GamesTabController; // Accessible from Mediator | todo: incapsulate
@FXML
private SettingsController SettingsTabController;
@FXML

View file

@ -38,8 +38,6 @@ import java.util.List;
import java.util.ResourceBundle;
public class NSTableViewController implements Initializable {
private static final DataFormat SERIALIZED_MIME_TYPE = new DataFormat("application/x-java-serialized-object");
@FXML
private TableView<NSLRowModel> table;
private ObservableList<NSLRowModel> rowsObsLst;
@ -57,7 +55,7 @@ public class NSTableViewController implements Initializable {
if (keyEvent.getCode() == KeyCode.DELETE && !MediatorControl.getInstance().getTransferActive()) {
rowsObsLst.removeAll(table.getSelectionModel().getSelectedItems());
if (rowsObsLst.isEmpty())
MediatorControl.getInstance().getContoller().getGamesCtrlr().disableUploadStopBtn(true); // TODO: change to something better
MediatorControl.getInstance().getGamesController().disableUploadStopBtn(true); // TODO: change to something better
table.refresh();
} else if (keyEvent.getCode() == KeyCode.SPACE) {
for (NSLRowModel item : table.getSelectionModel().getSelectedItems()) {
@ -175,13 +173,13 @@ public class NSTableViewController implements Initializable {
deleteMenuItem.setOnAction(actionEvent -> {
rowsObsLst.remove(row.getItem());
if (rowsObsLst.isEmpty())
MediatorControl.getInstance().getContoller().getGamesCtrlr().disableUploadStopBtn(true); // TODO: change to something better
MediatorControl.getInstance().getGamesController().disableUploadStopBtn(true); // TODO: change to something better
table.refresh();
});
MenuItem deleteAllMenuItem = new MenuItem(resourceBundle.getString("tab1_table_contextMenu_Btn_DeleteAll"));
deleteAllMenuItem.setOnAction(actionEvent -> {
rowsObsLst.clear();
MediatorControl.getInstance().getContoller().getGamesCtrlr().disableUploadStopBtn(true); // TODO: change to something better
MediatorControl.getInstance().getGamesController().disableUploadStopBtn(true); // TODO: change to something better
table.refresh();
});
contextMenu.getItems().addAll(deleteMenuItem, deleteAllMenuItem);
@ -226,7 +224,7 @@ public class NSTableViewController implements Initializable {
}
else {
rowsObsLst.add(new NSLRowModel(file, true));
MediatorControl.getInstance().getContoller().getGamesCtrlr().disableUploadStopBtn(false); // TODO: change to something better
MediatorControl.getInstance().getGamesController().disableUploadStopBtn(false); // TODO: change to something better
}
table.refresh();
}
@ -246,7 +244,7 @@ public class NSTableViewController implements Initializable {
else {
for (File file: newFiles)
rowsObsLst.add(new NSLRowModel(file, true));
MediatorControl.getInstance().getContoller().getGamesCtrlr().disableUploadStopBtn(false); // TODO: change to something better
MediatorControl.getInstance().getGamesController().disableUploadStopBtn(false); // TODO: change to something better
}
//rowsObsLst.get(0).setMarkForUpload(true);
table.refresh();

View file

@ -28,6 +28,7 @@ import javafx.scene.control.ChoiceBox;
import javafx.scene.control.Hyperlink;
import javafx.scene.layout.Region;
import nsusbloader.AppPreferences;
import nsusbloader.MediatorControl;
import nsusbloader.ModelControllers.UpdatesChecker;
import nsusbloader.ServiceWindow;
import nsusbloader.UI.LocaleHolder;
@ -47,7 +48,8 @@ public class SettingsBlockGenericController implements Initializable {
driversInstallBtn,
checkForUpdBtn;
@FXML
private CheckBox autoCheckForUpdatesCB;
private CheckBox autoCheckForUpdatesCB,
direcroriesChooserForRomsCB;
@FXML
private Hyperlink newVersionHyperlink;
@ -61,6 +63,10 @@ public class SettingsBlockGenericController implements Initializable {
final AppPreferences preferences = AppPreferences.getInstance();
autoCheckForUpdatesCB.setSelected(preferences.getAutoCheckUpdates());
direcroriesChooserForRomsCB.setSelected(preferences.getDirectoriesChooserForRoms());
direcroriesChooserForRomsCB.setOnAction(actionEvent ->
MediatorControl.getInstance().getGamesController().updateFilesSelectorButtonBehaviour(direcroriesChooserForRomsCB.isSelected())
);
Region btnSwitchImage = new Region();
btnSwitchImage.getStyleClass().add("regionUpdatesCheck");
@ -124,7 +130,13 @@ public class SettingsBlockGenericController implements Initializable {
ResourceBundle.getBundle("locale", newLocale).getString("windowBodyRestartToApplyLang"));
}
private boolean getAutoCheckForUpdates(){ return autoCheckForUpdatesCB.isSelected(); }
private boolean getAutoCheckForUpdates(){
return autoCheckForUpdatesCB.isSelected();
}
public boolean isDirectoriesChooserForRoms(){
return direcroriesChooserForRomsCB.isSelected();
}
protected void registerHostServices(HostServices hostServices){ this.hostServices = hostServices;}
@ -135,5 +147,6 @@ public class SettingsBlockGenericController implements Initializable {
void updatePreferencesOnExit() {
AppPreferences.getInstance().setAutoCheckUpdates(getAutoCheckForUpdates());
AppPreferences.getInstance().setDirectoriesChooserForRoms(isDirectoriesChooserForRoms());
}
}

View file

@ -151,7 +151,7 @@ public class SplitMergeController implements Initializable {
convertBtn.setOnAction(actionEvent -> setConvertBtnAction());
}
public void notifySmThreadStarted(boolean isStart, EModule type){ // todo: refactor: remove everything, place to separate container and just disable.
public void notifyThreadStarted(boolean isStart, EModule type){ // todo: refactor: remove everything, place to separate container and just disable.
if (! type.equals(EModule.SPLIT_MERGE_TOOL)){
smToolPane.setDisable(isStart);
return;

View file

@ -18,14 +18,15 @@
*/
package nsusbloader;
import nsusbloader.Controllers.NSLMainController;
import nsusbloader.Controllers.*;
import nsusbloader.NSLDataTypes.EModule;
import java.util.ResourceBundle;
import java.util.concurrent.atomic.AtomicBoolean;
public class MediatorControl {
private AtomicBoolean isTransferActive = new AtomicBoolean(false); // Overcoded just for sure
private NSLMainController mainCtrler;
private final AtomicBoolean isTransferActive = new AtomicBoolean(false); // Overcoded just for sure
private NSLMainController mainController;
public static MediatorControl getInstance(){
return MediatorControlHold.INSTANCE;
@ -35,16 +36,26 @@ public class MediatorControl {
private static final MediatorControl INSTANCE = new MediatorControl();
}
public void setController(NSLMainController controller){
this.mainCtrler = controller;
this.mainController = controller;
}
public NSLMainController getContoller(){ return mainController; }
public GamesController getGamesController(){ return mainController.getGamesCtrlr(); };
public SettingsController getSettingsController(){ return mainController.getSettingsCtrlr(); };
public SplitMergeController getSplitMergeController(){ return mainController.getSmCtrlr(); };
public RcmController getRcmController(){ return mainController.getRcmCtrlr(); };
public NxdtController getNxdtController(){ return mainController.getNXDTabController(); };
public ResourceBundle getResourceBundle(){
return mainController.getResourceBundle();
}
public NSLMainController getContoller(){ return this.mainCtrler; }
public synchronized void setBgThreadActive(boolean isActive, EModule appModuleType) {
isTransferActive.set(isActive);
mainCtrler.getGamesCtrlr().notifyThreadStarted(isActive, appModuleType);
mainCtrler.getSmCtrlr().notifySmThreadStarted(isActive, appModuleType);
mainCtrler.getRcmCtrlr().notifyThreadStarted(isActive, appModuleType);
mainCtrler.getNXDTabController().notifyThreadStarted(isActive, appModuleType);
getGamesController().notifyThreadStarted(isActive, appModuleType);
getSplitMergeController().notifyThreadStarted(isActive, appModuleType);
getRcmController().notifyThreadStarted(isActive, appModuleType);
getNxdtController().notifyThreadStarted(isActive, appModuleType);
}
public synchronized boolean getTransferActive() { return this.isTransferActive.get(); }
}

View file

@ -61,7 +61,7 @@ public class MessagesConsumer extends AnimationTimer {
this.progressBar = MediatorControl.getInstance().getContoller().progressBar;
this.statusMap = statusMap;
this.tableViewController = MediatorControl.getInstance().getContoller().GamesTabController.tableFilesListController;
this.tableViewController = MediatorControl.getInstance().getGamesController().tableFilesListController;
this.oneLinerStatus = oneLinerStatus;
@ -100,13 +100,13 @@ public class MessagesConsumer extends AnimationTimer {
switch (appModuleType){
case RCM:
MediatorControl.getInstance().getContoller().getRcmCtrlr().setOneLineStatus(oneLinerStatus.get());
MediatorControl.getInstance().getRcmController().setOneLineStatus(oneLinerStatus.get());
break;
case NXDT:
MediatorControl.getInstance().getContoller().getNXDTabController().setOneLineStatus(oneLinerStatus.get());
MediatorControl.getInstance().getNxdtController().setOneLineStatus(oneLinerStatus.get());
break;
case SPLIT_MERGE_TOOL:
MediatorControl.getInstance().getContoller().getSmCtrlr().setOneLineStatus(oneLinerStatus.get());
MediatorControl.getInstance().getSplitMergeController().setOneLineStatus(oneLinerStatus.get());
break;
}

View file

@ -914,7 +914,7 @@ class GoldLeaf_07 extends TransferModule {
private boolean selectFile(){
File selectedFile = CompletableFuture.supplyAsync(() -> {
FileChooser fChooser = new FileChooser();
fChooser.setTitle(MediatorControl.getInstance().getContoller().getResourceBundle().getString("btn_OpenFile")); // TODO: FIX BAD IMPLEMENTATION
fChooser.setTitle(MediatorControl.getInstance().getResourceBundle().getString("btn_OpenFile")); // TODO: FIX BAD IMPLEMENTATION
fChooser.setInitialDirectory(new File(System.getProperty("user.home"))); // TODO: Consider fixing; not a prio.
fChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("*", "*"));
return fChooser.showOpenDialog(null); // Leave as is for now.

View file

@ -941,7 +941,7 @@ class GoldLeaf_08 extends TransferModule {
private boolean selectFile(){
File selectedFile = CompletableFuture.supplyAsync(() -> {
FileChooser fChooser = new FileChooser();
fChooser.setTitle(MediatorControl.getInstance().getContoller().getResourceBundle().getString("btn_OpenFile")); // TODO: FIX BAD IMPLEMENTATION
fChooser.setTitle(MediatorControl.getInstance().getResourceBundle().getString("btn_OpenFile")); // TODO: FIX BAD IMPLEMENTATION
fChooser.setInitialDirectory(new File(System.getProperty("user.home")));// TODO: Consider fixing; not a prio.
fChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("*", "*"));
return fChooser.showOpenDialog(null); // Leave as is for now.

View file

@ -54,9 +54,6 @@
<HBox.margin>
<Insets />
</HBox.margin>
<graphic>
<SVGPath content="M 8,0 C 6.8954305,0 6,0.8954305 6,2 v 16 c 0,1.1 0.89,2 2,2 h 12 c 1.104569,0 2,-0.895431 2,-2 V 2 C 22,0.90484721 21.089844,0 20,0 Z m 2.1,1.2 h 7.8 C 18,1.20208 18,1.2002604 18,1.3 v 0.1 c 0,0.095833 0,0.097917 -0.1,0.1 H 10.1 C 10,1.5057292 10,1.5036458 10,1.4 V 1.3 C 10,1.20026 10,1.1981771 10.1,1.2 Z M 8,2 h 12 c 0.303385,0 0.5,0.2044271 0.5,0.5 v 12 C 20.5,14.789959 20.29836,15 20,15 H 8 C 7.7044271,15 7.5,14.803385 7.5,14.5 V 2.5 C 7.5,2.2083333 7.7122396,2 8,2 Z M 2,4 v 18 c 0,1.104569 0.8954305,2 2,2 H 20 V 22 H 4 V 4 Z m 8,12 h 8 l -4,3 z" fill="#289de8" />
</graphic>
</Button>
<Button fx:id="selectSplitNspBtn" contentDisplay="TOP" mnemonicParsing="false" prefHeight="60.0" text="%btn_OpenSplitFile">
<graphic>

View file

@ -43,5 +43,18 @@
<Insets left="5.0" />
</VBox.margin>
</HBox>
<HBox spacing="5.0">
<children>
<VBox spacing="5.0">
<children>
<CheckBox fx:id="direcroriesChooserForRomsCB" mnemonicParsing="false" text="%tab2_Cb_foldersSelectorForRoms" />
<Label disable="true" text="%tab2_Cb_foldersSelectorForRomsDesc" wrapText="true" />
</children>
</VBox>
</children>
<VBox.margin>
<Insets left="5.0" />
</VBox.margin>
</HBox>
</children>
</VBox>

View file

@ -1,5 +1,7 @@
btn_OpenFile=Select files
btn_OpenFolders=Select folder
btn_Upload=Upload to NS
btn_OpenFolders_tooltip=Select a folder to be scanned.\nThis folder and all of its subfolders will be scanned.\nAll matching files will be added to the list.
tab3_Txt_EnteredAsMsg1=You have been entered as:
tab3_Txt_EnteredAsMsg2=You should be root or have configured 'udev' rules for this user to avoid any issues.
tab3_Txt_FilesToUploadTitle=Files to upload:
@ -68,4 +70,6 @@ btn_Cancel=Cancel
btn_Close=Close
tab2_Cb_GlVersion=GoldLeaf version
tab2_Cb_GLshowNspOnly=Show only *.nsp in GoldLeaf.
windowBodyPleaseStopOtherProcessFirst=Please stop other active process before continuing.
windowBodyPleaseStopOtherProcessFirst=Please stop other active process before continuing.
tab2_Cb_foldersSelectorForRoms=Select folder with ROM files instead of selecting ROMs individually.
tab2_Cb_foldersSelectorForRomsDesc=Changes 'Select files' button behaviour on 'Games' tab: instead of selecting ROM files one-by-one you can choose folder to add every supported file at once.

View file

@ -69,3 +69,5 @@ btn_Close=\u0625\u063A\u0644\u0627\u0642
tab2_Cb_GlVersion=\u0625\u0635\u062F\u0627\u0631 \u0628\u0631\u0646\u0627\u0645\u062C \u0627\u0644\u0640 "\u062C\u0648\u0644\u062F \u0644\u064A\u0641"
tab2_Cb_GLshowNspOnly=\u0627\u0639\u0631\u0636 \u0641\u0642\u0637 \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0630\u0627\u062A \u0627\u0644\u0625\u0645\u062A\u062F\u0627\u062F "\u0625\u0646 \u0625\u0633 \u0628\u064A" \u0641\u064A \u0628\u0631\u0646\u0627\u0645\u062C \u0627\u0644\u0640 "\u062C\u0648\u0644\u062F \u0644\u064A\u0641".
windowBodyPleaseStopOtherProcessFirst=\u0645\u0646 \u0641\u0636\u0644\u0643 \u0642\u0645 \u0628\u0625\u064A\u0642\u0627\u0641 \u0627\u0644\u0639\u0645\u0644\u064A\u0627\u062A \u0627\u0644\u0623\u062E\u0631\u0649 \u0642\u0628\u0644 \u0627\u0644\u0625\u0633\u062A\u0645\u0631\u0627\u0631.
tab2_Cb_foldersSelectorForRoms=
tab2_Cb_foldersSelectorForRomsDesc=

View file

@ -1,5 +1,7 @@
btn_OpenFile=.NSP Dateien ausw\u00E4hlen
btn_OpenFolders=Ordner ausw\u00E4hlen
btn_Upload=Hochladen zu NS
btn_OpenFolders_tooltip=W\u00E4hle einen Ordner aus.\nDieser Ordner und alle seine Unterordner werden durchsucht.\nAlle passenden Dateien werden dann zur Liste hinzugef\u00FCgt.
tab3_Txt_EnteredAsMsg1=Du wurdest eingelassen als:
tab3_Txt_EnteredAsMsg2=Du brauchst root oder konfigurierte 'udev'-Regeln um Probleme zu vermeiden.
tab3_Txt_FilesToUploadTitle=Dateien zum Hochladen:
@ -42,6 +44,7 @@ tab2_Cb_AllowXciNszXcz=Erlaube XCI- NSZ- XCZ-Dateien-Verwendung f\u00FCr Tinfoil
tab2_Lbl_AllowXciNszXczDesc=Von einigen Drittanbietern verwendet, welche XCI/NSZ/XCZ unterst\u00FCtzen, nutzt Tinfoil Transfer Protocol. Nicht \u00E4ndern, wenn unsicher.
tab2_Lbl_Language=Sprache
windowBodyRestartToApplyLang=Bitte die Applikation neustarten um die Einstellungen zu \u00FCbernehmen.
btn_OpenSplitFile=Split-NSP ausw\uFFFDhlen
tab2_Cb_GLshowNspOnly=Nur *.nsp in GoldLeaf zeigen.
btn_Cancel=Abbrechen

View file

@ -1,5 +1,7 @@
btn_OpenFile=Select files
btn_OpenFolders=Select folder
btn_Upload=Upload to NS
btn_OpenFolders_tooltip=Select a folder to be scanned.\nThis folder and all of its subfolders will be scanned.\nAll matching files will be added to the list.
tab3_Txt_EnteredAsMsg1=You have been entered as:
tab3_Txt_EnteredAsMsg2=You should be root or have configured 'udev' rules for this user to avoid any issues.
tab3_Txt_FilesToUploadTitle=Files to upload:
@ -68,4 +70,6 @@ btn_Cancel=Cancel
btn_Close=Close
tab2_Cb_GlVersion=GoldLeaf version
tab2_Cb_GLshowNspOnly=Show only *.nsp in GoldLeaf.
windowBodyPleaseStopOtherProcessFirst=Please stop other active process before continuing.
windowBodyPleaseStopOtherProcessFirst=Please stop other active process before continuing.
tab2_Cb_foldersSelectorForRoms=Select folder with ROM files instead of selecting ROMs individually.
tab2_Cb_foldersSelectorForRomsDesc=Changes 'Select files' button behaviour on 'Games' tab: instead of selecting ROM files one-by-one you can choose folder to add every supported file at once.

View file

@ -1,4 +1,4 @@
btn_OpenFile=Seleccionar los archivos .NSP
btn_OpenFile=Seleccionar los archivos
btn_Upload=Enviar a NS
tab3_Txt_EnteredAsMsg1=Est\u00E1 conectado como:
tab3_Txt_EnteredAsMsg2=Deber\u00EDa ser root o haber configurado las reglas 'udev' de este usuario para evitar problemas.

View file

@ -1,4 +1,4 @@
btn_OpenFile=Selectionner les fichiers .NSP
btn_OpenFile=Selectionner les fichiers
btn_Upload=Envoyer vers NS
tab3_Txt_EnteredAsMsg1=Vous etes connect\u00E9 en tant que:
tab3_Txt_EnteredAsMsg2=Vous devez \u00EAtre root ou avoir configur\u00E9 les r\u00E8gles 'udev' pour cet utilisateur afin d'\u00E9viter tout probl\u00E8me.

View file

@ -1,4 +1,4 @@
katebtn_OpenFile=Selecionar Arquivos
btn_OpenFile=Selecionar Arquivos
btn_Upload=Carregar Arquivos
tab3_Txt_EnteredAsMsg1=Voc\u00EA logou como:
tab3_Txt_EnteredAsMsg2=Voc\u00EA precisa de permiss\u00F5es root ou ter configurado as regras 'udev' deste usu\u00E1rio para evitar poss\u00EDveis problemas.
@ -23,7 +23,7 @@ tab1_Lbl_NSIP=NS IP:
tab2_Cb_ValidateNSHostName=Sempre validar o IP do switch.
windowBodyBadIp=Tem certeza que preencheu o endere\u00E7o IP corretamente?
windowTitleBadIp=Endere\u00E7o IP do switch provavelmente incorreto.
tab2_Cb_ExpertMode=Modo Avançado (Configura\u00E7\u00E3o NET)
tab2_Cb_ExpertMode=Modo Avan\u00E7ado (Configura\u00E7\u00E3o NET)
tab2_Lbl_HostPort=porta
tab2_Cb_AutoDetectIp=Auto-detectar IP
tab2_Cb_RandSelectPort=Usar porta aleat\u00F3ria
@ -44,7 +44,7 @@ tab2_Lbl_Language=Idioma
windowBodyRestartToApplyLang=Por favor, reinicie para aplicar as modifica\u00E7\u00F5es.
btn_OpenSplitFile=Select split NSP
tab2_Lbl_ApplicationSettings=Configura\u00E7\u00F5es principais
tabSplMrg_Lbl_SplitNMergeTitle=Ferramenta de Fragmentar (Dividir) & Mesclar (Juntar) arquivos
tabSplMrg_Lbl_SplitNMergeTitle=Ferramenta de Fragmentar (Split) & Mesclar (Merge) arquivos
tabSplMrg_RadioBtn_Split=Fragmentar (Dividir)
tabSplMrg_RadioBtn_Merge=Mesclar (Juntar)
tabSplMrg_Txt_File=Arquivo:

View file

@ -69,4 +69,6 @@ btn_Cancel=\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C
btn_Close=\u0417\u0430\u043A\u0440\u044B\u0442\u044C
tab2_Cb_GlVersion=\u0412\u0435\u0440\u0441\u0438\u044F GoldLeaf
windowBodyPleaseStopOtherProcessFirst=\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u043E\u0439 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0439 \u043F\u0440\u043E\u0446\u0435\u0441\u0441 \u043F\u0435\u0440\u0435\u0434 \u0442\u0435\u043C, \u043A\u0430\u043A \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C.
tab2_Cb_foldersSelectorForRomsDesc=\u041C\u0435\u043D\u044F\u0435\u0442 \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435 \u043A\u043D\u043E\u043F\u043A\u0438 "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0444\u0430\u0439\u043B\u044B" \u043D\u0430 \u0432\u043A\u043B\u0430\u0434\u043A\u0435 '\u0418\u0433\u0440\u044B'. \u0412\u043C\u0435\u0441\u0442\u043E \u0432\u044B\u0431\u043E\u0440\u0430 ROM \u0444\u0430\u0439\u043B\u043E\u0432 \u043F\u043E \u043E\u0434\u043D\u043E\u043C\u0443 \u0432\u044B \u0443\u043A\u0430\u0437\u044B\u0432\u0430\u0435\u0442\u0435 \u043F\u0430\u043F\u043A\u0443, \u043F\u043E\u0441\u043B\u0435 \u0447\u0435\u0433\u043E \u0432\u0441\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043C\u044B\u0435 \u043E\u0431\u0440\u0430\u0437\u044B \u0434\u043E\u0431\u0430\u0432\u043B\u044F\u044E\u0442\u0441\u044F.
tab2_Cb_foldersSelectorForRoms=\u0412\u044B\u0431\u0438\u0440\u0430\u0442\u044C \u043F\u0430\u043F\u043A\u0443 \u0441 ROM \u0444\u0430\u0439\u043B\u0430\u043C\u0438 \u0432\u043C\u0435\u0441\u0442\u043E \u0432\u044B\u0431\u043E\u0440\u0430 \u0444\u0430\u0439\u043B\u043E\u0432 \u043F\u043E\u043E\u0434\u0438\u043D\u043E\u0447\u043A\u0435.

View file

@ -69,3 +69,5 @@ btn_Cancel=\u0412\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438
btn_Close=\u0417\u0430\u043A\u0440\u0438\u0442\u0438
tab2_Cb_GlVersion=\u0412\u0435\u0440\u0441\u0456\u044F GoldLeaf
windowBodyPleaseStopOtherProcessFirst=\u0411\u0443\u0434\u044C \u043B\u0430\u0441\u043A\u0430, \u0437\u0443\u043F\u0438\u043D\u0456\u0442\u044C \u0456\u043D\u0448\u0438\u0439 \u0430\u043A\u0442\u0438\u0432\u043D\u0438\u0439 \u043F\u0440\u043E\u0446\u0435\u0441 \u043F\u0435\u0440\u0448 \u043D\u0456\u0436 \u043F\u0440\u043E\u0434\u043E\u0432\u0436\u0438\u0442\u0438.
tab2_Cb_foldersSelectorForRomsDesc=\u0417\u043C\u0456\u043D\u044E\u0454 \u043F\u043E\u0432\u0435\u0434\u0456\u043D\u043A\u0443 \u043A\u043D\u043E\u043F\u043A\u0438 \u043A\u043D\u043E\u043F\u043A\u0438 "\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u0444\u0430\u0439\u043B\u0438" \u043D\u0430 \u0432\u043A\u043B\u0430\u0434\u0446\u0456 '\u0406\u0433\u0440\u0438'. \u0417\u0430\u043C\u0456\u0441\u0442\u044C \u0432\u0438\u0431\u043E\u0440\u0443 ROM \u0444\u0430\u0439\u043B\u0456\u0432 \u043E\u0434\u0438\u043D \u0437\u0430 \u043E\u0434\u043D\u0438\u043C \u0432\u0438 \u0432\u043A\u0430\u0437\u0443\u0454\u0442\u0435 \u043F\u0430\u043F\u043A\u0443, \u043F\u0456\u0441\u043B\u044F \u0447\u043E\u0433\u043E \u0434\u043E\u0434\u0430\u044E\u0442\u044C\u0441\u044F \u0443\u0441\u0456 \u0444\u0430\u0439\u043B\u0438, \u0449\u043E \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u044E\u0442\u044C\u0441\u044F.
tab2_Cb_foldersSelectorForRoms=\u0412\u0438\u0431\u0438\u0440\u0430\u0442\u0438 \u043F\u0430\u043F\u043A\u0443 \u0437 ROM \u0444\u0430\u0439\u043B\u0430\u043C\u0438 \u0437\u0430\u043C\u0456\u0441\u0442\u044C \u0432\u0438\u0431\u043E\u0440\u0443 \u0444\u0430\u0439\u043B\u0456\u0432 \u043F\u043E\u043E\u0434\u0438\u043D\u0446\u0456.

View file

@ -92,7 +92,7 @@
.tool-bar{
-fx-background-color: transparent;
}
// -======================== Choice box =========================-
/* -======================== Choice box =========================- */
.choice-box {
-fx-background-color: #4f4f4f;
-fx-border-color: #4f4f4f;
@ -101,6 +101,9 @@
-fx-mark-color: #eea11e;
-fx-effect: none;
}
.choice-box .arrow{
-fx-background-color: #eea11e;
}
.choice-box > .label {
-fx-text-fill: #f7fafa;
}
@ -411,6 +414,20 @@
-fx-min-height: -size;
-fx-min-width: 17.5;
}
.regionSelectFiles {
-fx-shape: "M 8,0 C 6.8954305,0 6,0.8954305 6,2 v 16 c 0,1.1 0.89,2 2,2 h 12 c 1.104569,0 2,-0.895431 2,-2 V 2 C 22,0.90484721 21.089844,0 20,0 Z m 2.1,1.2 h 7.8 C 18,1.20208 18,1.2002604 18,1.3 v 0.1 c 0,0.095833 0,0.097917 -0.1,0.1 H 10.1 C 10,1.5057292 10,1.5036458 10,1.4 V 1.3 C 10,1.20026 10,1.1981771 10.1,1.2 Z M 8,2 h 12 c 0.303385,0 0.5,0.2044271 0.5,0.5 v 12 C 20.5,14.789959 20.29836,15 20,15 H 8 C 7.7044271,15 7.5,14.803385 7.5,14.5 V 2.5 C 7.5,2.2083333 7.7122396,2 8,2 Z M 2,4 v 18 c 0,1.104569 0.8954305,2 2,2 H 20 V 22 H 4 V 4 Z m 8,12 h 8 l -4,3 z";
-fx-background-color: #289de8;
-size: 24;
-fx-min-height: -size;
-fx-min-width: 20;
}
.regionScanFolders {
-fx-shape: "M16.5,12C19,12 21,14 21,16.5C21,17.38 20.75,18.21 20.31,18.9L23.39,22L22,23.39L18.88,20.32C18.19,20.75 17.37,21 16.5,21C14,21 12,19 12,16.5C12,14 14,12 16.5,12M16.5,14A2.5,2.5 0 0,0 14,16.5A2.5,2.5 0 0,0 16.5,19A2.5,2.5 0 0,0 19,16.5A2.5,2.5 0 0,0 16.5,14M9,4L11,6H19A2,2 0 0,1 21,8V11.81C19.83,10.69 18.25,10 16.5,10A6.5,6.5 0 0,0 10,16.5C10,17.79 10.37,19 11,20H3C1.89,20 1,19.1 1,18V6C1,4.89 1.89,4 3,4H9Z";
-fx-background-color: #289de8;
-size: 22;
-fx-min-height: -size;
-fx-min-width: 24;
}
//
//.lineGradient {
// -fx-background-color: linear-gradient(from 41px 34px to 50px 50px, reflect, #00c8fc 30%, transparent 45%);

View file

@ -118,6 +118,9 @@
-fx-mark-color: #eea11e;
-fx-effect: dropshadow(three-pass-box, #b4b4b4, 2, 0, 0, 0);
}
.choice-box .arrow{
-fx-background-color: #eea11e;
}
.choice-box > .label {
-fx-text-fill: #2c2c2c;
}
@ -327,4 +330,18 @@
-size: 17.5;
-fx-min-height: -size;
-fx-min-width: 17.5;
}
.regionSelectFiles {
-fx-shape: "M 8,0 C 6.8954305,0 6,0.8954305 6,2 v 16 c 0,1.1 0.89,2 2,2 h 12 c 1.104569,0 2,-0.895431 2,-2 V 2 C 22,0.90484721 21.089844,0 20,0 Z m 2.1,1.2 h 7.8 C 18,1.20208 18,1.2002604 18,1.3 v 0.1 c 0,0.095833 0,0.097917 -0.1,0.1 H 10.1 C 10,1.5057292 10,1.5036458 10,1.4 V 1.3 C 10,1.20026 10,1.1981771 10.1,1.2 Z M 8,2 h 12 c 0.303385,0 0.5,0.2044271 0.5,0.5 v 12 C 20.5,14.789959 20.29836,15 20,15 H 8 C 7.7044271,15 7.5,14.803385 7.5,14.5 V 2.5 C 7.5,2.2083333 7.7122396,2 8,2 Z M 2,4 v 18 c 0,1.104569 0.8954305,2 2,2 H 20 V 22 H 4 V 4 Z m 8,12 h 8 l -4,3 z";
-fx-background-color: #289de8;
-size: 24;
-fx-min-height: -size;
-fx-min-width: 20;
}
.regionScanFolders {
-fx-shape: "M16.5,12C19,12 21,14 21,16.5C21,17.38 20.75,18.21 20.31,18.9L23.39,22L22,23.39L18.88,20.32C18.19,20.75 17.37,21 16.5,21C14,21 12,19 12,16.5C12,14 14,12 16.5,12M16.5,14A2.5,2.5 0 0,0 14,16.5A2.5,2.5 0 0,0 16.5,19A2.5,2.5 0 0,0 19,16.5A2.5,2.5 0 0,0 16.5,14M9,4L11,6H19A2,2 0 0,1 21,8V11.81C19.83,10.69 18.25,10 16.5,10A6.5,6.5 0 0,0 10,16.5C10,17.79 10.37,19 11,20H3C1.89,20 1,19.1 1,18V6C1,4.89 1.89,4 3,4H9Z";
-fx-background-color: #289de8;
-size: 22;
-fx-min-height: -size;
-fx-min-width: 24;
}