def __init__(self, section, section_name): QtGui.QWidget.__init__(self) self.grid = QtGui.QGridLayout() self.grid.setAlignment(QtCore.Qt.AlignTop) self.section = section self.section_name = section_name self.fields = {} self.setLayout(self.grid) self.grid.setColumnStretch(2, 1) self.grid.setSpacing(10) self.int_validator = QtGui.QIntValidator(0, 2147483647, self) toolbar_icons = [ ('ToolButtonFollowStyle', 'Default'), ('ToolButtonIconOnly', 'Icon Only'), ('ToolButtonTextOnly', 'Text Only'), ('ToolButtonTextBesideIcon', 'Text Alongside Icons'), ('ToolButtonTextUnderIcon', 'Text Under Icons')] tray_options = [ ('always', 'Always'), ('unread', 'On Unread Messages'), ('never', 'Never'), ] list_positions = [ ('left', 'Left'), ('right', 'Right'), ] sort_options = ['A-Z Ranked', 'A-Z', 'Z-A Ranked', 'Z-A'] spellcheck_langs = [(x, x) for x in InputLineSpell.list_languages()] spellcheck_langs.insert(0, ('', '')) focus_opts = ["requested", "always", "never"] self.comboboxes = {"style": QtGui.QStyleFactory.keys(), "position": list_positions, "toolbar_icons": toolbar_icons, "focus_new_tabs": focus_opts, "tray_icon": tray_options, "sort": sort_options, "spellcheck_dictionary": spellcheck_langs}