mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-20 02:12:00 +01:00
Fix wording, remove nr of offers/trades if alphabet. sorting is used in market lists
This commit is contained in:
parent
cd0ec19f4b
commit
127f8469f7
@ -107,7 +107,7 @@ public class OfferBookChartView extends ActivatableViewAndModel<VBox, OfferBookC
|
||||
|
||||
currencyComboBox = new ComboBox<>();
|
||||
currencyComboBox.setPromptText("Select currency");
|
||||
currencyComboBox.setConverter(GUIUtil.getCurrencyListItemConverter("offers"));
|
||||
currencyComboBox.setConverter(GUIUtil.getCurrencyListItemConverter("offers", model.preferences));
|
||||
|
||||
Label currencyLabel = new Label("Currency:");
|
||||
HBox currencyHBox = new HBox();
|
||||
@ -200,7 +200,7 @@ public class OfferBookChartView extends ActivatableViewAndModel<VBox, OfferBookC
|
||||
buyOfferHeaderLabel.setText("Offers to sell " + code + " for BTC");
|
||||
buyOfferButton.setText("I want to buy " + code + " (sell BTC)");
|
||||
|
||||
sellOfferHeaderLabel.setText("Offers to buy " + code + " for BTC");
|
||||
sellOfferHeaderLabel.setText("Offers to buy " + code + " with BTC");
|
||||
sellOfferButton.setText("I want to sell " + code + " (buy BTC)");
|
||||
|
||||
priceColumnLabel.set("Price in BTC");
|
||||
@ -209,11 +209,11 @@ public class OfferBookChartView extends ActivatableViewAndModel<VBox, OfferBookC
|
||||
bottomHBox.getChildren().get(0).toFront();
|
||||
reverseTableColumns();
|
||||
}
|
||||
buyOfferHeaderLabel.setText("Offers to buy BTC for " + code);
|
||||
buyOfferHeaderLabel.setText("Offers to buy BTC with " + code);
|
||||
buyOfferButton.setText("I want to sell BTC for " + code);
|
||||
|
||||
sellOfferHeaderLabel.setText("Offers to sell BTC for " + code);
|
||||
sellOfferButton.setText("I want to buy BTC for " + code);
|
||||
sellOfferButton.setText("I want to buy BTC with " + code);
|
||||
|
||||
priceColumnLabel.set("Price in " + code);
|
||||
}
|
||||
|
@ -379,7 +379,7 @@ public class TradesChartsView extends ActivatableViewAndModel<VBox, TradesCharts
|
||||
|
||||
currencyComboBox = new ComboBox<>();
|
||||
currencyComboBox.setPromptText("Select currency");
|
||||
currencyComboBox.setConverter(GUIUtil.getCurrencyListItemConverter("trades, all time"));
|
||||
currencyComboBox.setConverter(GUIUtil.getCurrencyListItemConverter("trades", model.preferences));
|
||||
|
||||
Pane spacer = new Pane();
|
||||
HBox.setHgrow(spacer, Priority.ALWAYS);
|
||||
|
@ -115,7 +115,7 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
|
||||
|
||||
currencyComboBox = addLabelComboBox(root, gridRow, "Filter by currency:", Layout.FIRST_ROW_DISTANCE).second;
|
||||
currencyComboBox.setPromptText("Select currency");
|
||||
currencyComboBox.setConverter(GUIUtil.getCurrencyListItemConverter("offers"));
|
||||
currencyComboBox.setConverter(GUIUtil.getCurrencyListItemConverter("offers", model.preferences));
|
||||
|
||||
paymentMethodComboBox = addLabelComboBox(root, ++gridRow, "Filter by payment method:").second;
|
||||
paymentMethodComboBox.setPromptText("Select payment method");
|
||||
@ -312,14 +312,14 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
|
||||
TradeCurrency selectedTradeCurrency = model.getSelectedTradeCurrency();
|
||||
if (selectedTradeCurrency != null) {
|
||||
Offer.Direction direction = model.getDirection();
|
||||
String preFix = "Create new offer for ";
|
||||
String directionText = direction == Offer.Direction.BUY ? "buying" : "selling";
|
||||
String mirroredDirectionText = direction == Offer.Direction.SELL ? "buying" : "selling";
|
||||
String code = selectedTradeCurrency.getCode();
|
||||
String preFix = "Create new offer for ";
|
||||
if (model.showAllTradeCurrenciesProperty.get())
|
||||
createOfferButton.setText(preFix + directionText + " BTC");
|
||||
else if (selectedTradeCurrency instanceof FiatCurrency)
|
||||
createOfferButton.setText(preFix + directionText + " BTC for " + code);
|
||||
createOfferButton.setText(preFix + directionText + " BTC" + (direction == Offer.Direction.BUY ? " with " : " for ") + code);
|
||||
else
|
||||
createOfferButton.setText(preFix + mirroredDirectionText + " " + code + " (" + directionText + " BTC)");
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Activatab
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
private void initializeDisplayCurrencies() {
|
||||
TitledGroupBg titledGroupBg = addTitledGroupBg(root, gridRow, 3, "Currencies to get displayed in list");
|
||||
TitledGroupBg titledGroupBg = addTitledGroupBg(root, gridRow, 3, "Currencies in market price list");
|
||||
GridPane.setColumnSpan(titledGroupBg, 4);
|
||||
|
||||
preferredTradeCurrencyComboBox = addLabelComboBox(root, gridRow, "Preferred currency:", Layout.FIRST_ROW_DISTANCE).second;
|
||||
@ -343,7 +343,7 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Activatab
|
||||
showOwnOffersInOfferBook = addLabelCheckBox(root, gridRow, "Show my own offers in offer book:", "", Layout.FIRST_ROW_AND_GROUP_DISTANCE).second;
|
||||
useAnimationsCheckBox = addLabelCheckBox(root, ++gridRow, "Use animations:", "").second;
|
||||
// useStickyMarketPriceCheckBox = addLabelCheckBox(root, ++gridRow, "Use sticky market price:", "").second;
|
||||
sortMarketCurrenciesNumericallyCheckBox = addLabelCheckBox(root, ++gridRow, "Sort market lists numerically:", "").second;
|
||||
sortMarketCurrenciesNumericallyCheckBox = addLabelCheckBox(root, ++gridRow, "Sort market lists with nr. of offers/trades:", "").second;
|
||||
resetDontShowAgainButton = addLabelButton(root, ++gridRow, "Reset all don't show again flags:", "Reset", 0).second;
|
||||
}
|
||||
|
||||
|
@ -343,7 +343,7 @@ public class BSFormatter {
|
||||
|
||||
public String getDirectionWithCodeDetailed(Offer.Direction direction, String currencyCode) {
|
||||
if (CurrencyUtil.isFiatCurrency(currencyCode))
|
||||
return (direction == Offer.Direction.BUY) ? "buying BTC for " + currencyCode : "selling BTC for " + currencyCode;
|
||||
return (direction == Offer.Direction.BUY) ? "buying BTC with " + currencyCode : "selling BTC for " + currencyCode;
|
||||
else
|
||||
return (direction == Offer.Direction.SELL) ? "buying " + currencyCode + " (selling BTC)" : "selling " + currencyCode + " (buying BTC)";
|
||||
}
|
||||
|
@ -178,33 +178,7 @@ public class GUIUtil {
|
||||
}
|
||||
}
|
||||
|
||||
public static StringConverter<TradeCurrency> getCurrencyListConverter() {
|
||||
return new StringConverter<TradeCurrency>() {
|
||||
@Override
|
||||
public String toString(TradeCurrency tradeCurrency) {
|
||||
String code = tradeCurrency.getCode();
|
||||
final String displayString = CurrencyUtil.getNameAndCode(code);
|
||||
// http://boschista.deviantart.com/journal/Cool-ASCII-Symbols-214218618
|
||||
if (code.equals(GUIUtil.SHOW_ALL_FLAG))
|
||||
return "▶ Show all";
|
||||
else if (code.equals(GUIUtil.EDIT_FLAG))
|
||||
return "▼ Edit currency list";
|
||||
else if (tradeCurrency instanceof FiatCurrency)
|
||||
return "★ " + displayString;
|
||||
else if (tradeCurrency instanceof CryptoCurrency) {
|
||||
return "✦ " + displayString;
|
||||
} else
|
||||
return "-";
|
||||
}
|
||||
|
||||
@Override
|
||||
public TradeCurrency fromString(String s) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public static StringConverter<CurrencyListItem> getCurrencyListItemConverter(String postFix) {
|
||||
public static StringConverter<CurrencyListItem> getCurrencyListItemConverter(String postFix, Preferences preferences) {
|
||||
return new StringConverter<CurrencyListItem>() {
|
||||
@Override
|
||||
public String toString(CurrencyListItem item) {
|
||||
@ -216,7 +190,9 @@ public class GUIUtil {
|
||||
else if (code.equals(GUIUtil.EDIT_FLAG))
|
||||
return "▼ Edit currency list";
|
||||
else {
|
||||
final String displayString = CurrencyUtil.getNameByCode(code) + " (" + code + ", " + item.numTrades + " " + postFix + ")";
|
||||
String displayString = CurrencyUtil.getNameByCode(code) + " (" + code + ")";
|
||||
if (preferences.getSortMarketCurrenciesNumerically())
|
||||
displayString += " - " + item.numTrades + " " + postFix;
|
||||
if (tradeCurrency instanceof FiatCurrency)
|
||||
return "★ " + displayString;
|
||||
else if (tradeCurrency instanceof CryptoCurrency) {
|
||||
|
Loading…
Reference in New Issue
Block a user