mirror of
				https://github.com/python/cpython.git
				synced 2025-10-30 21:21:22 +00:00 
			
		
		
		
	bpo-43013: Fix old tkinter module names in idlelib (GH-24326)
Lowercase 'tkColorChooser', 'tkFileDialog', 'tkSimpleDialog', and
'tkMessageBox' and remove 'tk'.  Just lowercase 'tkFont' as 'font'
is already used.  Adjust import.
(cherry picked from commit 879986d8a9)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
			
			
This commit is contained in:
		
							parent
							
								
									3d5434d5cb
								
							
						
					
					
						commit
						26af2fae18
					
				
					 13 changed files with 66 additions and 67 deletions
				
			
		|  | @ -14,7 +14,7 @@ | |||
| import time | ||||
| import tokenize | ||||
| 
 | ||||
| import tkinter.messagebox as tkMessageBox | ||||
| from tkinter import messagebox | ||||
| 
 | ||||
| from idlelib.config import idleConf | ||||
| from idlelib import macosx | ||||
|  | @ -195,15 +195,15 @@ def getfilename(self): | |||
| 
 | ||||
|     def ask_save_dialog(self): | ||||
|         msg = "Source Must Be Saved\n" + 5*' ' + "OK to Save?" | ||||
|         confirm = tkMessageBox.askokcancel(title="Save Before Run or Check", | ||||
|         confirm = messagebox.askokcancel(title="Save Before Run or Check", | ||||
|                                            message=msg, | ||||
|                                            default=tkMessageBox.OK, | ||||
|                                            default=messagebox.OK, | ||||
|                                            parent=self.editwin.text) | ||||
|         return confirm | ||||
| 
 | ||||
|     def errorbox(self, title, message): | ||||
|         # XXX This should really be a function of EditorWindow... | ||||
|         tkMessageBox.showerror(title, message, parent=self.editwin.text) | ||||
|         messagebox.showerror(title, message, parent=self.editwin.text) | ||||
|         self.editwin.text.focus_set() | ||||
|         self.perf = time.perf_counter() | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Miss Islington (bot)
						Miss Islington (bot)