diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2024-02-05 16:24:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-05 16:24:54 (GMT) |
commit | b4ba0f73d6eef3da321bb96aafd09dfbc572e95d (patch) | |
tree | b7e4d26504fe8fcb7dcddc469508eab22afda319 /Lib/tkinter/simpledialog.py | |
parent | 992446dd5bd3fff92ea0f8064fb19eebfe105cef (diff) | |
download | cpython-b4ba0f73d6eef3da321bb96aafd09dfbc572e95d.zip cpython-b4ba0f73d6eef3da321bb96aafd09dfbc572e95d.tar.gz cpython-b4ba0f73d6eef3da321bb96aafd09dfbc572e95d.tar.bz2 |
gh-43457: Tkinter: fix design flaws in wm_attributes() (GH-111404)
* When called with a single argument to get a value, it allow to omit
the minus prefix.
* It can be called with keyword arguments to set attributes.
* w.wm_attributes(return_python_dict=True) returns a dict instead of
a tuple (it will be the default in future).
* Setting wantobjects to 0 no longer affects the result.
Diffstat (limited to 'Lib/tkinter/simpledialog.py')
-rw-r--r-- | Lib/tkinter/simpledialog.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/tkinter/simpledialog.py b/Lib/tkinter/simpledialog.py index 538bbfc..0f0dc66 100644 --- a/Lib/tkinter/simpledialog.py +++ b/Lib/tkinter/simpledialog.py @@ -262,7 +262,7 @@ def _setup_dialog(w): w.tk.call("::tk::unsupported::MacWindowStyle", "style", w, "moveableModal", "") elif w._windowingsystem == "x11": - w.wm_attributes("-type", "dialog") + w.wm_attributes(type="dialog") # -------------------------------------------------------------------- # convenience dialogues |