]> granicus.if.org Git - python/commitdiff
compatibility changes suggested by Jack,
authorGuido van Rossum <guido@python.org>
Tue, 10 Sep 1996 12:36:34 +0000 (12:36 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 10 Sep 1996 12:36:34 +0000 (12:36 +0000)
for tk_menuBar and tk_bindForTraversal
(i.e. don't call these for Tk >= 4.1)

Lib/lib-tk/Tkinter.py
Lib/tkinter/Tkinter.py

index fd25c8420aa4ecabe5b2bbf970ebeb0fe48ed2e8..0892a697c399c7eada149f992782d3947ab6ed48 100644 (file)
@@ -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):
index fd25c8420aa4ecabe5b2bbf970ebeb0fe48ed2e8..0892a697c399c7eada149f992782d3947ab6ed48 100755 (executable)
@@ -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):