[Python-checkins] python/dist/src/Mac/Demo/textedit ped.py,1.10,1.11

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
Sun, 26 Jan 2003 13:36:17 -0800


Update of /cvsroot/python/python/dist/src/Mac/Demo/textedit
In directory sc8-pr-cvs1:/tmp/cvs-serv23956

Modified Files:
	ped.py 
Log Message:
Use new file dialogs.

Index: ped.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Demo/textedit/ped.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** ped.py	30 Nov 2002 00:01:21 -0000	1.10
--- ped.py	26 Jan 2003 21:36:15 -0000	1.11
***************
*** 132,138 ****
  		
  	def menu_save_as(self):
! 		fss, ok = macfs.StandardPutFile('Save as:')
! 		if not ok: return
! 		self.path = fss.as_pathname()
  		self.name = os.path.split(self.path)[-1]
  		self.wid.SetWTitle(self.name)
--- 132,138 ----
  		
  	def menu_save_as(self):
! 		path = EasyDialogs.AskFileForSave(message='Save as:')
! 		if not path: return
! 		self.path = path
  		self.name = os.path.split(self.path)[-1]
  		self.wid.SetWTitle(self.name)
***************
*** 266,273 ****
  	def _open(self, askfile):
  		if askfile:
! 			fss, ok = macfs.StandardGetFile('TEXT')
! 			if not ok:
  				return
- 			path = fss.as_pathname()
  			name = os.path.split(path)[-1]
  			try:
--- 266,272 ----
  	def _open(self, askfile):
  		if askfile:
! 			path = EasyDialogs.AskFileForOpen(typeList=('TEXT',))
! 			if not path:
  				return
  			name = os.path.split(path)[-1]
  			try: