[Python-checkins] python/dist/src/Lib/plat-mac EasyDialogs.py,1.9,1.10

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
2003年3月03日 04:25:05 -0800


Update of /cvsroot/python/python/dist/src/Lib/plat-mac
In directory sc8-pr-cvs1:/tmp/cvs-serv29414
Modified Files:
	EasyDialogs.py 
Log Message:
Call AEInteractWithUser() before bringing up any of the dialogs (with the
exception of the ProgressBar, which I think is okay to show in the background).
This is a prerequisitite for the fix of #684975.
Index: EasyDialogs.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/plat-mac/EasyDialogs.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** EasyDialogs.py	21 Feb 2003 23:18:48 -0000	1.9
--- EasyDialogs.py	3 Mar 2003 12:25:02 -0000	1.10
***************
*** 28,31 ****
--- 28,32 ----
 from Carbon import Controls
 from Carbon import Menu
+ from Carbon import AE
 import Nav
 import MacOS
***************
*** 47,51 ****
 	if _initialized: return
 	macresource.need("DLOG", 260, "dialogs.rsrc", __name__)
! 
 
 def cr2lf(text):
--- 48,55 ----
 	if _initialized: return
 	macresource.need("DLOG", 260, "dialogs.rsrc", __name__)
! 	
! def _interact():
! 	"""Make sure the application is in the foreground"""
! 	AE.AEInteractWithUser(50000000)
 
 def cr2lf(text):
***************
*** 69,72 ****
--- 73,77 ----
 	"""
 	_initialize()
+ 	_interact()
 	d = GetNewDialog(id, -1)
 	if not d:
***************
*** 101,104 ****
--- 106,110 ----
 	
 	_initialize()
+ 	_interact()
 	d = GetNewDialog(id, -1)
 	if not d:
***************
*** 142,145 ****
--- 148,152 ----
 	"""
 	_initialize()
+ 	_interact()
 	d = GetNewDialog(id, -1)
 	if not d:
***************
*** 185,188 ****
--- 192,196 ----
 	
 	_initialize()
+ 	_interact()
 	d = GetNewDialog(id, -1)
 	if not d:
***************
*** 417,420 ****
--- 425,429 ----
 def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfolder=1, id=ARGV_ID):
 	_initialize()
+ 	_interact()
 	d = GetNewDialog(id, -1)
 	if not d:
***************
*** 637,640 ****
--- 646,650 ----
 		popupExtension=popupExtension,eventProc=eventProc,previewProc=previewProc,
 		filterProc=filterProc,typeList=typeList,wanted=wanted,multiple=multiple) 
+ 	_interact()
 	try:
 		rr = Nav.NavChooseFile(args)
***************
*** 689,692 ****
--- 699,703 ----
 		popupExtension=popupExtension,eventProc=eventProc,fileType=fileType,
 		fileCreator=fileCreator,wanted=wanted,multiple=multiple) 
+ 	_interact()
 	try:
 		rr = Nav.NavPutFile(args)
***************
*** 748,751 ****
--- 759,763 ----
 		popupExtension=popupExtension,eventProc=eventProc,filterProc=filterProc,
 		wanted=wanted,multiple=multiple) 
+ 	_interact()
 	try:
 		rr = Nav.NavChooseFolder(args)

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