mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
add placeholder text to address field (like in sendcoins) and set focus to address field on opening messagepage or "Clear All" / consolidate gotoMessagePage() to 1 function / rename windowTitle to "Sign Message Dialog"
This commit is contained in:
parent
037a8daee6
commit
840470ec79
@ -724,8 +724,11 @@ void BitcoinGUI::gotoSendCoinsPage()
|
|||||||
disconnect(exportAction, SIGNAL(triggered()), 0, 0);
|
disconnect(exportAction, SIGNAL(triggered()), 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BitcoinGUI::gotoMessagePage()
|
void BitcoinGUI::gotoMessagePage(QString addr)
|
||||||
{
|
{
|
||||||
|
if(!addr.isEmpty())
|
||||||
|
messagePage->setAddress(addr);
|
||||||
|
|
||||||
#ifdef FIRST_CLASS_MESSAGING
|
#ifdef FIRST_CLASS_MESSAGING
|
||||||
messageAction->setChecked(true);
|
messageAction->setChecked(true);
|
||||||
centralWidget->setCurrentWidget(messagePage);
|
centralWidget->setCurrentWidget(messagePage);
|
||||||
@ -734,16 +737,9 @@ void BitcoinGUI::gotoMessagePage()
|
|||||||
disconnect(exportAction, SIGNAL(triggered()), 0, 0);
|
disconnect(exportAction, SIGNAL(triggered()), 0, 0);
|
||||||
#else
|
#else
|
||||||
messagePage->show();
|
messagePage->show();
|
||||||
messagePage->setFocus();
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void BitcoinGUI::gotoMessagePage(QString addr)
|
|
||||||
{
|
|
||||||
gotoMessagePage();
|
|
||||||
messagePage->setAddress(addr);
|
|
||||||
}
|
|
||||||
|
|
||||||
void BitcoinGUI::dragEnterEvent(QDragEnterEvent *event)
|
void BitcoinGUI::dragEnterEvent(QDragEnterEvent *event)
|
||||||
{
|
{
|
||||||
// Accept only URIs
|
// Accept only URIs
|
||||||
|
@ -46,7 +46,7 @@ public:
|
|||||||
functionality.
|
functionality.
|
||||||
*/
|
*/
|
||||||
void setWalletModel(WalletModel *walletModel);
|
void setWalletModel(WalletModel *walletModel);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void changeEvent(QEvent *e);
|
void changeEvent(QEvent *e);
|
||||||
void closeEvent(QCloseEvent *event);
|
void closeEvent(QCloseEvent *event);
|
||||||
@ -130,8 +130,7 @@ public slots:
|
|||||||
void askFee(qint64 nFeeRequired, bool *payFee);
|
void askFee(qint64 nFeeRequired, bool *payFee);
|
||||||
void handleURI(QString strURI);
|
void handleURI(QString strURI);
|
||||||
|
|
||||||
void gotoMessagePage();
|
void gotoMessagePage(QString addr = "");
|
||||||
void gotoMessagePage(QString);
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
/** Switch to overview (home) page */
|
/** Switch to overview (home) page */
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Message</string>
|
<string>Sign Message Dialog</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
|
@ -24,14 +24,17 @@ MessagePage::MessagePage(QWidget *parent) :
|
|||||||
ui(new Ui::MessagePage)
|
ui(new Ui::MessagePage)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
#if (QT_VERSION >= 0x040700)
|
#if (QT_VERSION >= 0x040700)
|
||||||
/* Do not move this to the XML file, Qt before 4.7 will choke on it */
|
/* Do not move this to the XML file, Qt before 4.7 will choke on it */
|
||||||
|
ui->signFrom->setPlaceholderText(tr("Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)"));
|
||||||
ui->signature->setPlaceholderText(tr("Click \"Sign Message\" to get signature"));
|
ui->signature->setPlaceholderText(tr("Click \"Sign Message\" to get signature"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GUIUtil::setupAddressWidget(ui->signFrom, this);
|
GUIUtil::setupAddressWidget(ui->signFrom, this);
|
||||||
ui->signature->installEventFilter(this);
|
ui->signature->installEventFilter(this);
|
||||||
|
|
||||||
|
ui->signFrom->setFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
MessagePage::~MessagePage()
|
MessagePage::~MessagePage()
|
||||||
@ -117,6 +120,8 @@ void MessagePage::on_clearButton_clicked()
|
|||||||
ui->signFrom->clear();
|
ui->signFrom->clear();
|
||||||
ui->message->clear();
|
ui->message->clear();
|
||||||
ui->signature->clear();
|
ui->signature->clear();
|
||||||
|
|
||||||
|
ui->signFrom->setFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MessagePage::eventFilter(QObject *object, QEvent *event)
|
bool MessagePage::eventFilter(QObject *object, QEvent *event)
|
||||||
|
Loading…
Reference in New Issue
Block a user