Small improvements...

This commit is contained in:
Manfred Karrer 2016-04-08 21:59:26 +02:00
parent 6f3f469287
commit f0b3fa709d
7 changed files with 51 additions and 51 deletions

View File

@ -91,6 +91,7 @@ public class BitsquareApp extends Application {
private MainView mainView;
public static Runnable shutDownHandler;
private boolean shutDownRequested;
public static void setEnvironment(Environment env) {
BitsquareApp.env = env;
@ -189,7 +190,7 @@ public class BitsquareApp extends Application {
// configure the primary stage
primaryStage.setTitle(env.getRequiredProperty(APP_NAME_KEY));
primaryStage.setScene(scene);
primaryStage.setMinWidth(1080);
primaryStage.setMinWidth(1130);
primaryStage.setMinHeight(620);
// on windows the title icon is also used as task bar icon in a larger size
@ -229,37 +230,39 @@ public class BitsquareApp extends Application {
}
private void showErrorPopup(Throwable throwable, boolean doShutDown) {
if (scene == null) {
scene = new Scene(new StackPane(), 1000, 650);
primaryStage.setScene(scene);
primaryStage.show();
}
try {
try {
if (!popupOpened) {
String message = throwable.getMessage();
popupOpened = true;
if (message != null)
new Popup().error(message).onClose(() -> popupOpened = false).show();
else
new Popup().error(throwable.toString()).onClose(() -> popupOpened = false).show();
}
} catch (Throwable throwable3) {
log.error("Error at displaying Throwable.");
throwable3.printStackTrace();
if (!shutDownRequested) {
if (scene == null) {
scene = new Scene(new StackPane(), 1000, 650);
primaryStage.setScene(scene);
primaryStage.show();
}
try {
try {
if (!popupOpened) {
String message = throwable.getMessage();
popupOpened = true;
if (message != null)
new Popup().error(message).onClose(() -> popupOpened = false).show();
else
new Popup().error(throwable.toString()).onClose(() -> popupOpened = false).show();
}
} catch (Throwable throwable3) {
log.error("Error at displaying Throwable.");
throwable3.printStackTrace();
}
if (doShutDown)
stop();
} catch (Throwable throwable2) {
// If printStackTrace cause a further exception we don't pass the throwable to the Popup.
Dialogs.create()
.owner(primaryStage)
.title("Error")
.message(throwable.toString())
.masthead("A fatal exception occurred at startup.")
.showError();
if (doShutDown)
stop();
}
if (doShutDown)
stop();
} catch (Throwable throwable2) {
// If printStackTrace cause a further exception we don't pass the throwable to the Popup.
Dialogs.create()
.owner(primaryStage)
.title("Error")
.message(throwable.toString())
.masthead("A fatal exception occurred at startup.")
.showError();
if (doShutDown)
stop();
}
}
@ -308,6 +311,7 @@ public class BitsquareApp extends Application {
@Override
public void stop() {
shutDownRequested = true;
gracefulShutDown(() -> {
log.info("App shutdown complete");
System.exit(0);
@ -318,7 +322,9 @@ public class BitsquareApp extends Application {
log.debug("gracefulShutDown");
new Popup().headLine("Shut down in progress")
.backgroundInfo("Shutting down application can take a few seconds.\n" +
"Please don't interrupt that process.").closeButtonText("Ok")
"Please don't interrupt that process.")
.hideCloseButton()
.useAnimation(false)
.show();
try {
if (injector != null) {

View File

@ -496,7 +496,7 @@ public class TraderDisputeView extends ActivatableView<VBox, Void> {
statusIcon.setStyle("-fx-font-size: 10;");
// TODO icon not displayed correctly (too small), don't knwo why....
AwesomeDude.setIcon(copyIcon, AwesomeIcon.COPY);
AwesomeDude.setIcon(copyIcon, AwesomeIcon.COPY, "16.0");
copyIcon.getStyleClass().add("copy-icon");// -fx-cursor: hand;
Tooltip.install(copyIcon, new Tooltip("Copy to clipboard"));
messageAnchorPane.getChildren().addAll(bg, arrow, headerLabel, messageLabel, copyIcon, attachmentsBox, statusIcon);

View File

@ -57,7 +57,6 @@ import static io.bitsquare.gui.util.FormBuilder.addCheckBox;
public abstract class Overlay<T extends Overlay> {
protected final Logger log = LoggerFactory.getLogger(this.getClass());
///////////////////////////////////////////////////////////////////////////////////////////
// Enum
///////////////////////////////////////////////////////////////////////////////////////////
@ -130,7 +129,8 @@ public abstract class Overlay<T extends Overlay> {
protected double buttonDistance = 20;
protected Type type = Type.Undefined;
protected boolean hideCloseButton;
protected boolean useAnimation;
///////////////////////////////////////////////////////////////////////////////////////////
// Public API
@ -341,6 +341,11 @@ public abstract class Overlay<T extends Overlay> {
return (T) this;
}
public T useAnimation(boolean useAnimation) {
this.useAnimation = useAnimation;
return (T) this;
}
///////////////////////////////////////////////////////////////////////////////////////////
// Protected
@ -746,7 +751,7 @@ public abstract class Overlay<T extends Overlay> {
}
protected double getDuration(double duration) {
return Preferences.useAnimations() ? duration : 1;
return useAnimation && Preferences.useAnimations() ? duration : 1;
}
@Override

View File

@ -61,7 +61,7 @@ public class AboutView extends ActivatableViewAndModel<GridPane, Activatable> {
titledGroupBg = addTitledGroupBg(root, ++gridRow, 3, "Support Bitsquare", Layout.GROUP_DISTANCE);
GridPane.setColumnSpan(titledGroupBg, 2);
label = addLabel(root, gridRow, "Bitsquare is not a company but a community project and open for participation. If you want to participate check out our web page.", Layout.FIRST_ROW_AND_GROUP_DISTANCE);
label = addLabel(root, gridRow, "Bitsquare is not a company but a community project and open for participation. If you want to participate or support Bitsquare please follow the links below.", Layout.FIRST_ROW_AND_GROUP_DISTANCE);
label.setWrapText(true);
GridPane.setColumnSpan(label, 2);
GridPane.setHalignment(label, HPos.LEFT);

View File

@ -311,7 +311,7 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Activatab
UserThread.runAfter(() -> deviationInputTextField.setText(formatter.formatToPercent(preferences.getMaxPriceDistanceInPercent())), 100, TimeUnit.MILLISECONDS);
};
transactionFeeInputTextField = addLabelInputTextField(root, ++gridRow, "Transaction fee (satoshi/byte):").second;
transactionFeeInputTextField = addLabelInputTextField(root, ++gridRow, "Withdrawal transaction fee (satoshi/byte):").second;
transactionFeeFocusedListener = (o, oldValue, newValue) -> {
if (oldValue && !newValue) {
try {

View File

@ -42,6 +42,6 @@
<logger name="org.bitcoinj.core.AbstractBlockChain" level="ERROR"/>-->
<logger name="com.msopentech.thali.toronionproxy.OnionProxyManagerEventHandler" level="INFO"/>
<logger name="org.bitcoinj" level="WARN"/>
<logger name="org.bitcoinj" level="INFO"/>
</configuration>

View File

@ -21,23 +21,12 @@ public class SeedNodesRepository {
// access still his his app
// mainnet
// v0.3.3
/* new NodeAddress("oyyii5ogv7y7iadi.onion:8000"),
new NodeAddress("ugcro2f5xnkguash.onion:8000"),
new NodeAddress("qarhpdsl6mfhbnud.onion:8000"),*/
// v0.3.4
/* new NodeAddress("lih5zsr2bvxi24pk.onion:8000"),
new NodeAddress("s5xpstlooosehtxm.onion:8000"),
new NodeAddress("izs5oz7i5ta7c2ir.onion:8000"),*/
// v0.3.5, v0.3.6 (backwards compatible)
/*new NodeAddress("hulvbm5xjn7b7ku4.onion:8000"),
new NodeAddress("3efgjjbdvhbvck3x.onion:8000"),
new NodeAddress("3unfcshgwipxhxfm.onion:8000"),*/
// v0.3.7
// v0.4.0
new NodeAddress("ybmi4iaesugslxrw.onion:8000"),
new NodeAddress("ufwnvo775jfnjeux.onion:8000"),
new NodeAddress("b66vnevaljo6xt5a.onion:8000"),