mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-03-15 10:26:37 -04:00
deactivate auto fill with mock
This commit is contained in:
parent
6a138c231a
commit
d5a5db1d42
@ -38,6 +38,8 @@ public class BitSquare extends Application
|
||||
{
|
||||
private static final Logger log = LoggerFactory.getLogger(BitSquare.class);
|
||||
|
||||
public static boolean fillFormsWithDummyData = false;
|
||||
|
||||
private static String APP_NAME = "bitsquare";
|
||||
private static Stage primaryStage;
|
||||
private WalletFacade walletFacade;
|
||||
@ -74,11 +76,8 @@ public class BitSquare extends Application
|
||||
|
||||
Thread.currentThread().setUncaughtExceptionHandler((thread, throwable) -> Popups.handleUncaughtExceptions(Throwables.getRootCause(throwable)));
|
||||
|
||||
// use a local data dir as default storage dir (can be overwritten in the settings)
|
||||
// TODO save root preferences always in app dir top get preferred storage location
|
||||
StorageDirectory.setStorageDirectory(new File(StorageDirectory.getApplicationDirectory().getCanonicalPath() + "/data"));
|
||||
|
||||
|
||||
// currently there is not SystemTray support for java fx (planned for version 3) so we use the old AWT
|
||||
AWTSystemTray.createSystemTray(primaryStage);
|
||||
|
||||
|
@ -118,7 +118,7 @@ public class BitSquareWalletAppKit extends WalletAppKit
|
||||
}
|
||||
else
|
||||
{
|
||||
//TODO
|
||||
//TODO deprecated
|
||||
Futures.addCallback(vPeerGroup.start(), new FutureCallback<State>()
|
||||
{
|
||||
@Override
|
||||
|
@ -567,13 +567,7 @@ public class WalletFacade
|
||||
return unUsedAddressInfoBalance.compareTo(FeePolicy.TAKE_OFFER_FEE) > 0;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// TODO
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
//TODO
|
||||
@SuppressWarnings({"SameReturnValue", "UnusedParameters"})
|
||||
public int getNumOfPeersSeenTx(String txID)
|
||||
{
|
||||
// TODO check from blockchain
|
||||
|
@ -3,6 +3,7 @@ package io.bitsquare.gui.market.createOffer;
|
||||
import com.google.bitcoin.core.InsufficientMoneyException;
|
||||
import com.google.bitcoin.core.Transaction;
|
||||
import com.google.common.util.concurrent.FutureCallback;
|
||||
import io.bitsquare.BitSquare;
|
||||
import io.bitsquare.bank.BankAccount;
|
||||
import io.bitsquare.btc.AddressEntry;
|
||||
import io.bitsquare.btc.BtcFormatter;
|
||||
@ -103,11 +104,15 @@ public class CreateOfferController implements Initializable, ChildController, Hi
|
||||
updateTotals();
|
||||
|
||||
//TODO
|
||||
//amountTextField.setText("" + (int) (new Random().nextDouble() * 100 / 10 + 1));
|
||||
amountTextField.setText("1");
|
||||
priceTextField.setText("" + (int) (499 - new Random().nextDouble() * 1000 / 100));
|
||||
minAmountTextField.setText("0,1");
|
||||
collateralTextField.setText("10");
|
||||
if (BitSquare.fillFormsWithDummyData)
|
||||
{
|
||||
//amountTextField.setText("" + (int) (new Random().nextDouble() * 100 / 10 + 1));
|
||||
amountTextField.setText("1");
|
||||
priceTextField.setText("" + (int) (499 - new Random().nextDouble() * 1000 / 100));
|
||||
minAmountTextField.setText("0,1");
|
||||
collateralTextField.setText("10");
|
||||
}
|
||||
|
||||
updateVolume();
|
||||
updateTotals();
|
||||
|
||||
@ -115,6 +120,7 @@ public class CreateOfferController implements Initializable, ChildController, Hi
|
||||
updateVolume();
|
||||
updateTotals();
|
||||
});
|
||||
|
||||
priceTextField.textProperty().addListener((observable, oldValue, newValue) -> updateVolume());
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
<TextField fx:id="minAmountTextField" GridPane.columnIndex="1" GridPane.rowIndex="2"/>
|
||||
|
||||
<Label text="Collateral (%):" GridPane.rowIndex="3"/>
|
||||
<TextField fx:id="collateralTextField" GridPane.columnIndex="1" GridPane.rowIndex="3"/>
|
||||
<TextField fx:id="collateralTextField" editable="false" GridPane.columnIndex="1" GridPane.rowIndex="3"/>
|
||||
|
||||
<Label text="Offer fee:" GridPane.rowIndex="4"/>
|
||||
<TextField fx:id="feeLabel" editable="false" GridPane.columnIndex="1" GridPane.rowIndex="4"/>
|
||||
|
@ -636,17 +636,20 @@ public class SettingsController implements Initializable, ChildController, Navig
|
||||
}
|
||||
|
||||
//TODO
|
||||
bankAccountTypesComboBox.getSelectionModel().selectFirst();
|
||||
bankAccountCurrencyComboBox.getSelectionModel().selectFirst();
|
||||
bankAccountRegionComboBox.getSelectionModel().select(3);
|
||||
bankAccountCountryComboBox.getSelectionModel().select(5);
|
||||
bankAccountTitleTextField.setText("dummy");
|
||||
bankAccountHolderNameTextField.setText("dummy");
|
||||
bankAccountPrimaryIDTextField.setText("dummy");
|
||||
bankAccountSecondaryIDTextField.setText("dummy");
|
||||
if (user.getCurrentBankAccount() == null)
|
||||
if (BitSquare.fillFormsWithDummyData)
|
||||
{
|
||||
onSaveBankAccount();
|
||||
bankAccountTypesComboBox.getSelectionModel().selectFirst();
|
||||
bankAccountCurrencyComboBox.getSelectionModel().selectFirst();
|
||||
bankAccountRegionComboBox.getSelectionModel().select(3);
|
||||
bankAccountCountryComboBox.getSelectionModel().select(5);
|
||||
bankAccountTitleTextField.setText("dummy");
|
||||
bankAccountHolderNameTextField.setText("dummy");
|
||||
bankAccountPrimaryIDTextField.setText("dummy");
|
||||
bankAccountSecondaryIDTextField.setText("dummy");
|
||||
if (user.getCurrentBankAccount() == null)
|
||||
{
|
||||
onSaveBankAccount();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,70 +0,0 @@
|
||||
package io.bitsquare.gui.util;
|
||||
|
||||
|
||||
import io.bitsquare.gui.components.VSpacer;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.layout.GridPane;
|
||||
|
||||
//TODO to be removed
|
||||
@SuppressWarnings({"SameParameterValue", "UnusedReturnValue"})
|
||||
public class FormBuilder
|
||||
{
|
||||
|
||||
public static Label addLabel(GridPane gridPane, String title, String value, int row)
|
||||
{
|
||||
gridPane.add(new Label(title), 0, row);
|
||||
Label valueLabel = new Label(value);
|
||||
gridPane.add(valueLabel, 1, row);
|
||||
return valueLabel;
|
||||
}
|
||||
|
||||
|
||||
public static Label addHeaderLabel(GridPane gridPane, String title, int row, int column)
|
||||
{
|
||||
Label headerLabel = new Label(title);
|
||||
headerLabel.setId("form-header-text");
|
||||
gridPane.add(headerLabel, column, row);
|
||||
return headerLabel;
|
||||
}
|
||||
|
||||
|
||||
public static Label addHeaderLabel(GridPane gridPane, String title, int row)
|
||||
{
|
||||
return addHeaderLabel(gridPane, title, row, 0);
|
||||
}
|
||||
|
||||
|
||||
public static TextField addTextField(GridPane gridPane, String title, String value, int row)
|
||||
{
|
||||
return addTextField(gridPane, title, value, row, false, false);
|
||||
}
|
||||
|
||||
|
||||
public static TextField addTextField(GridPane gridPane, String title, String value, int row, boolean editable, boolean selectable)
|
||||
{
|
||||
gridPane.add(new Label(title), 0, row);
|
||||
TextField textField = new TextField(value);
|
||||
gridPane.add(textField, 1, row);
|
||||
textField.setMouseTransparent(!selectable && !editable);
|
||||
textField.setEditable(editable);
|
||||
|
||||
return textField;
|
||||
}
|
||||
|
||||
public static void addVSpacer(GridPane gridPane, int row)
|
||||
{
|
||||
gridPane.add(new VSpacer(10), 0, row);
|
||||
}
|
||||
|
||||
|
||||
public static Button addButton(GridPane gridPane, String title, int row)
|
||||
{
|
||||
Button button = new Button(title);
|
||||
gridPane.add(button, 1, row);
|
||||
return button;
|
||||
}
|
||||
|
||||
|
||||
}
|
BIN
src/main/resources/images/systemTrayAlertIcon.png
Normal file
BIN
src/main/resources/images/systemTrayAlertIcon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 355 B |
Loading…
x
Reference in New Issue
Block a user