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

Time to ditch myTkSimpleDialog #194

Closed
csatt opened this issue Mar 13, 2023 · 0 comments
Closed

Time to ditch myTkSimpleDialog #194

csatt opened this issue Mar 13, 2023 · 0 comments
Assignees
Labels
cosmetic Code cleanup, etc.

Comments

@csatt
Copy link
Owner

csatt commented Mar 13, 2023

The myTkSimpleDialog.py module was copied from the TkSimpleDialog.py module a long time ago and modified to put the OK and Cancel buttons in the correct places depending on the platform. It was an easy way to create dialogs that request strings and numbers. But the instances feature exposed another modification that is needed: these dialogs are not associated with the window from which they were launched; they are always associated with the main window. This not only makes the dialog pop up in an unexpected place but also brings the main window to the front and puts the focus on it. On Windows, if the main window is minimized, the dialog comes up minimized too, which is more than confusing. Furthermore, this module generates a large number of pylint errors and warnings.

The myTkSimpleDialog.py module should be retired. The IV_Swinger2_gui.py module already has a base Dialog class. It will be pretty simple to create the needed dialogs and functions to replace those from myTkSimpleDialog.py and to fix the issue mentioned above.

@csatt csatt added the cosmetic Code cleanup, etc. label Mar 13, 2023
@csatt csatt self-assigned this Mar 13, 2023
csatt added a commit that referenced this issue Mar 13, 2023
This commit removes the myTkSimpleDialog.py module and replaces it with internal classes and functions. These dialogs now require the specification of the master window that the dialog is associated with.
@csatt csatt closed this as completed Mar 13, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cosmetic Code cleanup, etc.
Projects
None yet
Development

No branches or pull requests

1 participant