summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-09-10 12:36:34 (GMT)
committerGuido van Rossum <guido@python.org>1996-09-10 12:36:34 (GMT)
commit8535b29f39a2ac7b45e6baaeeb300e5222dca05d (patch)
treebde702fdf8734dc9335e1eab795e7645559ff1c0
parent4b6b57980f89db547c36a1f7fc82afd1b258863a (diff)
downloadcpython-8535b29f39a2ac7b45e6baaeeb300e5222dca05d.zip
cpython-8535b29f39a2ac7b45e6baaeeb300e5222dca05d.tar.gz
cpython-8535b29f39a2ac7b45e6baaeeb300e5222dca05d.tar.bz2
compatibility changes suggested by Jack,
for tk_menuBar and tk_bindForTraversal (i.e. don't call these for Tk >= 4.1)
-rw-r--r--Lib/lib-tk/Tkinter.py6
-rwxr-xr-xLib/tkinter/Tkinter.py6
2 files changed, 8 insertions, 4 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index fd25c84..0892a69 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -139,7 +139,8 @@ class Misc:
return self.tk.getboolean(self.tk.call(
'set', 'tk_strictMotif', boolean))
def tk_menuBar(self, *args):
- apply(self.tk.call, ('tk_menuBar', self._w) + args)
+ if TkVersion < 4.1:
+ apply(self.tk.call, ('tk_menuBar', self._w) + args)
def wait_variable(self, name='PY_VAR'):
self.tk.call('tkwait', 'variable', name)
waitvar = wait_variable # XXX b/w compat
@@ -1217,7 +1218,8 @@ class Menu(Widget):
def __init__(self, master=None, cnf={}, **kw):
Widget.__init__(self, master, 'menu', cnf, kw)
def tk_bindForTraversal(self):
- self.tk.call('tk_bindForTraversal', self._w)
+ if TkVersion < 4.1:
+ self.tk.call('tk_bindForTraversal', self._w)
def tk_mbPost(self):
self.tk.call('tk_mbPost', self._w)
def tk_mbUnpost(self):
diff --git a/Lib/tkinter/Tkinter.py b/Lib/tkinter/Tkinter.py
index fd25c84..0892a69 100755
--- a/Lib/tkinter/Tkinter.py
+++ b/Lib/tkinter/Tkinter.py
@@ -139,7 +139,8 @@ class Misc:
return self.tk.getboolean(self.tk.call(
'set', 'tk_strictMotif', boolean))
def tk_menuBar(self, *args):
- apply(self.tk.call, ('tk_menuBar', self._w) + args)
+ if TkVersion < 4.1:
+ apply(self.tk.call, ('tk_menuBar', self._w) + args)
def wait_variable(self, name='PY_VAR'):
self.tk.call('tkwait', 'variable', name)
waitvar = wait_variable # XXX b/w compat
@@ -1217,7 +1218,8 @@ class Menu(Widget):
def __init__(self, master=None, cnf={}, **kw):
Widget.__init__(self, master, 'menu', cnf, kw)
def tk_bindForTraversal(self):
- self.tk.call('tk_bindForTraversal', self._w)
+ if TkVersion < 4.1:
+ self.tk.call('tk_bindForTraversal', self._w)
def tk_mbPost(self):
self.tk.call('tk_mbPost', self._w)
def tk_mbUnpost(self):