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.
This commit is contained in:
Terry Jan Reedy 2021-01-25 06:33:18 -05:00 committed by GitHub
parent cf19cc3b92
commit 879986d8a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 66 additions and 67 deletions

View file

@ -14,7 +14,7 @@ import tabnanny
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 @@ class ScriptBinding:
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()