def __init__(self, path, skins, themes): Configuration.__init__(self, path, read=False) self._add_field( 'widget_skin', MultiOptionField('Skin', section='Appearance', options=((key, val['name']) for key, val in skins.iteritems()) ) ) self._add_field( 'widget_theme', MultiOptionField('Theme', section='Appearance', options=([('use.the.f*****g.global.settings.and.suck.my.Dick', 'Use global settings')] + [(key, val['name']) for key, val in themes.iteritems()]) ) ) self.read()
def __init__(self, scheme_path, path, skins, themes): Configuration.__init__(self, scheme_path, path, read=False) self._add_field( 'widget_skin', MultiOptionField('Skin', section='Appearance', options=((s['id'], s['name']) for s in skins.get()) ) ) self._add_field( 'widget_theme', MultiOptionField('Theme', section='Appearance', options=([('use.the.f*****g.global.settings.and.suck.my.Dick', 'Use global settings')] + [(t['id'], t['name']) for t in themes.get()]) ) ) self.read()