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-69001: Convert links to more usable buttons #129591

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions Lib/idlelib/help_about.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,21 @@ def create_widgets(self):
byline.grid(row=2, column=0, sticky=W, columnspan=3, padx=10, pady=5)

forums_url = "https://discuss.python.org"
forums = Label(frame_background, text="Python forums: "+forums_url,
justify=LEFT, fg=self.fg, bg=self.bg)
forums.grid(row=6, column=0, sticky=W, padx=10, pady=0)
forums.bind("<Button-1>", lambda event: webbrowser.open(forums_url))
info_buttons = Frame(frame_background, bg=self.bg)
info_buttons.grid(row=3, column=0, columnspan=1, sticky=NSEW)
Comment on lines +90 to +91
Copy link
Member

Choose a reason for hiding this comment

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

I would rather delete info_buttons and derive the new buttons directly from frame_background (and change the grid lines to 6 and 7) as before. I want to be able to move them independently in another PR.

forums = Button(info_buttons, text='Python Discuss', width=35,
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
forums = Button(info_buttons, text='Python Discuss', width=35,
forums = Button(info_buttons, text='Python (and IDLE) Discussion', width=35,

highlightbackground=self.bg,
command=lambda: webbrowser.open(forums_url))
forums.grid(row=3, column=0, sticky=W, padx=10, pady=10)


docs_url = ("https://docs.python.org/%d.%d/library/idle.html" %
sys.version_info[:2])
docs = Label(frame_background, text=docs_url,
justify=LEFT, fg=self.fg, bg=self.bg)
docs.grid(row=7, column=0, columnspan=2, sticky=W, padx=10, pady=0)
docs.bind("<Button-1>", lambda event: webbrowser.open(docs_url))
docs = Button(info_buttons, text='Python Documentation', width=35,
Copy link
Member

Choose a reason for hiding this comment

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

This URL is specifically for IDLE. This is redundant with the IDLE Docs entry in the HELP menu, but this PR is about button instead of label.

Suggested change
docs = Button(info_buttons, text='Python Documentation', width=35,
docs = Button(info_buttons, text='IDLE Documentation', width=35,

highlightbackground=self.bg,
command=lambda: webbrowser.open(docs_url))
docs.grid(row=4, column=0, columnspan=2, sticky=W, padx=10, pady=10)


Frame(frame_background, borderwidth=1, relief=SUNKEN,
height=2, bg=self.bg).grid(row=8, column=0, sticky=EW,
Expand Down
Loading