Lib/idlelib/configdialog.py
def load_font_cfg(self):
        "Load current configuration settings for the font options."
        # Set base editor font selection list.
        fonts = list(tkFont.families(self))
        fonts.sort()
        for font in fonts:
            self.fontlist.insert(END, font)
        configured_font = idleConf.GetFont(self, 'main', 'EditorWindow')
        font_name = configured_font[0].lower()
        font_size = configured_font[1]
        font_bold  = configured_font[2]=='bold'
        self.font_name.set(font_name)
        lc_fonts = [s.lower() for s in fonts]
        try:
            current_font_index = lc_fonts.index(font_name)
            self.fontlist.see(current_font_index)
            self.fontlist.select_set(current_font_index)
            self.fontlist.select_anchor(current_font_index)
            self.fontlist.activate(current_font_index)
        except ValueError:
            pass
        # Set font size dropdown.
        self.opt_menu_font_size.SetMenu(('7', '8', '9', '10', '11', '12', '13',
                                      '14', '16', '18', '20', '22',
                                      '25', '29', '34', '40'), font_size )
        # Set font weight.
        self.font_bold.set(font_bold)
        # Set font sample.
        self.set_font_sample()
Load current configuration settings for the font options.
Load current configuration settings for the font options.
Load current configuration settings for the font options .
def load_font_cfg(self):
        fonts = list(tkFont.families(self))
        fonts.sort()
        for font in fonts:
            self.fontlist.insert(END, font)
        configured_font = idleConf.GetFont(self, 'main', 'EditorWindow')
        font_name = configured_font[0].lower()
        font_size = configured_font[1]
        font_bold  = configured_font[2]=='bold'
        self.font_name.set(font_name)
        lc_fonts = [s.lower() for s in fonts]
        try:
            current_font_index = lc_fonts.index(font_name)
            self.fontlist.see(current_font_index)
            self.fontlist.select_set(current_font_index)
            self.fontlist.select_anchor(current_font_index)
            self.fontlist.activate(current_font_index)
        except ValueError:
            pass
        self.opt_menu_font_size.SetMenu(('7', '8', '9', '10', '11', '12', '13',
                                      '14', '16', '18', '20', '22',
                                      '25', '29', '34', '40'), font_size )
        self.font_bold.set(font_bold)
        self.set_font_sample()
def load_font_cfg ( self ) : fonts = list ( tkFont . families ( self ) ) fonts . sort ( ) for font in fonts : self . fontlist . insert ( END , font ) configured_font = idleConf . GetFont ( self , 'main' , 'EditorWindow' ) font_name = configured_font [ 0 ] . lower ( ) font_size = configured_font [ 1 ] font_bold = configured_font [ 2 ] == 'bold' self . font_name . set ( font_name ) lc_fonts = [ s . lower ( ) for s in fonts ] try : current_font_index = lc_fonts . index ( font_name ) self . fontlist . see ( current_font_index ) self . fontlist . select_set ( current_font_index ) self . fontlist . select_anchor ( current_font_index ) self . fontlist . activate ( current_font_index ) except ValueError : pass self . opt_menu_font_size . SetMenu ( ( '7' , '8' , '9' , '10' , '11' , '12' , '13' , '14' , '16' , '18' , '20' , '22' , '25' , '29' , '34' , '40' ) , font_size ) self . font_bold . set ( font_bold ) self . set_font_sample ( )
Load current configuration settings for the font options.
Load current configuration settings for the font options .
"Load current configuration settings for the font options." # Set base editor font selection list. # Set font size dropdown. # Set font weight. # Set font sample.
self