diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-09-25 13:46:10 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-09-25 13:46:10 (GMT) |
commit | e6f0199c190754cf0da60f98f85e2503109e692d (patch) | |
tree | 9eff07c2e7cb3c3198b83e07611bc1342cb6aef5 | |
parent | 613f8e513cf171a335318221b6050d470a1d765f (diff) | |
download | cpython-e6f0199c190754cf0da60f98f85e2503109e692d.zip cpython-e6f0199c190754cf0da60f98f85e2503109e692d.tar.gz cpython-e6f0199c190754cf0da60f98f85e2503109e692d.tar.bz2 |
Issue #27611: Fixed support of default root window in the tkinter.tix module.
-rw-r--r-- | Lib/tkinter/tix.py | 13 | ||||
-rw-r--r-- | Misc/NEWS | 2 |
2 files changed, 11 insertions, 4 deletions
diff --git a/Lib/tkinter/tix.py b/Lib/tkinter/tix.py index 89113fd..7fb4bc5 100644 --- a/Lib/tkinter/tix.py +++ b/Lib/tkinter/tix.py @@ -477,10 +477,15 @@ class DisplayStyle: (multiple) Display Items""" def __init__(self, itemtype, cnf={}, **kw): - master = tkinter._default_root # global from Tkinter - if not master and 'refwindow' in cnf: master=cnf['refwindow'] - elif not master and 'refwindow' in kw: master= kw['refwindow'] - elif not master: raise RuntimeError("Too early to create display style: no root window") + if 'refwindow' in kw: + master = kw['refwindow'] + elif 'refwindow' in cnf: + master = cnf['refwindow'] + else: + master = tkinter._default_root + if not master: + raise RuntimeError("Too early to create display style: " + "no root window") self.tk = master.tk self.stylename = self.tk.call('tixDisplayStyle', itemtype, *self._options(cnf,kw) ) @@ -80,6 +80,8 @@ Core and Builtins Library ------- +- Issue #27611: Fixed support of default root window in the tkinter.tix module. + - Issue #27348: In the traceback module, restore the formatting of exception messages like "Exception: None". This fixes a regression introduced in 3.5a2. |