Skip to content
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

Merged
merged 1 commit into from May 11, 2012
Merged

GUI messagepage: add placeholder text to address field (like in sendcoins dialog)... #1204

merged 1 commit into from May 11, 2012

Conversation

Diapolo
Copy link

@Diapolo Diapolo commented May 5, 2012

  • set focus to address field on opening messagepage or "Clear All"
  • consolidate BitcoinGUI::gotoMessagePage() functions into a single one
  • rename window title to "Sign Message Dialog"

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.

@@ -723,7 +723,6 @@ void BitcoinGUI::gotoMessagePage()
disconnect(exportAction, SIGNAL(triggered()), 0, 0);
#else
messagePage->show();
messagePage->setFocus();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove this?

Copy link
Author

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!

Copy link
Member

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.

Copy link
Author

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.

Copy link
Member

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 :/

Copy link
Author

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.

Copy link
Author

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

@Diapolo
Copy link
Author

Diapolo commented May 7, 2012

Rebased and reworked to be Qt < 4.7 compatible by using setPlaceholderText in the code instead of the ui-file.

@laanwj
Copy link
Member

laanwj commented May 7, 2012

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:

if(!addr.isEmpty())
    messagePage->setAddress(addr);

@Diapolo
Copy link
Author

Diapolo commented May 7, 2012

@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"
@Diapolo
Copy link
Author

Diapolo commented May 10, 2012

Rebased (resolves merge conflict) and added:

  • rename window title to "Sign Message Dialog"

laanwj added a commit that referenced this pull request May 11, 2012
GUI messagepage: add placeholder text to address field (like in sendcoins dialog)...
@laanwj laanwj merged commit b66737e into bitcoin:master May 11, 2012
coblee pushed a commit to litecoin-project/litecoin that referenced this pull request Jul 17, 2012
…older

GUI messagepage: add placeholder text to address field (like in sendcoins dialog)...
suprnurd pushed a commit to chaincoin-legacy/chaincoin that referenced this pull request Dec 5, 2017
lateminer pushed a commit to lateminer/bitcoin that referenced this pull request Jan 22, 2019
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(..).
lateminer pushed a commit to lateminer/bitcoin that referenced this pull request Dec 25, 2019
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
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants