Mercurial > hg > Feedworm
comparison PreferencesDialog.py @ 194:2c91b5653878
enable/disable using the proxy via a preference setting
author | dirk |
---|---|
date | Fri, 07 Oct 2011 07:00:44 +0200 |
parents | e8bb107a74e1 |
children | bb3c851b18b1 |
comparison
equal
deleted
inserted
replaced
193:c345a26febc2 | 194:2c91b5653878 |
---|---|
30 showOnlyUnreadFeeds = self.preferences.showOnlyUnreadFeeds() | 30 showOnlyUnreadFeeds = self.preferences.showOnlyUnreadFeeds() |
31 self.ui.showOnlyUnreadFeeds.setChecked(showOnlyUnreadFeeds) | 31 self.ui.showOnlyUnreadFeeds.setChecked(showOnlyUnreadFeeds) |
32 | 32 |
33 def fillProxySettings(self): | 33 def fillProxySettings(self): |
34 if self.preferences.isProxyConfigured(): | 34 if self.preferences.isProxyConfigured(): |
35 self.ui.useProxy.setChecked(self.preferences.useProxy()) | |
35 self.ui.proxyHost.setText(self.preferences.proxyHost()) | 36 self.ui.proxyHost.setText(self.preferences.proxyHost()) |
36 port = self.preferences.proxyPort() | 37 port = self.preferences.proxyPort() |
37 if port is not None: | 38 if port is not None: |
38 self.ui.proxyPort.setText(str(port)) | 39 self.ui.proxyPort.setText(str(port)) |
39 | 40 |
59 else: | 60 else: |
60 self.preferences.setShowOnlyUnreadFeeds(False) | 61 self.preferences.setShowOnlyUnreadFeeds(False) |
61 | 62 |
62 def storeProxySettings(self): | 63 def storeProxySettings(self): |
63 proxyHost = self.ui.proxyHost.text() | 64 proxyHost = self.ui.proxyHost.text() |
65 self.preferences.setUseProxy(self.ui.useProxy.isChecked()) | |
64 if proxyHost.isEmpty(): | 66 if proxyHost.isEmpty(): |
65 self.preferences.setProxyHost(None) | 67 self.preferences.setProxyHost(None) |
66 else: | 68 else: |
67 self.preferences.setProxyHost(str(proxyHost)) | 69 self.preferences.setProxyHost(str(proxyHost)) |
68 | 70 |