def saveSettings(self): patterns = [ unicode(self.listbox.item(row).text()) for row in xrange(self.listbox.count()) ] cparser = PuddleConfig() cparser.setSection('editor', 'patterns', patterns)
def applySettings(self, control=None): def checktoint(checkbox): if checkbox.checkState() == Qt.Checked: return 1 else: return 0 cparser = PuddleConfig() cparser.setSection('playlist', 'extinfo', checktoint(self.extinfo)) cparser.setSection('playlist', 'extpattern', unicode(self.extpattern.text())) cparser.setSection('playlist', 'reldir', checktoint(self.reldir)) cparser.setSection('playlist', 'filepattern', unicode(self.filename.text())) cparser.setSection('playlist', 'windows_separator', checktoint(self.windows_separator))
def saveSettings(self): patterns = [unicode(self.listbox.item(row).text()) for row in xrange(self.listbox.count())] cparser = PuddleConfig() cparser.setSection('editor', 'patterns', patterns)