Issue #27380: IDLE: add base Query dialog, with ttk widgets and subclass

SectionName.  These split class GetCfgSectionNameDialog from
configSectionNameDialog.py, temporarily renamed config_sec.py in 3.7.9a2.
More Query subclasses are planned.
This commit is contained in:
Terry Jan Reedy 2016-06-26 22:05:10 -04:00
parent 754a5c1a1d
commit 68a53c5d39
6 changed files with 326 additions and 188 deletions

View file

@ -18,7 +18,7 @@ import tkinter.font as tkFont
from idlelib.config import idleConf
from idlelib.dynoption import DynOptionMenu
from idlelib.config_key import GetKeysDialog
from idlelib.config_sec import GetCfgSectionNameDialog
from idlelib.query import SectionName
from idlelib.config_help import GetHelpSourceDialog
from idlelib.tabbedpages import TabbedPageSet
from idlelib.textview import view_text
@ -684,7 +684,7 @@ class ConfigDialog(Toplevel):
def GetNewKeysName(self, message):
usedNames = (idleConf.GetSectionList('user', 'keys') +
idleConf.GetSectionList('default', 'keys'))
newKeySet = GetCfgSectionNameDialog(
newKeySet = SectionName(
self, 'New Custom Key Set', message, usedNames).result
return newKeySet
@ -837,7 +837,7 @@ class ConfigDialog(Toplevel):
def GetNewThemeName(self, message):
usedNames = (idleConf.GetSectionList('user', 'highlight') +
idleConf.GetSectionList('default', 'highlight'))
newTheme = GetCfgSectionNameDialog(
newTheme = SectionName(
self, 'New Custom Theme', message, usedNames).result
return newTheme