From: Serhiy Storchaka Date: Fri, 25 Jul 2014 09:29:40 +0000 (+0300) Subject: Issue #22061: Restored empty obsolete methods removed in issue #4350 and X-Git-Tag: v3.5.0a1~1205 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=68a470f65d207419be1f40f8fec743a51529ca7e;p=python Issue #22061: Restored empty obsolete methods removed in issue #4350 and added deprecation warnings to them. --- 68a470f65d207419be1f40f8fec743a51529ca7e diff --cc Lib/tkinter/__init__.py index 3f30ae4b74,75e5fb1cd7..aaa2bfce1a --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@@ -2657,9 -2676,35 +2663,15 @@@ class Menu(Widget) disabledforeground, fg, font, foreground, postcommand, relief, selectcolor, takefocus, tearoff, tearoffcommand, title, type.""" Widget.__init__(self, master, 'menu', cnf, kw) + def tk_popup(self, x, y, entry=""): + """Post the menu at position X,Y with entry ENTRY.""" + self.tk.call('tk_popup', self._w, x, y, entry) + def tk_bindForTraversal(self): + # obsolete since Tk 4.0 + import warnings + warnings.warn('tk_bindForTraversal() does nothing and ' + 'will be removed in 3.6', + DeprecationWarning, stacklevel=2) - def tk_mbPost(self): - self.tk.call('tk_mbPost', self._w) - def tk_mbUnpost(self): - self.tk.call('tk_mbUnpost') - def tk_traverseToMenu(self, char): - self.tk.call('tk_traverseToMenu', self._w, char) - def tk_traverseWithinMenu(self, char): - self.tk.call('tk_traverseWithinMenu', self._w, char) - def tk_getMenuButtons(self): - return self.tk.call('tk_getMenuButtons', self._w) - def tk_nextMenu(self, count): - self.tk.call('tk_nextMenu', count) - def tk_nextMenuEntry(self, count): - self.tk.call('tk_nextMenuEntry', count) - def tk_invokeMenu(self): - self.tk.call('tk_invokeMenu', self._w) - def tk_firstMenu(self): - self.tk.call('tk_firstMenu', self._w) - def tk_mbButtonDown(self): - self.tk.call('tk_mbButtonDown', self._w) - def tk_popup(self, x, y, entry=""): - """Post the menu at position X,Y with entry ENTRY.""" - self.tk.call('tk_popup', self._w, x, y, entry) def activate(self, index): """Activate entry at INDEX.""" self.tk.call(self._w, 'activate', index)