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

Should work around Mac gray menu bug properly #55

Closed
csatt opened this issue Feb 6, 2019 · 0 comments
Closed

Should work around Mac gray menu bug properly #55

csatt opened this issue Feb 6, 2019 · 0 comments
Assignees
Labels

Comments

@csatt
Copy link
Owner

csatt commented Feb 6, 2019

The original fix for Issue #12 was incomplete. The fix for Issue #36 filled one hole, but many more remain. Also, the fix for Issue #12 was kludgy. It made all dialogs derived from the Dialog class non-modal, which meant that they often needed methods called "constrain_master" and "restore_master" to explicitly prevent the user from performing certain actions in the master window.

The workaround for this bug should be done so it covers all cases and so that the dialogs can once again be modal.

csatt added a commit that referenced this issue Feb 6, 2019
This is a better fix for Issue #12 and Issue #36 that:
   - Also fix all other cases where the bug could manifest itself (all tk dialogs)
   - Restores the Dialog class to be modal

The new workaround is to recreate the whole menubar whenever a modal window is closed. This is the same workaround used for Issue #36, but is now enclosed in a method mac_grayed_menu_workaround. Calls to that method are placed after every usage of a dialog. To reduce the clutter, most of the tk dialogs (tkMessageBox, tkSimpleDialog, etc) are enclosed in wrappers that include the workaround.

The generic Dialog class is now reverted to its original modal behavior. All the dialog classes derived from Dialog no longer need the constrain_master and restore_master methods, so those (and calls to them) have been removed.
@csatt csatt closed this as completed Feb 6, 2019
@csatt csatt self-assigned this Feb 6, 2019
@csatt csatt added the bug label Feb 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant