[Python-checkins] python/dist/src/Tools/idle CallTipWindow.py,1.3,1.4
tim_one@sourceforge.net
tim_one@sourceforge.net
Mon, 22 Apr 2002 11:43:52 -0700
Update of /cvsroot/python/python/dist/src/Tools/idle
In directory usw-pr-cvs1:/tmp/cvs-serv23115/python/Tools/idle
Modified Files:
CallTipWindow.py
Log Message:
SF bug 546078: IDLE calltips cause application error.
Assorted crashes on Windows and Linux when trying to display a very
long calltip, most likely a Tk bug. Wormed around by clamping the
calltip display to a maximum of 79 characters (why 79? why not ...).
Bugfix candidate, for all Python releases.
Index: CallTipWindow.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/idle/CallTipWindow.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** CallTipWindow.py 17 Jan 2001 08:48:39 -0000 1.3
--- CallTipWindow.py 22 Apr 2002 18:43:49 -0000 1.4
***************
*** 15,19 ****
--- 15,25 ----
def showtip(self, text):
+ # SF bug 546078: IDLE calltips cause application error.
+ # There were crashes on various Windows flavors, and even a
+ # crashing X server on Linux, with very long calltips.
+ if len(text) >= 79:
+ text = text[:75] + ' ...'
self.text = text
+
if self.tipwindow or not self.text:
return