[Idle-dev] CVS: idle CallTipWindow.py,1.3,1.4
Kurt B. Kaiser
kbk@users.sourceforge.net
Sun, 15 Sep 2002 14:43:16 -0700
Update of /cvsroot/idlefork/idle
In directory usw-pr-cvs1:/tmp/cvs-serv1427
Modified Files:
CallTipWindow.py
Log Message:
Merge Py Idle changes
Rev 1.4
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.
Rev 1.5
Remove unnecessary imports
Index: CallTipWindow.py
===================================================================
RCS file: /cvsroot/idlefork/idle/CallTipWindow.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** CallTipWindow.py 12 Jul 2001 22:26:44 -0000 1.3
--- CallTipWindow.py 15 Sep 2002 21:43:13 -0000 1.4
***************
*** 3,7 ****
# Used by the CallTips IDLE extension.
- import os
from Tkinter import *
--- 3,6 ----
***************
*** 15,19 ****
--- 14,24 ----
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