From c2dbd55e774ca7a98b5877d62fecee58ae522392 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Tue, 29 Dec 2015 00:36:19 +0100 Subject: [PATCH] Remove walletprefix, fix key event listener, v 0.3.2.23-snapshot --- common/pom.xml | 2 +- common/src/main/java/io/bitsquare/app/Log.java | 4 +++- common/src/main/java/io/bitsquare/app/Version.java | 2 +- core/pom.xml | 2 +- .../main/java/io/bitsquare/app/BitsquareEnvironment.java | 1 - core/src/main/java/io/bitsquare/btc/BitcoinModule.java | 1 - core/src/main/java/io/bitsquare/btc/WalletService.java | 6 ++---- gui/pom.xml | 2 +- gui/src/main/java/io/bitsquare/app/BitsquareApp.java | 3 ++- .../main/portfolio/pendingtrades/PendingTradesView.java | 5 +++-- jsocks/pom.xml | 2 +- jtorctl/pom.xml | 2 +- jtorproxy/pom.xml | 2 +- network/pom.xml | 2 +- package/linux/create_app.sh | 2 +- package/mac/create_app.sh | 2 +- package/windows/Bitsquare.iss | 2 +- package/windows/create_app.bat | 8 ++++---- pom.xml | 2 +- seednode/pom.xml | 2 +- 20 files changed, 27 insertions(+), 27 deletions(-) diff --git a/common/pom.xml b/common/pom.xml index 69754cfb3b..aa5b60374d 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.3.2.2 + 0.3.2.3-SNAPSHOT 4.0.0 diff --git a/common/src/main/java/io/bitsquare/app/Log.java b/common/src/main/java/io/bitsquare/app/Log.java index 0d8e2fc6f5..cf81d2cd04 100644 --- a/common/src/main/java/io/bitsquare/app/Log.java +++ b/common/src/main/java/io/bitsquare/app/Log.java @@ -62,7 +62,9 @@ public class Log { appender.start(); logbackLogger = loggerContext.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME); - logbackLogger.setLevel(useDetailedLogging ? Level.TRACE : Level.DEBUG); + //TODO for now use always trace + logbackLogger.setLevel(useDetailedLogging ? Level.TRACE : Level.TRACE); + // logbackLogger.setLevel(useDetailedLogging ? Level.TRACE : Level.DEBUG); logbackLogger.addAppender(appender); } diff --git a/common/src/main/java/io/bitsquare/app/Version.java b/common/src/main/java/io/bitsquare/app/Version.java index 965f871da1..a876a1af37 100644 --- a/common/src/main/java/io/bitsquare/app/Version.java +++ b/common/src/main/java/io/bitsquare/app/Version.java @@ -24,7 +24,7 @@ public class Version { private static final Logger log = LoggerFactory.getLogger(Version.class); // The application versions - public static final String VERSION = "0.3.2.2"; + public static final String VERSION = "0.3.2.3"; // The version nr. for the objects sent over the network. A change will break the serialization of old objects. // If objects are used for both network and database the network version is applied. diff --git a/core/pom.xml b/core/pom.xml index c5d5ff9f0a..5ec0972458 100755 --- a/core/pom.xml +++ b/core/pom.xml @@ -6,7 +6,7 @@ parent io.bitsquare - 0.3.2.2 + 0.3.2.3-SNAPSHOT core diff --git a/core/src/main/java/io/bitsquare/app/BitsquareEnvironment.java b/core/src/main/java/io/bitsquare/app/BitsquareEnvironment.java index 81bca7d2f2..e745ff155c 100644 --- a/core/src/main/java/io/bitsquare/app/BitsquareEnvironment.java +++ b/core/src/main/java/io/bitsquare/app/BitsquareEnvironment.java @@ -187,7 +187,6 @@ public class BitsquareEnvironment extends StandardEnvironment { setProperty(UserAgent.VERSION_KEY, Version.VERSION); setProperty(WalletService.DIR_KEY, btcNetworkDir); - setProperty(WalletService.PREFIX_KEY, appName); setProperty(Storage.DIR_KEY, Paths.get(btcNetworkDir, "db").toString()); setProperty(KeyStorage.DIR_KEY, Paths.get(btcNetworkDir, "keys").toString()); diff --git a/core/src/main/java/io/bitsquare/btc/BitcoinModule.java b/core/src/main/java/io/bitsquare/btc/BitcoinModule.java index 873e816470..63b6e6aaa6 100644 --- a/core/src/main/java/io/bitsquare/btc/BitcoinModule.java +++ b/core/src/main/java/io/bitsquare/btc/BitcoinModule.java @@ -45,7 +45,6 @@ public class BitcoinModule extends AppModule { File walletDir = new File(env.getRequiredProperty(WalletService.DIR_KEY)); bind(File.class).annotatedWith(named(WalletService.DIR_KEY)).toInstance(walletDir); - bindConstant().annotatedWith(named(WalletService.PREFIX_KEY)).to(env.getRequiredProperty(WalletService.PREFIX_KEY)); bind(AddressEntryList.class).in(Singleton.class); bind(TradeWalletService.class).in(Singleton.class); diff --git a/core/src/main/java/io/bitsquare/btc/WalletService.java b/core/src/main/java/io/bitsquare/btc/WalletService.java index 1e03c1beab..d171341ed6 100644 --- a/core/src/main/java/io/bitsquare/btc/WalletService.java +++ b/core/src/main/java/io/bitsquare/btc/WalletService.java @@ -83,7 +83,6 @@ public class WalletService { private final AddressEntryList addressEntryList; private final NetworkParameters params; private final File walletDir; - private final String walletPrefix; private final UserAgent userAgent; private WalletAppKit walletAppKit; @@ -99,7 +98,7 @@ public class WalletService { @Inject public WalletService(RegTestHost regTestHost, TradeWalletService tradeWalletService, AddressEntryList addressEntryList, UserAgent userAgent, - @Named(DIR_KEY) File walletDir, @Named(PREFIX_KEY) String walletPrefix, Preferences preferences) { + @Named(DIR_KEY) File walletDir, Preferences preferences) { this.regTestHost = regTestHost; this.tradeWalletService = tradeWalletService; this.addressEntryList = addressEntryList; @@ -110,7 +109,6 @@ public class WalletService { "Mainnet is not allowed to be used at that stage of development"); this.walletDir = new File(walletDir, "bitcoin"); - this.walletPrefix = walletPrefix; this.userAgent = userAgent; } @@ -136,7 +134,7 @@ public class WalletService { ); // If seed is non-null it means we are restoring from backup. - walletAppKit = new WalletAppKit(params, walletDir, walletPrefix) { + walletAppKit = new WalletAppKit(params, walletDir, "Bitsquare") { @Override protected void onSetupCompleted() { // Don't make the user wait for confirmations for now, as the intention is they're sending it diff --git a/gui/pom.xml b/gui/pom.xml index f7e85f5f76..1740af1f5e 100644 --- a/gui/pom.xml +++ b/gui/pom.xml @@ -22,7 +22,7 @@ parent io.bitsquare - 0.3.2.2 + 0.3.2.3-SNAPSHOT 4.0.0 diff --git a/gui/src/main/java/io/bitsquare/app/BitsquareApp.java b/gui/src/main/java/io/bitsquare/app/BitsquareApp.java index d78db5b9b1..9232e30832 100644 --- a/gui/src/main/java/io/bitsquare/app/BitsquareApp.java +++ b/gui/src/main/java/io/bitsquare/app/BitsquareApp.java @@ -48,6 +48,7 @@ import javafx.scene.image.Image; import javafx.scene.input.KeyCode; import javafx.scene.input.KeyCodeCombination; import javafx.scene.input.KeyCombination; +import javafx.scene.input.KeyEvent; import javafx.scene.layout.Pane; import javafx.scene.layout.StackPane; import javafx.stage.Modality; @@ -156,7 +157,7 @@ public class BitsquareApp extends Application { else stop(); }); - scene.setOnKeyReleased(keyEvent -> { + scene.addEventHandler(KeyEvent.KEY_RELEASED, keyEvent -> { if (new KeyCodeCombination(KeyCode.W, KeyCombination.SHORTCUT_DOWN).match(keyEvent)) { if (BitsquareApp.IS_RELEASE_VERSION) stop(); //systemTray.hideStage(); TODO issues with some linux systems (https://github.com/bitsquare/bitsquare/issues/350) diff --git a/gui/src/main/java/io/bitsquare/gui/main/portfolio/pendingtrades/PendingTradesView.java b/gui/src/main/java/io/bitsquare/gui/main/portfolio/pendingtrades/PendingTradesView.java index 5cc23ef70c..4943552045 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/portfolio/pendingtrades/PendingTradesView.java +++ b/gui/src/main/java/io/bitsquare/gui/main/portfolio/pendingtrades/PendingTradesView.java @@ -32,6 +32,7 @@ import javafx.scene.control.cell.TextFieldTableCell; import javafx.scene.input.KeyCode; import javafx.scene.input.KeyCodeCombination; import javafx.scene.input.KeyCombination; +import javafx.scene.input.KeyEvent; import javafx.scene.layout.Priority; import javafx.scene.layout.VBox; import javafx.util.Callback; @@ -128,8 +129,8 @@ public class PendingTradesView extends ActivatableViewAndModel