Lib/idlelib/configdialog.py
def load_theme_cfg(self):
        "Load current configuration settings for the theme options."
        # Set current theme type radiobutton.
        self.is_builtin_theme.set(idleConf.GetOption(
                'main', 'Theme', 'default', type='bool', default=1))
        # Set current theme.
        current_option = idleConf.CurrentTheme()
        # Load available theme option menus.
        if self.is_builtin_theme.get():  # Default theme selected.
            item_list = idleConf.GetSectionList('default', 'highlight')
            item_list.sort()
            self.opt_menu_theme_builtin.SetMenu(item_list, current_option)
            item_list = idleConf.GetSectionList('user', 'highlight')
            item_list.sort()
            if not item_list:
                self.radio_theme_custom.config(state=DISABLED)
                self.custom_theme.set('- no custom themes -')
            else:
                self.opt_menu_theme_custom.SetMenu(item_list, item_list[0])
        else:  # User theme selected.
            item_list = idleConf.GetSectionList('user', 'highlight')
            item_list.sort()
            self.opt_menu_theme_custom.SetMenu(item_list, current_option)
            item_list = idleConf.GetSectionList('default', 'highlight')
            item_list.sort()
            self.opt_menu_theme_builtin.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.opt_menu_highlight_target.SetMenu(theme_names, theme_names[0])
        self.paint_theme_sample()
        self.set_highlight_target()
Load current configuration settings for the theme options.
Load current configuration settings for the theme options.
Load current configuration settings for the theme options .
def load_theme_cfg(self):
        self.is_builtin_theme.set(idleConf.GetOption(
                'main', 'Theme', 'default', type='bool', default=1))
        current_option = idleConf.CurrentTheme()
        if self.is_builtin_theme.get():  
            item_list = idleConf.GetSectionList('default', 'highlight')
            item_list.sort()
            self.opt_menu_theme_builtin.SetMenu(item_list, current_option)
            item_list = idleConf.GetSectionList('user', 'highlight')
            item_list.sort()
            if not item_list:
                self.radio_theme_custom.config(state=DISABLED)
                self.custom_theme.set('- no custom themes -')
            else:
                self.opt_menu_theme_custom.SetMenu(item_list, item_list[0])
        else:  
            item_list = idleConf.GetSectionList('user', 'highlight')
            item_list.sort()
            self.opt_menu_theme_custom.SetMenu(item_list, current_option)
            item_list = idleConf.GetSectionList('default', 'highlight')
            item_list.sort()
            self.opt_menu_theme_builtin.SetMenu(item_list, item_list[0])
        self.set_theme_type()
        theme_names = list(self.theme_elements.keys())
        theme_names.sort(key=lambda x: self.theme_elements[x][1])
        self.opt_menu_highlight_target.SetMenu(theme_names, theme_names[0])
        self.paint_theme_sample()
        self.set_highlight_target()
def load_theme_cfg ( self ) : self . is_builtin_theme . set ( idleConf . GetOption ( 'main' , 'Theme' , 'default' , type = 'bool' , default = 1 ) ) current_option = idleConf . CurrentTheme ( ) if self . is_builtin_theme . get ( ) : item_list = idleConf . GetSectionList ( 'default' , 'highlight' ) item_list . sort ( ) self . opt_menu_theme_builtin . SetMenu ( item_list , current_option ) item_list = idleConf . GetSectionList ( 'user' , 'highlight' ) item_list . sort ( ) if not item_list : self . radio_theme_custom . config ( state = DISABLED ) self . custom_theme . set ( '- no custom themes -' ) else : self . opt_menu_theme_custom . SetMenu ( item_list , item_list [ 0 ] ) else : item_list = idleConf . GetSectionList ( 'user' , 'highlight' ) item_list . sort ( ) self . opt_menu_theme_custom . SetMenu ( item_list , current_option ) item_list = idleConf . GetSectionList ( 'default' , 'highlight' ) item_list . sort ( ) self . opt_menu_theme_builtin . SetMenu ( item_list , item_list [ 0 ] ) self . set_theme_type ( ) theme_names = list ( self . theme_elements . keys ( ) ) theme_names . sort ( key = lambda x : self . theme_elements [ x ] [ 1 ] ) self . opt_menu_highlight_target . SetMenu ( theme_names , theme_names [ 0 ] ) self . paint_theme_sample ( ) self . set_highlight_target ( )
Load current configuration settings for the theme options.
Load current configuration settings for the theme options .
"Load current configuration settings for the theme options." # Set current theme type radiobutton. # Set current theme. # Load available theme option menus. # Default theme selected. # User theme selected. # Load theme element option menu.
self