(self, *params)
Process new builtin theme selection.

        Add the changed theme's name to the changed_items and recreate
        the sample with the values from the selected theme.
Process new builtin theme selection.
Process new builtin theme selection .
def var_changed_builtin_name(self, *params):
        """Process new builtin theme selection.

        Add the changed theme's name to the changed_items and recreate
        the sample with the values from the selected theme.
        """
        old_themes = ('IDLE Classic', 'IDLE New')
        value = self.builtin_name.get()
        if value not in old_themes:
            if idleConf.GetOption('main', 'Theme', 'name') not in old_themes:
                changes.add_option('main', 'Theme', 'name', old_themes[0])
            changes.add_option('main', 'Theme', 'name2', value)
            self.theme_message['text'] = 'New theme, see Help'
        else:
            changes.add_option('main', 'Theme', 'name', value)
            changes.add_option('main', 'Theme', 'name2', '')
            self.theme_message['text'] = ''
        self.paint_theme_sample()
def var_changed_builtin_name ( self , * params ) : old_themes = ( 'IDLE Classic' , 'IDLE New' ) value = self . builtin_name . get ( ) if value not in old_themes : if idleConf . GetOption ( 'main' , 'Theme' , 'name' ) not in old_themes : changes . add_option ( 'main' , 'Theme' , 'name' , old_themes [ 0 ] ) changes . add_option ( 'main' , 'Theme' , 'name2' , value ) self . theme_message [ 'text' ] = 'New theme, see Help' else : changes . add_option ( 'main' , 'Theme' , 'name' , value ) changes . add_option ( 'main' , 'Theme' , 'name2' , '' ) self . theme_message [ 'text' ] = '' self . paint_theme_sample ( )