def flipColumn(self, index): self.emit(SIGNAL("layoutAboutToBeChanged()")) if self.isColumnHidden(index): log(DEBUG, "turning %d on\n" % index) self.setColumnHidden(index, False) preferences.setValue("GUI", "hidecol_" + self._model.header[index], False) else: log(DEBUG, "turning %d off\n" % index) self.setColumnHidden(index, True) preferences.setValue("GUI", "hidecol_" + self._model.header[index], True) self.emit(SIGNAL("layoutChanged()"))
if m[0] != '': mod = m[0] val = m[1] else: mod = m[2] val = m[3] if not found.has_key(mod): found[mod] = {} found[mod][val] = "found" if not preferences.hasPref(mod, val): print "Found new %s:%s, adding." % (mod, val) preferences.setValue(mod, val, "**UNSET**") # Find settings that are in prefs.json but not in code. print "Finding orphans:" for m in preferences.allprefs.keys(): # Skip version info if m == "Version": continue if not m in found.keys(): print "Module %s is orphaned, removed." % m del preferences.allprefs[m] continue
username, ok = QInputDialog.getText(None, "JS.it Username", "Enter JS.it username:"******"Username aborted!\n") sys.exit(1) password, ok = QInputDialog.getText(None, "JS.it Password", "Enter JS.it password:"******"Password aborted!\n") sys.exit(1) mgr = jsit_manager.Manager(username = username, password = password) preferences.setValue("jsit", "username", username) preferences.setValue("jsit", "password", password) # Hack... mgr._torrentDirectory = os.path.join(basedir, mgr._torrentDirectory) # For testing limit logging... ##addIgnoreModule("jsit") ##addIgnoreModule("jsit_manager") ##addOnlyModule("TorrentTable") win = JSITWindow(mgr) if pref("GUI", "threadedUpdates"): global updateThread, updateEvent, quitEvent
def updateSectionState(self, *args): log(DEBUG2) state = self.horizontalHeader().saveState() preferences.setValue("GUI", "ColumnState", str(state.toHex()) )
def watchDirectory(self, value): log(INFO) self.mgr.watchDirectory(bool(value)) preferences.setValue("jsit_manager", "watchDirectory", bool(value))
def watchClipboard(self, value): log(INFO) self.mgr.watchClipboard(bool(value)) preferences.setValue("jsit_manager", "watchClipboard", bool(value))