Mercurial > hg > Feedworm
diff backend/couchdb/Preferences.py @ 194:2c91b5653878
enable/disable using the proxy via a preference setting
author | dirk |
---|---|
date | Fri, 07 Oct 2011 07:00:44 +0200 |
parents | 214addba1f93 |
children | bb3c851b18b1 |
line wrap: on
line diff
--- a/backend/couchdb/Preferences.py Sat Sep 24 08:07:23 2011 +0200 +++ b/backend/couchdb/Preferences.py Fri Oct 07 07:00:44 2011 +0200 @@ -7,6 +7,7 @@ PROXY_PORT = "proxyPort" SHOW_ONLY_UNREAD_FEEDS = "showOnlyUnreadFeeds" START_MAXIMIZED = "startMaximized" +USE_PROXY = "useProxy" class Preferences(object): def __init__(self, database): @@ -40,6 +41,12 @@ def proxyHost(self): return self._documentValue(PROXY_HOST) + def useProxy(self): + return self._documentValue(USE_PROXY, True) + + def setUseProxy(self, value): + self._setDocumentValue(USE_PROXY, value) + def setProxyHost(self, hostname): if hostname is None: if PROXY_HOST in self.document.keys():