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

gh-111576: Improve documention for tkinter.messagebox #111578

Merged

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Oct 31, 2023

This is only available on macOS.

*default*
Gives the :ref:`symbolic name <messagebox-buttons>` of the default button
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Gives the :ref:`symbolic name <messagebox-buttons>` of the default button
Gives the :ref:`symbolic name <messagebox-buttons>` of the button initially selected (highlighted)

Copy link
Member Author

Choose a reason for hiding this comment

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

The Tk documentation uses term "selected" not as a synonym of "highlighted" but as "the one selected by the user". Most of documentation are copied from the Tk manpage with small adaptation, it is better to not introduce inconsistencies. The same terminology can be used in other parts of the Tk documentation (for example the default button is mentioned again three lines below).

to be displayed.


Returns the symbolic name of the selected button.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Returns the symbolic name of the selected button.
Returns the symbolic name of the selected button, which is the one clicked on or the one highlighted when the Enter key is hit. Change the button selected with the Tab key or arrow keys.

Could have 🔑 markup, but I forget the details. I am not sure what the truth is for the second sentence. Same on all systems? Others will not know either ;-).

Copy link
Member Author

Choose a reason for hiding this comment

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

It adds too much details which are not even correct. You can select the button by pressing Space or a shortcut (Alt+the underscored letter). Arrow keys do not change the default button on X Window. Some other keys (e.g Shift-Tab) can change the default button.

Tk uses default behavior on every platform, and it is not a good place to describe it.

@bedevere-app
Copy link

bedevere-app bot commented Nov 1, 2023

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

And if you don't make the requested changes, you will be poked with soft cushions!

@serhiy-storchaka serhiy-storchaka merged commit eaf67e3 into python:main Nov 1, 2023
24 of 25 checks passed
@miss-islington-app
Copy link

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@serhiy-storchaka serhiy-storchaka deleted the wip-tkinter-messagebox-docs branch November 1, 2023 10:27
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 1, 2023
@bedevere-app
Copy link

bedevere-app bot commented Nov 1, 2023

GH-111597 is a backport of this pull request to the 3.12 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 1, 2023
@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Nov 1, 2023
@bedevere-app
Copy link

bedevere-app bot commented Nov 1, 2023

GH-111598 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Nov 1, 2023
serhiy-storchaka added a commit that referenced this pull request Nov 1, 2023
…) (GH-111597)

(cherry picked from commit eaf67e3)

Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka added a commit that referenced this pull request Nov 1, 2023
…) (GH-111598)

(cherry picked from commit eaf67e3)

Co-authored-by: Serhiy Storchaka <[email protected]>
FullteaR pushed a commit to FullteaR/cpython that referenced this pull request Nov 3, 2023
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news topic-tkinter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants