Skip to content

gh-78143: IDLE - replace config dlg scale with ttk spinbox #22954

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

Merged
merged 16 commits into from
Jun 10, 2021

Conversation

roseman
Copy link
Contributor

@roseman roseman commented Oct 25, 2020

  • replace scale with ttk.Spinbox
  • if ttk.Spinbox not available (Tk < 8.5.9) use readonly ttk.Combobox (as both fully constrain available choices)
  • note that test originally tried to set a value above the maximum range and relied on the scale adjusting it to the maximum; without adding extra validation code, neither the spinbox or the combobox will do this; given that neither allows arbitrary input, I adjusted the test to provide a value within range

- replace scale with ttk.Spinbox
- if ttk.Spinbox not available (Tk < 8.5.9) use readonly ttk.Combobox (as both fully constrain available choices)
- note that test originally tried to set a value above the maximum range and relied on the scale adjusting it to the maximum; without adding extra validation code, neither the spinbox or the combobox will do this; given that neither allows arbitrary input, I adjusted the test to provide a value within range
@terryjreedy
Copy link
Member

See issue for initial review of widget in operation.

@terryjreedy
Copy link
Member

Test failure is patchcheck trailing whitespace failure.

@E-Paine
Copy link
Contributor

E-Paine commented Oct 25, 2020

TBH, I wouldn't bother checking for 8.5.9 as of all the distros/BSDs listed on pkgs.org, only CentOS 6 (which reaches EOL very soon) has <8.5.9 (8.5.7).

roseman and others added 5 commits October 25, 2020 08:08
- replace scale with ttk.Spinbox
- if ttk.Spinbox not available (Tk < 8.5.9) use readonly ttk.Combobox (as both fully constrain available choices)
- note that test originally tried to set a value above the maximum range and relied on the scale adjusting it to the maximum; without adding extra validation code, neither the spinbox or the combobox will do this; given that neither allows arbitrary input, I adjusted the test to provide a value within range
@terryjreedy
Copy link
Member

Centos 6 and 7 seem to be the only ones without 8.6. NetBSD offers 8.5.19 as an option.

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Dec 16, 2020
@terryjreedy
Copy link
Member

terryjreedy commented Jun 8, 2021

Centos 6 is no longer on the list at https://pkgs.org/download/tk. Centos 7 has 8.5.13. Centos 8 is 8.6.8. The Pipelines failure report is not available. I did an update merge, needed anyway, to force retesting.
EDIT: all pass now.

@terryjreedy
Copy link
Member

I put the spinbox on the new Windows tab and made it writeable by using a StringVar. I intend to merge it tomorrow.

@terryjreedy terryjreedy added needs backport to 3.9 only security fixes needs backport to 3.10 only security fixes type-feature A feature request or enhancement labels Jun 10, 2021
@miss-islington
Copy link
Contributor

Thanks @roseman for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.9.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-26647 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Jun 10, 2021
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 10, 2021
If ttk.Spinbox is not available (Tk < 8.5.9) use readonly ttk.Combobox.

Co-authored-by: Terry Jan Reedy <[email protected]>
(cherry picked from commit 42d5a4f)

Co-authored-by: Mark Roseman <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 10, 2021
If ttk.Spinbox is not available (Tk < 8.5.9) use readonly ttk.Combobox.

Co-authored-by: Terry Jan Reedy <[email protected]>
(cherry picked from commit 42d5a4f)

Co-authored-by: Mark Roseman <[email protected]>
@bedevere-bot
Copy link

GH-26648 is a backport of this pull request to the 3.9 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Jun 10, 2021
miss-islington added a commit that referenced this pull request Jun 10, 2021
If ttk.Spinbox is not available (Tk < 8.5.9) use readonly ttk.Combobox.

Co-authored-by: Terry Jan Reedy <[email protected]>
(cherry picked from commit 42d5a4f)

Co-authored-by: Mark Roseman <[email protected]>
terryjreedy pushed a commit that referenced this pull request Jun 10, 2021
If ttk.Spinbox is not available (Tk < 8.5.9) use readonly ttk.Combobox.

Co-authored-by: Terry Jan Reedy <[email protected]>
(cherry picked from commit 42d5a4f)

Co-authored-by: Mark Roseman <[email protected]>
@terryjreedy terryjreedy changed the title bpo-33962: replace idle config dlg scale with ttk spinbox gh-78143: IDLE - replace config dlg scale with ttk spinbox Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale PR or inactive for long period of time. type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants