Lib/idlelib/configdialog.py
def create_new_theme(self, new_theme_name):
        """Create a new custom theme with the given name.

        Create the new theme based on the previously active theme
        with the current changes applied.  Once it is saved, then
        activate the new theme.
        """
        if self.is_builtin_theme.get():
            theme_type = 'default'
            theme_name = self.builtin_theme.get()
        else:
            theme_type = 'user'
            theme_name = self.custom_theme.get()
        new_theme = idleConf.GetThemeDict(theme_type, theme_name)
        # Apply any of the old theme's unsaved changes to the new theme.
        if theme_name in changes['highlight']:
            theme_changes = changes['highlight'][theme_name]
            for element in theme_changes:
                new_theme[element] = theme_changes[element]
        # Save the new theme.
        self.save_new_theme(new_theme_name, new_theme)
        # Change GUI over to the new theme.
        custom_theme_list = idleConf.GetSectionList('user', 'highlight')
        custom_theme_list.sort()
        self.opt_menu_theme_custom.SetMenu(custom_theme_list, new_theme_name)
        self.is_builtin_theme.set(0)
        self.set_theme_type()
Create a new custom theme with the given name.

        Create the new theme based on the previously active theme
        with the current changes applied.  Once it is saved, then
        activate the new theme.
        
Create a new custom theme with the given name.
Create the new theme based on the previously active theme
with the current changes applied.  Once it is saved, then
activate the new theme.
Create a new custom theme with the given name . Create the new theme based on the previously active theme with the current changes applied . Once it is saved then activate the new theme .
def create_new_theme(self, new_theme_name):
        if self.is_builtin_theme.get():
            theme_type = 'default'
            theme_name = self.builtin_theme.get()
        else:
            theme_type = 'user'
            theme_name = self.custom_theme.get()
        new_theme = idleConf.GetThemeDict(theme_type, theme_name)
        if theme_name in changes['highlight']:
            theme_changes = changes['highlight'][theme_name]
            for element in theme_changes:
                new_theme[element] = theme_changes[element]
        self.save_new_theme(new_theme_name, new_theme)
        custom_theme_list = idleConf.GetSectionList('user', 'highlight')
        custom_theme_list.sort()
        self.opt_menu_theme_custom.SetMenu(custom_theme_list, new_theme_name)
        self.is_builtin_theme.set(0)
        self.set_theme_type()
def create_new_theme ( self , new_theme_name ) : if self . is_builtin_theme . get ( ) : theme_type = 'default' theme_name = self . builtin_theme . get ( ) else : theme_type = 'user' theme_name = self . custom_theme . get ( ) new_theme = idleConf . GetThemeDict ( theme_type , theme_name ) if theme_name in changes [ 'highlight' ] : theme_changes = changes [ 'highlight' ] [ theme_name ] for element in theme_changes : new_theme [ element ] = theme_changes [ element ] self . save_new_theme ( new_theme_name , new_theme ) custom_theme_list = idleConf . GetSectionList ( 'user' , 'highlight' ) custom_theme_list . sort ( ) self . opt_menu_theme_custom . SetMenu ( custom_theme_list , new_theme_name ) self . is_builtin_theme . set ( 0 ) self . set_theme_type ( )
Create a new custom theme with the given name.
Create a new custom theme with the given name .
"""Create a new custom theme with the given name.

        Create the new theme based on the previously active theme
        with the current changes applied.  Once it is saved, then
        activate the new theme.
        """ # Apply any of the old theme's unsaved changes to the new theme. # Save the new theme. # Change GUI over to the new theme.
self
new_theme_name