(self)
Load current configuration settings for the theme options.

        Based on the theme_source toggle, the theme is set as
        either builtin or custom and the initial widget values
        reflect the current settings from idleConf.

        Attributes updated:
            theme_source: Set from idleConf.
            builtinlist: List of default themes from idleConf.
            customlist: List of custom themes from idleConf.
            custom_theme_on: Disabled if there are no custom themes.
            custom_theme: Message with additional information.
            targetlist: Create menu from self.theme_elements.

        Methods:
            set_theme_type
            paint_theme_sample
            set_highlight_target
Load current configuration settings for the theme options.
Load current configuration settings for the theme options .
def load_theme_cfg(self):
        """Load current configuration settings for the theme options.

        Based on the theme_source toggle, the theme is set as
        either builtin or custom and the initial widget values
        reflect the current settings from idleConf.

        Attributes updated:
            theme_source: Set from idleConf.
            builtinlist: List of default themes from idleConf.
            customlist: List of custom themes from idleConf.
            custom_theme_on: Disabled if there are no custom themes.
            custom_theme: Message with additional information.
            targetlist: Create menu from self.theme_elements.

        Methods:
            set_theme_type
            paint_theme_sample
            set_highlight_target
        """
        # Set current theme type radiobutton.
        self.theme_source.set(idleConf.GetOption(
                'main', 'Theme', 'default', type='bool', default=1))
        # Set current theme.
        current_option = idleConf.CurrentTheme()
        # Load available theme option menus.
        if self.theme_source.get():  # Default theme selected.
            item_list = idleConf.GetSectionList('default', 'highlight')
            item_list.sort()
            self.builtinlist.SetMenu(item_list, current_option)
            item_list = idleConf.GetSectionList('user', 'highlight')
            item_list.sort()
            if not item_list:
                self.custom_theme_on.state(('disabled',))
                self.custom_name.set('- no custom themes -')
            else:
                self.customlist.SetMenu(item_list, item_list[0])
        else:  # User theme selected.
            item_list = idleConf.GetSectionList('user', 'highlight')
            item_list.sort()
            self.customlist.SetMenu(item_list, current_option)
            item_list = idleConf.GetSectionList('default', 'highlight')
            item_list.sort()
            self.builtinlist.SetMenu(item_list, item_list[0])
        self.set_theme_type()
        # Load theme element option menu.
        theme_names = list(self.theme_elements.keys())
        theme_names.sort(key=lambda x: self.theme_elements[x][1])
        self.targetlist.SetMenu(theme_names, theme_names[0])
        self.paint_theme_sample()
        self.set_highlight_target()
def load_theme_cfg ( self ) : # Set current theme type radiobutton. self . theme_source . set ( idleConf . GetOption ( 'main' , 'Theme' , 'default' , type = 'bool' , default = 1 ) ) # Set current theme. current_option = idleConf . CurrentTheme ( ) # Load available theme option menus. if self . theme_source . get ( ) : # Default theme selected. item_list = idleConf . GetSectionList ( 'default' , 'highlight' ) item_list . sort ( ) self . builtinlist . SetMenu ( item_list , current_option ) item_list = idleConf . GetSectionList ( 'user' , 'highlight' ) item_list . sort ( ) if not item_list : self . custom_theme_on . state ( ( 'disabled' , ) ) self . custom_name . set ( '- no custom themes -' ) else : self . customlist . SetMenu ( item_list , item_list [ 0 ] ) else : # User theme selected. item_list = idleConf . GetSectionList ( 'user' , 'highlight' ) item_list . sort ( ) self . customlist . SetMenu ( item_list , current_option ) item_list = idleConf . GetSectionList ( 'default' , 'highlight' ) item_list . sort ( ) self . builtinlist . SetMenu ( item_list , item_list [ 0 ] ) self . set_theme_type ( ) # Load theme element option menu. theme_names = list ( self . theme_elements . keys ( ) ) theme_names . sort ( key = lambda x : self . theme_elements [ x ] [ 1 ] ) self . targetlist . SetMenu ( theme_names , theme_names [ 0 ] ) self . paint_theme_sample ( ) self . set_highlight_target ( )