# HG changeset patch # User Dirk Olmes # Date 1290078881 -3600 # Node ID 48d1d7bba54801c2d797380d64458bf48e6b937a # Parent b8bfd1bd6c559f81b0be3f377fdf8a4bcba3bac3 UI for setting the proxy settings diff -r b8bfd1bd6c55 -r 48d1d7bba548 PreferencesDialog.py --- a/PreferencesDialog.py Wed Nov 17 21:22:31 2010 +0100 +++ b/PreferencesDialog.py Thu Nov 18 12:14:41 2010 +0100 @@ -11,17 +11,24 @@ self.ui = Ui_Preferences() self.ui.setupUi(self) self.fillUi() - + def fillUi(self): maximized = self.preferences.startMaximized() self.ui.startMaximized.setChecked(maximized) - + hideRead = self.preferences.hideReadFeedEntries() self.ui.hideReadFeedEntries.setChecked(hideRead) - + showOnlyUnreadFeeds = self.preferences.showOnlyUnreadFeeds() self.ui.showOnlyUnreadFeeds.setChecked(showOnlyUnreadFeeds) + self.fillProxySettings() + + def fillProxySettings(self): + if self.preferences.isProxyConfigured(): + self.ui.proxyHost.setText(self.preferences.proxyHost()) + self.ui.proxyPort.setText(str(self.preferences.proxyPort())) + def startMaximizedChanged(self, change): if change: self.preferences.setStartMaximized(True) @@ -40,12 +47,19 @@ else: self.preferences.setShowOnlyUnreadFeeds(False) + def storeProxySettings(self): + proxyHost = str(self.ui.proxyHost.text()) + self.preferences.setProxyHost(proxyHost) + + proxyPort = int(self.ui.proxyPort.text()) + self.preferences.setProxyPort(proxyPort) + def accept(self): + self.storeProxySettings() self.session.commit() QtGui.QDialog.accept(self) - + def reject(self): self.session.rollback() QtGui.QDialog.reject(self) - - \ No newline at end of file + diff -r b8bfd1bd6c55 -r 48d1d7bba548 Ui_Preferences.ui --- a/Ui_Preferences.ui Wed Nov 17 21:22:31 2010 +0100 +++ b/Ui_Preferences.ui Thu Nov 18 12:14:41 2010 +0100 @@ -6,8 +6,8 @@ 0 0 - 400 - 152 + 390 + 247 @@ -20,10 +20,10 @@ - 30 - 110 - 341 - 32 + 10 + 210 + 160 + 27 @@ -72,6 +72,51 @@ Show only feeds that have unread entries + + + + 10 + 100 + 353 + 96 + + + + Web Proxy + + + + + 6 + 18 + 336 + 71 + + + + + + + Port + + + + + + + + + + + + + Host + + + + + +