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
IDLE: Modernize config_key module #79779
Comments
|
I am going to merge on the presumption that you will follow through at least with more tests. Currently missing other than mac-code, according to coverage output: switch from 'advanced to basic and calls to final_key_selected, build_key_string, get_modifiers, and translate_key. The last should become a standalone function. I believe I have encountered a bug. Change a key binding. Cancel. Re-open config dialog. Try to change back. It says original binding is in use -- which it is if one closes IDLE and reopens, or opens a different instance. It seems that cancel is not properly undoing the temporary change. |
If you submit further PRs for this issue, the blurb will need to be changed as blurbs are for issues, not PRs. |
PR11360 adds tests to increase coverage. There isn't any refactor (moving translate_key) as part of this. I also didn't add any GUI-related tests against the buttons, entry, or listbox, except for the cancel key (in case that helps with the new bug reported). |
PR11365 revises the imports and switches to ttk widgets. |
PR11392 is the first refactor. It moves translate_key to the module level and also moves the definitions of the key tuples to the module level since they are used in more than one place (and they don't change). As a side note, I'll do the refactoring over several PRs to try to make it manageable to review. (PR11377 was the first version of this, but somehow I really messed it and couldn't get it back.) |
This issue looks complete to me unless there is something simple not previously mentioned. Fixing cancel would be a separate issue. Separating window and frame needs separate discussion on a separate issue, and is not a priority now. Model popups are different from independent listed windows, so I an not sure what we will want to do for a future tabbed window. A more immediate concern to me is finishing ttk conversion, including using ttk frames for ttk widgets. (See bpo-33987 for why.) |
Terry, I just saw your note about waiting to split this into a Window and Frame class, which was after I had already gotten the PR ready. I've been mostly offline for the past few days, so I had been working on those changes locally with the intent of pushing them once I was back online. I understand if it's not a priority to review. My main goal in splitting them was more for readability rather than for being able to add it to a Tabbed window. As a follow up to this refactor, I had hoped to split the Basic and Advanced frames into their own tabs, mostly to clean up the create_widgets and to organize the supporting functions. Anyway, PR11427 refactors the main frame from the window. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: