[Python-checkins] python/dist/src/Tools/idle CallTipWindow.py,1.3,1.3.22.1

mwh@users.sourceforge.net mwh@users.sourceforge.net
2002年8月23日 08:53:07 -0700


Update of /cvsroot/python/python/dist/src/Tools/idle
In directory usw-pr-cvs1:/tmp/cvs-serv7655
Modified Files:
 Tag: release22-maint
	CallTipWindow.py 
Log Message:
backport tim_one's checkin of
 revision 1.4 of CallTipWindow.py
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.3.22.1
diff -C2 -d -r1.3 -r1.3.22.1
*** CallTipWindow.py	17 Jan 2001 08:48:39 -0000	1.3
--- CallTipWindow.py	23 Aug 2002 15:53:05 -0000	1.3.22.1
***************
*** 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

AltStyle によって変換されたページ (->オリジナル) /