diff -r 10efb1797e7b Lib/idlelib/ClassBrowser.py --- a/Lib/idlelib/ClassBrowser.py Thu Oct 01 13:16:43 2015 +0200 +++ b/Lib/idlelib/ClassBrowser.py Mon Oct 05 17:20:54 2015 -0700 @@ -56,7 +56,7 @@ self.settitle() top.focus_set() # create scrolled canvas - theme = idleConf.GetOption('main','Theme','name') + theme = idleConf.CurrentTheme() background = idleConf.GetHighlight(theme, 'normal')['background'] sc = ScrolledCanvas(top, bg=background, highlightthickness=0, takefocus=1) sc.frame.pack(expand=1, fill="both") diff -r 10efb1797e7b Lib/idlelib/ColorDelegator.py --- a/Lib/idlelib/ColorDelegator.py Thu Oct 01 13:16:43 2015 +0200 +++ b/Lib/idlelib/ColorDelegator.py Mon Oct 05 17:20:54 2015 -0700 @@ -60,7 +60,7 @@ self.tag_raise('sel') def LoadTagDefs(self): - theme = idleConf.GetOption('main','Theme','name') + theme = idleConf.CurrentTheme() self.tagdefs = { "COMMENT": idleConf.GetHighlight(theme, "comment"), "KEYWORD": idleConf.GetHighlight(theme, "keyword"), diff -r 10efb1797e7b Lib/idlelib/EditorWindow.py --- a/Lib/idlelib/EditorWindow.py Thu Oct 01 13:16:43 2015 +0200 +++ b/Lib/idlelib/EditorWindow.py Mon Oct 05 17:20:54 2015 -0700 @@ -745,7 +745,7 @@ # Called from self.filename_change_hook and from configDialog.py self._rmcolorizer() self._addcolorizer() - theme = idleConf.GetOption('main','Theme','name') + theme = idleConf.CurrentTheme() normal_colors = idleConf.GetHighlight(theme, 'normal') cursor_color = idleConf.GetHighlight(theme, 'cursor', fgBg='fg') select_colors = idleConf.GetHighlight(theme, 'hilite') diff -r 10efb1797e7b Lib/idlelib/PyShell.py --- a/Lib/idlelib/PyShell.py Thu Oct 01 13:16:43 2015 +0200 +++ b/Lib/idlelib/PyShell.py Mon Oct 05 17:20:54 2015 -0700 @@ -152,7 +152,7 @@ # possible due to update in restore_file_breaks return if color: - theme = idleConf.GetOption('main','Theme','name') + theme = idleConf.CurrentTheme() cfg = idleConf.GetHighlight(theme, "break") else: cfg = {'foreground': '', 'background': ''} @@ -338,7 +338,7 @@ def LoadTagDefs(self): ColorDelegator.LoadTagDefs(self) - theme = idleConf.GetOption('main','Theme','name') + theme = idleConf.CurrentTheme() self.tagdefs.update({ "stdin": {'background':None,'foreground':None}, "stdout": idleConf.GetHighlight(theme, "stdout"), @@ -621,7 +621,7 @@ item = RemoteObjectBrowser.StubObjectTreeItem(self.rpcclt, oid) from idlelib.TreeWidget import ScrolledCanvas, TreeNode top = Toplevel(self.tkconsole.root) - theme = idleConf.GetOption('main','Theme','name') + theme = idleConf.CurrentTheme() background = idleConf.GetHighlight(theme, 'normal')['background'] sc = ScrolledCanvas(top, bg=background, highlightthickness=0) sc.frame.pack(expand=1, fill="both") diff -r 10efb1797e7b Lib/idlelib/TreeWidget.py --- a/Lib/idlelib/TreeWidget.py Thu Oct 01 13:16:43 2015 +0200 +++ b/Lib/idlelib/TreeWidget.py Mon Oct 05 17:20:54 2015 -0700 @@ -249,7 +249,7 @@ except AttributeError: # padding carefully selected (on Windows) to match Entry widget: self.label = Label(self.canvas, text=text, bd=0, padx=2, pady=2) - theme = idleConf.GetOption('main','Theme','name') + theme = idleConf.CurrentTheme() if self.selected: self.label.configure(idleConf.GetHighlight(theme, 'hilite')) else: diff -r 10efb1797e7b Lib/idlelib/configHandler.py --- a/Lib/idlelib/configHandler.py Thu Oct 01 13:16:43 2015 +0200 +++ b/Lib/idlelib/configHandler.py Mon Oct 05 17:20:54 2015 -0700 @@ -373,7 +373,11 @@ def CurrentTheme(self): "Return the name of the currently active theme." - return self.GetOption('main', 'Theme', 'name', default='') + theme = self.GetOption('main', 'Theme', 'name', default='') + if self.defaultCfg['highlight'].has_section(theme) or \ + self.userCfg['highlight'].has_section(theme): + return theme + return "IDLE Classic" def CurrentKeys(self): "Return the name of the currently active key set."