From c47cc3b6848765431dfe2d5ae866e2eafdaf1f64 Mon Sep 17 00:00:00 2001 From: stan Date: Sun, 2 Feb 2025 18:18:24 +0000 Subject: [PATCH 1/4] Convert to buttons --- Lib/idlelib/help_about.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/Lib/idlelib/help_about.py b/Lib/idlelib/help_about.py index 81c65f6264e7b9..54badfcaf6201c 100644 --- a/Lib/idlelib/help_about.py +++ b/Lib/idlelib/help_about.py @@ -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("", 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) + forums = Button(info_buttons, text='Python Discuss', 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("", lambda event: webbrowser.open(docs_url)) + docs = Button(info_buttons, text='Python 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, From 245abe207a0fdfe95b3e68ef0f5237f425dcc338 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Date: Tue, 4 Feb 2025 16:33:08 +0000 Subject: [PATCH 2/4] Update Lib/idlelib/help_about.py Co-authored-by: Terry Jan Reedy --- Lib/idlelib/help_about.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/idlelib/help_about.py b/Lib/idlelib/help_about.py index 54badfcaf6201c..d2271a81376f4f 100644 --- a/Lib/idlelib/help_about.py +++ b/Lib/idlelib/help_about.py @@ -89,7 +89,7 @@ def create_widgets(self): forums_url = "https://discuss.python.org" info_buttons = Frame(frame_background, bg=self.bg) info_buttons.grid(row=3, column=0, columnspan=1, sticky=NSEW) - 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) From cef6a10c424dda0f14beeadff425752f598d2630 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Date: Tue, 4 Feb 2025 16:33:20 +0000 Subject: [PATCH 3/4] Update Lib/idlelib/help_about.py Co-authored-by: Terry Jan Reedy --- Lib/idlelib/help_about.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/idlelib/help_about.py b/Lib/idlelib/help_about.py index d2271a81376f4f..f953e12dbba573 100644 --- a/Lib/idlelib/help_about.py +++ b/Lib/idlelib/help_about.py @@ -97,7 +97,7 @@ def create_widgets(self): docs_url = ("https://docs.python.org/%d.%d/library/idle.html" % sys.version_info[:2]) - 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) From 751c88e3ab76400590d88954bf632de3bf497a4f Mon Sep 17 00:00:00 2001 From: stan Date: Tue, 4 Feb 2025 16:43:18 +0000 Subject: [PATCH 4/4] Terry's suggestion --- Lib/idlelib/help_about.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Lib/idlelib/help_about.py b/Lib/idlelib/help_about.py index f953e12dbba573..750da373272298 100644 --- a/Lib/idlelib/help_about.py +++ b/Lib/idlelib/help_about.py @@ -87,20 +87,18 @@ def create_widgets(self): byline.grid(row=2, column=0, sticky=W, columnspan=3, padx=10, pady=5) forums_url = "https://discuss.python.org" - info_buttons = Frame(frame_background, bg=self.bg) - info_buttons.grid(row=3, column=0, columnspan=1, sticky=NSEW) - forums = Button(info_buttons, text='Python (and IDLE) Discussion', width=35, + forums = Button(frame_background, 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) + forums.grid(row=6, column=0, sticky=W, padx=10, pady=10) docs_url = ("https://docs.python.org/%d.%d/library/idle.html" % sys.version_info[:2]) - docs = Button(info_buttons, text='IDLE Documentation', width=35, + docs = Button(frame_background, 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) + docs.grid(row=7, column=0, columnspan=2, sticky=W, padx=10, pady=10) Frame(frame_background, borderwidth=1, relief=SUNKEN,