[Python-checkins] CVS: python/dist/src/Mac/Tools/IDE PyEdit.py,1.17,1.18

Jack Jansen jackjansen@users.sourceforge.net
Wed, 23 May 2001 13:03:08 -0700


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

Modified Files:
	PyEdit.py 
Log Message:
One more macroman<->latin1 conversion victim.

Index: PyEdit.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/PyEdit.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** PyEdit.py	2001/02/21 13:54:31	1.17
--- PyEdit.py	2001/05/23 20:03:06	1.18
***************
*** 68,72 ****
  				sourceOS = 'UNIX'
  				searchString = '\n'
! 			change = EasyDialogs.AskYesNoCancel('³%s² contains %s-style line feeds. '
  					'Change them to MacOS carriage returns?' % (self.title, sourceOS), 1)
  			# bug: Cancel is treated as No
--- 68,72 ----
  				sourceOS = 'UNIX'
  				searchString = '\n'
! 			change = EasyDialogs.AskYesNoCancel('–%s” contains %s-style line feeds. '
  					'Change them to MacOS carriage returns?' % (self.title, sourceOS), 1)
  			# bug: Cancel is treated as No
***************
*** 225,230 ****
  	
  	def makeoptionsmenu(self):
! 		menuitems = [('Font settingsŠ', self.domenu_fontsettings), 
! 				("Save optionsŠ", self.domenu_options),
  				'-',
  				('\0' + chr(self.run_as_main) + 'Run as __main__', self.domenu_toggle_run_as_main), 
--- 225,230 ----
  	
  	def makeoptionsmenu(self):
! 		menuitems = [('Font settingsƒ', self.domenu_fontsettings), 
! 				("Save optionsƒ", self.domenu_options),
  				'-',
  				('\0' + chr(self.run_as_main) + 'Run as __main__', self.domenu_toggle_run_as_main), 
***************
*** 232,236 ****
  				#'-',
  				('Modularize', self.domenu_modularize),
! 				('Browse namespaceŠ', self.domenu_browsenamespace), 
  				'-']
  		if self.profiling:
--- 232,236 ----
  				#'-',
  				('Modularize', self.domenu_modularize),
! 				('Browse namespaceƒ', self.domenu_browsenamespace), 
  				'-']
  		if self.profiling:
***************
*** 241,245 ****
  			menuitems = menuitems + [('Disable debugger', self.domenu_toggledebugger),
  				('Clear breakpoints', self.domenu_clearbreakpoints),
! 				('Edit breakpointsŠ', self.domenu_editbreakpoints)]
  		else:
  			menuitems = menuitems + [('Enable debugger', self.domenu_toggledebugger)]
--- 241,245 ----
  			menuitems = menuitems + [('Disable debugger', self.domenu_toggledebugger),
  				('Clear breakpoints', self.domenu_clearbreakpoints),
! 				('Edit breakpointsƒ', self.domenu_editbreakpoints)]
  		else:
  			menuitems = menuitems + [('Enable debugger', self.domenu_toggledebugger)]
***************
*** 286,290 ****
  		modname = _filename_as_modname(self.title)
  		if not modname:
! 			raise W.AlertError, 'Can¹t modularize ³%s²' % self.title
  		run_as_main = self.run_as_main
  		self.run_as_main = 0
--- 286,290 ----
  		modname = _filename_as_modname(self.title)
  		if not modname:
! 			raise W.AlertError, 'CanÕt modularize –%s”' % self.title
  		run_as_main = self.run_as_main
  		self.run_as_main = 0
***************
*** 361,365 ****
  			import Qd
  			Qd.InitCursor() # XXX should be done by dialog
! 			save = EasyDialogs.AskYesNoCancel('Save window ³%s² before closing?' % self.title, 1)
  			if save > 0:
  				if self.domenu_save():
--- 361,365 ----
  			import Qd
  			Qd.InitCursor() # XXX should be done by dialog
! 			save = EasyDialogs.AskYesNoCancel('Save window –%s” before closing?' % self.title, 1)
  			if save > 0:
  				if self.domenu_save():
***************
*** 421,425 ****
  		except ImportError:
  			# only have buildtools in Python >= 1.5.2
! 			raise W.AlertError, "³Save as Applet² is only supported in\rPython 1.5.2 and up."
  		
  		buildtools.DEBUG = 0	# ouch.
--- 421,425 ----
  		except ImportError:
  			# only have buildtools in Python >= 1.5.2
! 			raise W.AlertError, "–Save as Applet” is only supported in\rPython 1.5.2 and up."
  		
  		buildtools.DEBUG = 0	# ouch.
***************
*** 505,509 ****
  				import EasyDialogs
  				import Qd; Qd.InitCursor()
! 				save = EasyDialogs.AskYesNoCancel('Save ³%s² before running?' % self.title, 1)
  				if save > 0:
  					if self.domenu_save():
--- 505,509 ----
  				import EasyDialogs
  				import Qd; Qd.InitCursor()
! 				save = EasyDialogs.AskYesNoCancel('Save –%s” before running?' % self.title, 1)
  				if save > 0:
  					if self.domenu_save():
***************
*** 561,575 ****
  					classend = identifieRE_match(classname)
  					if classend < 1:
! 						raise W.AlertError, 'Can¹t find a class.'
  					classname = classname[:classend]
  					break
  				elif line and line[0] not in '\t#':
! 					raise W.AlertError, 'Can¹t find a class.'
  			else:
! 				raise W.AlertError, 'Can¹t find a class.'
  			if globals.has_key(classname):
  				locals = globals[classname].__dict__
  			else:
! 				raise W.AlertError, 'Can¹t find class ³%s².' % classname
  			# dedent to top level
  			for i in range(len(lines)):
--- 561,575 ----
  					classend = identifieRE_match(classname)
  					if classend < 1:
! 						raise W.AlertError, 'CanÕt find a class.'
  					classname = classname[:classend]
  					break
  				elif line and line[0] not in '\t#':
! 					raise W.AlertError, 'CanÕt find a class.'
  			else:
! 				raise W.AlertError, 'CanÕt find a class.'
  			if globals.has_key(classname):
  				locals = globals[classname].__dict__
  			else:
! 				raise W.AlertError, 'CanÕt find class –%s”.' % classname
  			# dedent to top level
  			for i in range(len(lines)):
***************
*** 577,581 ****
  			pytext = string.join(lines, '\r')
  		elif indent > 0:
! 			raise W.AlertError, 'Can¹t run indented code.'
  		
  		# add "newlines" to fool compile/exec: 
--- 577,581 ----
  			pytext = string.join(lines, '\r')
  		elif indent > 0:
! 			raise W.AlertError, 'CanÕt run indented code.'
  		
  		# add "newlines" to fool compile/exec: 
***************
*** 840,844 ****
  					("Replace",	     "cmdr",	 self.replace), 
  					("Replace all",	 None,   self.replaceall), 
! 					("Don¹t find",  "cmdd",	 self.dont), 
  					("Cancel",	      "cmd.",	 self.cancel)
  				]
--- 840,844 ----
  					("Replace",	     "cmdr",	 self.replace), 
  					("Replace all",	 None,   self.replaceall), 
! 					("DonÕt find",  "cmdd",	 self.dont), 
  					("Cancel",	      "cmd.",	 self.cancel)
  				]
***************
*** 849,853 ****
  			if shortcut:
  				self.w.bind(shortcut, self.w[title].push)
! 		self.w.setdefaultbutton(self.w["Don¹t find"])
  		self.w.find.edit.bind("<key>", self.key)
  		self.w.bind("<activate>", self.activate)
--- 849,853 ----
  			if shortcut:
  				self.w.bind(shortcut, self.w[title].push)
! 		self.w.setdefaultbutton(self.w["DonÕt find"])
  		self.w.find.edit.bind("<key>", self.key)
  		self.w.bind("<activate>", self.activate)
***************
*** 882,890 ****
  				for title, cmd, call in self.buttons[:-2]:
  					self.w[title].enable(0)
! 				self.w.setdefaultbutton(self.w["Don¹t find"])
  		else:
  			for title, cmd, call in self.buttons[:-2]:
  				self.w[title].enable(0)
! 			self.w.setdefaultbutton(self.w["Don¹t find"])
  	
  	def find(self):
--- 882,890 ----
  				for title, cmd, call in self.buttons[:-2]:
  					self.w[title].enable(0)
! 				self.w.setdefaultbutton(self.w["DonÕt find"])
  		else:
  			for title, cmd, call in self.buttons[:-2]:
  				self.w[title].enable(0)
! 			self.w.setdefaultbutton(self.w["DonÕt find"])
  	
  	def find(self):
***************
*** 1205,1209 ****
  		self.fontsettings, self.tabsettings, self.windowsize = geteditorprefs()
  		self.w = W.Dialog((328, 120), "Editor default settings")
! 		self.w.setfontbutton = W.Button((8, 8, 80, 16), "Set fontŠ", self.dofont)
  		self.w.fonttext = W.TextBox((98, 10, -8, 14), self.template % (self.fontsettings[0], self.fontsettings[2]))
  		
--- 1205,1209 ----
  		self.fontsettings, self.tabsettings, self.windowsize = geteditorprefs()
  		self.w = W.Dialog((328, 120), "Editor default settings")
! 		self.w.setfontbutton = W.Button((8, 8, 80, 16), "Set fontƒ", self.dofont)
  		self.w.fonttext = W.TextBox((98, 10, -8, 14), self.template % (self.fontsettings[0], self.fontsettings[2]))