[Python-checkins] CVS: python/dist/src/Mac/Tools/IDE Splash.py,1.14,1.15 PythonIDEMain.py,1.13,1.14

Just van Rossum jvr@users.sourceforge.net
Fri, 02 Nov 2001 11:30:23 -0800


Update of /cvsroot/python/python/dist/src/Mac/Tools/IDE
In directory usw-pr-cvs1:/tmp/cvs-serv5744

Modified Files:
	Splash.py PythonIDEMain.py 
Log Message:
removed import display hackery

Index: Splash.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/Splash.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** Splash.py	2001/08/25 12:12:52	1.14
--- Splash.py	2001/11/02 19:30:21	1.15
***************
*** 6,79 ****
  
  from Carbon import Qd, TE, Fm
- import sys
- 
- _real__import__ = None
- 
- def install_importhook():
- 	global _real__import__
- 	import __builtin__
- 	if _real__import__ is None:
- 		_real__import__ = __builtin__.__import__
- 		__builtin__.__import__ = my__import__
- 
- def uninstall_importhook():
- 	global _real__import__
- 	if _real__import__ is not None:
- 		import __builtin__
- 		__builtin__.__import__ = _real__import__
- 		_real__import__ = None
- 
- _progress = 0
- 
- _about_width = 440
- _about_height = 340
- 
- def importing(module):
- 	global _progress
- 	Qd.SetPort(splash)
- 	fontID = Fm.GetFNum("Python-Sans")
- 	if not fontID:
- 		from Carbon.Fonts import geneva
- 		fontID = geneva
- 	Qd.TextFont(fontID)
- 	Qd.TextSize(9)
- 	labelrect = (35, _about_height - 35, _about_width - 35, _about_height - 19)
- 	framerect = (35, _about_height - 19, _about_width - 35, _about_height - 11)
- 	l, t, r, b = progrect = Qd.InsetRect(framerect, 1, 1)
- 	if module:
- 		TE.TETextBox('Importing: ' + module, labelrect, 0)
- 		if not _progress:
- 			Qd.FrameRect(framerect)
- 		pos = min(r, l + ((r - l) * _progress) / 44)
- 		Qd.PaintRect((l, t, pos, b))
- 		_progress = _progress + 1
- 	else:
- 		Qd.EraseRect(labelrect)
- 		Qd.PaintRect((l, t, pos, b))
- 	Qd.QDFlushPortBuffer(splash.GetDialogWindow().GetWindowPort(), None)
- 
- def my__import__(name, globals=None, locals=None, fromlist=None):
- 	try:
- 		return sys.modules[name]
- 	except KeyError:
- 		try:
- 			importing(name)
- 		except:
- 			try:
- 				rv = _real__import__(name)
- 			finally:
- 				uninstall_importhook()
- 			return rv
- 		return _real__import__(name)
  
- #install_importhook()
- 
- kHighLevelEvent = 23
  from Carbon import Win
  from Carbon.Fonts import *
  from Carbon.QuickDraw import *
! from Carbon.TextEdit import *
  import string
  import sys
  
  _keepsplashscreenopen = 0
--- 6,19 ----
  
  from Carbon import Qd, TE, Fm
  
  from Carbon import Win
  from Carbon.Fonts import *
  from Carbon.QuickDraw import *
! from Carbon.TextEdit import teJustCenter
  import string
  import sys
+ 
+ _about_width = 440
+ _about_height = 340
  
  _keepsplashscreenopen = 0

Index: PythonIDEMain.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/PythonIDEMain.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** PythonIDEMain.py	2001/08/25 12:10:43	1.13
--- PythonIDEMain.py	2001/11/02 19:30:21	1.14
***************
*** 1,3 ****
! # copyright 1997-2000 Just van Rossum, Letterror. just@letterror.com
  
  import Splash
--- 1,3 ----
! # copyright 1997-2001 Just van Rossum, Letterror. just@letterror.com
  
  import Splash
***************
*** 30,34 ****
  		import PyConsole, PyEdit
  		Splash.wait()
- 		Splash.uninstall_importhook()
  		PyConsole.installoutput()
  		PyConsole.installconsole()
--- 30,33 ----