From 3fedd8eb43c3d823dac14fac385e9fc38781d253 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Tue, 7 Nov 2023 14:14:14 +0200 Subject: [PATCH] support opening multiple wallet and transaction files at once --- .../com/sparrowwallet/sparrow/AppController.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/AppController.java b/src/main/java/com/sparrowwallet/sparrow/AppController.java index 5fd6ebc3..c57f266d 100644 --- a/src/main/java/com/sparrowwallet/sparrow/AppController.java +++ b/src/main/java/com/sparrowwallet/sparrow/AppController.java @@ -587,9 +587,11 @@ public class AppController implements Initializable { ); AppServices.moveToActiveWindowScreen(window, 800, 450); - File file = fileChooser.showOpenDialog(window); - if (file != null) { - openTransactionFile(file); + List files = fileChooser.showOpenMultipleDialog(window); + if(files != null) { + for(File file : files) { + openTransactionFile(file); + } } } @@ -1036,9 +1038,11 @@ public class AppController implements Initializable { fileChooser.setInitialDirectory(Storage.getWalletsDir()); AppServices.moveToActiveWindowScreen(window, 800, 450); - File file = fileChooser.showOpenDialog(window); - if(file != null) { - openWalletFile(file, forceSameWindow); + List files = fileChooser.showOpenMultipleDialog(window); + if(files != null) { + for(File file : files) { + openWalletFile(file, forceSameWindow); + } } }