diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2015-11-12 15:02:57 -0500 |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2015-11-12 15:02:57 -0500 |
commit | d0c0f0041c3eb561adfa57179bc41f4dae212317 (patch) | |
tree | 5c9d1a6b937f7f89aff55ffcb21802aacf95d875 /Lib/idlelib/configDialog.py | |
parent | 84023247b432afba7075e87090986bca72a0e8b0 (diff) | |
download | cpython-git-d0c0f0041c3eb561adfa57179bc41f4dae212317.tar.gz |
Issue #25313: Change the handling of new built-in text color themes to better
address the compatibility problem introduced by the addition of IDLE Dark.
Consistently use the revised idleConf.CurrentTheme everywhere in idlelib.
Diffstat (limited to 'Lib/idlelib/configDialog.py')
-rw-r--r-- | Lib/idlelib/configDialog.py | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/Lib/idlelib/configDialog.py b/Lib/idlelib/configDialog.py index f5388178e0..9b16459d54 100644 --- a/Lib/idlelib/configDialog.py +++ b/Lib/idlelib/configDialog.py @@ -263,6 +263,7 @@ class ConfigDialog(Toplevel): self.buttonDeleteCustomTheme=Button( frameTheme, text='Delete Custom Theme', command=self.DeleteCustomTheme) + self.new_custom_theme = Label(frameTheme, bd=2) ##widget packing #body @@ -286,6 +287,7 @@ class ConfigDialog(Toplevel): self.optMenuThemeBuiltin.pack(side=TOP, fill=X, padx=5, pady=5) self.optMenuThemeCustom.pack(side=TOP, fill=X, anchor=W, padx=5, pady=5) self.buttonDeleteCustomTheme.pack(side=TOP, fill=X, padx=5, pady=5) + self.new_custom_theme.pack(side=TOP, fill=X, pady=5) return frame def CreatePageKeys(self): @@ -503,20 +505,15 @@ class ConfigDialog(Toplevel): def VarChanged_builtinTheme(self, *params): value = self.builtinTheme.get() if value == 'IDLE Dark': - tkMessageBox.showwarning( - title="The 'IDLE Dark' Text Color Theme", - message="IDLE Dark is new in October, 2015. Trying to " - "run earlier versions of IDLE with it selected " - "will disable colorizing, or worse.\n\n" - "If you might ever run an earlier release of IDLE, " - "then before exiting this version, " - "either switch to another theme or " - "hit the 'Save as New Custom Theme' button. " - "The latter requires a new name, such as " - "'Custom Dark', but the custom theme will work " - "with any IDLE release, and can be modified.", - parent=self) - self.AddChangedItem('main', 'Theme', 'name', value) + if idleConf.GetOption('main', 'Theme', 'name') != 'IDLE New': + self.AddChangedItem('main', 'Theme', 'name', 'IDLE Classic') + self.AddChangedItem('main', 'Theme', 'name2', value) + self.new_custom_theme.config(text='New theme, see Help', + fg='#500000') + else: + self.AddChangedItem('main', 'Theme', 'name', value) + self.AddChangedItem('main', 'Theme', 'name2', '') + self.new_custom_theme.config(text='', fg='black') self.PaintThemeSample() def VarChanged_customTheme(self, *params): @@ -1350,14 +1347,14 @@ help_common = '''\ When you click either the Apply or Ok buttons, settings in this dialog that are different from IDLE's default are saved in a .idlerc directory in your home directory. Except as noted, -hese changes apply to all versions of IDLE installed on this +these changes apply to all versions of IDLE installed on this machine. Some do not take affect until IDLE is restarted. [Cancel] only cancels changes made since the last save. ''' help_pages = { 'Highlighting':''' Highlighting: -The IDLE Dark color theme is new in Octover 2015. It can only +The IDLE Dark color theme is new in October 2015. It can only be used with older IDLE releases if it is saved as a custom theme, with a different name. ''' |