New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GUI messagepage: add placeholder text to address field (like in sendcoins dialog)... #1204
Conversation
@@ -723,7 +723,6 @@ void BitcoinGUI::gotoMessagePage() | |||
disconnect(exportAction, SIGNAL(triggered()), 0, 0); | |||
#else | |||
messagePage->show(); | |||
messagePage->setFocus(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we want the focus in signFrom, so this is obsolete. Try it out, it works!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"It works" != "It's guaranteed to work"; I would be fairly disappointed if setting focus on a widget also brought the window into focus.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I leave this setFocus(), signFrom is NOT focused, but I guess @laanwj should verify my code then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this. Would need to be tested on various OSes :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I set the focus on an element in a widget instead of the widget itself ... perhaps I find the answer via a web-search. Sounds pretty logical though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the MessagePage has set the flag focusPolicy = NoFocus (which is the default), I'm rather sure the setFocus() had no function before! And signFrom has focusPolicy = StrongFocus, which allows setting the focus to.
See http://qt-project.org/doc/qt-4.8/qt.html#FocusPolicy-enum
Rebased and reworked to be Qt < 4.7 compatible by using setPlaceholderText in the code instead of the ui-file. |
Good! Btw, I think it is confusing that there are two slots gotoMessagePage. If you want, you can consolidate the gotoMessagePage to one slot that takes a QString argument that defaults to the empty string. Then add:
|
@laanwj I added your suggestion and consolidated gotoMessagePage() into 1 function. |
…us to address field on opening messagepage or "Clear All" / consolidate gotoMessagePage() to 1 function / rename windowTitle to "Sign Message Dialog"
Rebased (resolves merge conflict) and added:
|
GUI messagepage: add placeholder text to address field (like in sendcoins dialog)...
…older GUI messagepage: add placeholder text to address field (like in sendcoins dialog)...
This allows to specify multiple logging categories separated by comma on the command line, like this: ./bitcoind -debug=net,rpc,req It also removes any spaces in the argument list. Comes with a simple test case for splitByCommaAndRemoveSpaces(..).
976f16a [Build] Bump snapcraft nightlies to 4.0.99 (Fuzzbawls) Pull request description: Snapcraft nightly build version bump. Missed doing this in bitcoin#1200 ACKs for top commit: random-zebra: utACK 976f16a furszy: utACK 976f16a Warrows: utACK 976f16a Tree-SHA512: 3eb65527751fa3145f7f40c71a544baa603ce580daf627e3624a55b131a9da3bfc1810e97c391ada042391b875ad4f92f586d55d4c5efe7b26c61d552b64942e
If you directly open the message page via clicking Sign Message and passing an address, the focus is in the message input field, as intended. If you simply open the message page via menu, focus is set to the address field.