Skip to content

Commit 03e781f

Browse files
author
MarcoFalke
committed
Merge #17702: gui: Move static placeholder texts to forms
a652dc5 qt: Normalize placeholder to avoid using "address book" in sendcoinsentry (Wladimir J. van der Laan) 67f36e0 gui: Move static placeholder texts to forms (Wladimir J. van der Laan) Pull request description: There was an issue around the time of Qt 4.6 when placeholder text was introduced, that caused a compile failure when it was specified in the form. As a workaround the placeholder texts were moved to the code. Qt 4 hasn't been relevant to us for ages. So move all (non-parametrized) placeholder texts to the form files instead. It's better to keep this kind of text content together. Translate/no-translate status is kept as it is. Proof that they still work: ![win1](https://user-images.githubusercontent.com/126646/70428014-0e80b300-1a76-11ea-9a6d-be78a0bf14ed.png) ![win2](https://user-images.githubusercontent.com/126646/70428019-10e30d00-1a76-11ea-8016-ffa0c4eafe34.png) ![win3](https://user-images.githubusercontent.com/126646/70428021-13456700-1a76-11ea-9449-9413487e39f6.png) ![win4](https://user-images.githubusercontent.com/126646/70428025-150f2a80-1a76-11ea-92ad-be5f3c171c43.png) ACKs for top commit: hebasto: Re-ACK a652dc5, `tooltip` and `placeholderText` are identical now. MarcoFalke: ACK a652dc5 🚿 fanquake: ACK a652dc5 - checked that placeholder text still appears. Tree-SHA512: 7d3c1faeef2eb5d4b195d9d78f2a3f161296d869e5059b5e8d308167e3c6c668a3ebabec93dc592762ba15bfc86d51985e20c4e17f1065c8dce84fec036ff5ee
2 parents 1d6fda6 + a652dc5 commit 03e781f

8 files changed

+14
-7
lines changed

src/qt/forms/openuridialog.ui

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@
2424
</widget>
2525
</item>
2626
<item>
27-
<widget class="QValidatedLineEdit" name="uriEdit"/>
27+
<widget class="QValidatedLineEdit" name="uriEdit">
28+
<property name="placeholderText">
29+
<string notr="true">bitcoin:</string>
30+
</property>
31+
</widget>
2832
</item>
2933
</layout>
3034
</item>

src/qt/forms/optionsdialog.ui

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,9 @@
685685
<property name="toolTip">
686686
<string>Third party URLs (e.g. a block explorer) that appear in the transactions tab as context menu items. %s in the URL is replaced by transaction hash. Multiple URLs are separated by vertical bar |.</string>
687687
</property>
688+
<property name="placeholderText">
689+
<string notr="true">https://example.com/tx/%s</string>
690+
</property>
688691
</widget>
689692
</item>
690693
</layout>

src/qt/forms/sendcoinsentry.ui

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@
144144
<property name="toolTip">
145145
<string>Enter a label for this address to add it to the list of used addresses</string>
146146
</property>
147+
<property name="placeholderText">
148+
<string>Enter a label for this address to add it to the list of used addresses</string>
149+
</property>
147150
</widget>
148151
</item>
149152
<item row="2" column="0">

src/qt/forms/signverifymessagedialog.ui

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@
121121
</property>
122122
<item>
123123
<widget class="QLineEdit" name="signatureOut_SM">
124+
<property name="placeholderText">
125+
<string>Click "Sign Message" to generate signature</string>
126+
</property>
124127
<property name="font">
125128
<font>
126129
<italic>true</italic>

src/qt/openuridialog.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ OpenURIDialog::OpenURIDialog(QWidget *parent) :
1515
ui(new Ui::OpenURIDialog)
1616
{
1717
ui->setupUi(this);
18-
ui->uriEdit->setPlaceholderText("bitcoin:");
1918
}
2019

2120
OpenURIDialog::~OpenURIDialog()

src/qt/optionsdialog.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,6 @@ OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) :
110110
ui->lang->addItem(locale.nativeLanguageName() + QString(" (") + langStr + QString(")"), QVariant(langStr));
111111
}
112112
}
113-
ui->thirdPartyTxUrls->setPlaceholderText("https://example.com/tx/%s");
114-
115113
ui->unit->setModel(new BitcoinUnits(this));
116114

117115
/* Widget-to-option mapper */

src/qt/sendcoinsentry.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ SendCoinsEntry::SendCoinsEntry(const PlatformStyle *_platformStyle, QWidget *par
3737

3838
if (platformStyle->getUseExtraSpacing())
3939
ui->payToLayout->setSpacing(4);
40-
ui->addAsLabel->setPlaceholderText(tr("Enter a label for this address to add it to your address book"));
4140

4241
// normal bitcoin address field
4342
GUIUtil::setupAddressWidget(ui->payTo, this);

src/qt/signverifymessagedialog.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ SignVerifyMessageDialog::SignVerifyMessageDialog(const PlatformStyle *_platformS
3535
ui->verifyMessageButton_VM->setIcon(platformStyle->SingleColorIcon(":/icons/transaction_0"));
3636
ui->clearButton_VM->setIcon(platformStyle->SingleColorIcon(":/icons/remove"));
3737

38-
ui->signatureOut_SM->setPlaceholderText(tr("Click \"Sign Message\" to generate signature"));
39-
4038
GUIUtil::setupAddressWidget(ui->addressIn_SM, this);
4139
GUIUtil::setupAddressWidget(ui->addressIn_VM, this);
4240

0 commit comments

Comments
 (0)