37 # set initial values |
37 # set initial values |
38 self.downloadDirEdit.setText(Preferences.getUI("DownloadPath")) |
38 self.downloadDirEdit.setText(Preferences.getUI("DownloadPath")) |
39 self.requestFilenameCheckBox.setChecked( |
39 self.requestFilenameCheckBox.setChecked( |
40 Preferences.getUI("RequestDownloadFilename")) |
40 Preferences.getUI("RequestDownloadFilename")) |
41 |
41 |
42 self.proxyGroup.setChecked(\ |
42 self.proxyGroup.setChecked( |
43 Preferences.getUI("UseProxy")) |
43 Preferences.getUI("UseProxy")) |
44 if Preferences.getUI("UseSystemProxy"): |
44 if Preferences.getUI("UseSystemProxy"): |
45 self.systemProxyButton.setChecked(True) |
45 self.systemProxyButton.setChecked(True) |
46 else: |
46 else: |
47 self.manualProxyButton.setChecked(True) |
47 self.manualProxyButton.setChecked(True) |
48 self.httpProxyForAllCheckBox.setChecked( |
48 self.httpProxyForAllCheckBox.setChecked( |
49 Preferences.getUI("UseHttpProxyForAll")) |
49 Preferences.getUI("UseHttpProxyForAll")) |
50 self.httpProxyHostEdit.setText(\ |
50 self.httpProxyHostEdit.setText( |
51 Preferences.getUI("ProxyHost/Http")) |
51 Preferences.getUI("ProxyHost/Http")) |
52 self.httpsProxyHostEdit.setText(\ |
52 self.httpsProxyHostEdit.setText( |
53 Preferences.getUI("ProxyHost/Https")) |
53 Preferences.getUI("ProxyHost/Https")) |
54 self.ftpProxyHostEdit.setText(\ |
54 self.ftpProxyHostEdit.setText( |
55 Preferences.getUI("ProxyHost/Ftp")) |
55 Preferences.getUI("ProxyHost/Ftp")) |
56 self.httpProxyPortSpin.setValue(\ |
56 self.httpProxyPortSpin.setValue( |
57 Preferences.getUI("ProxyPort/Http")) |
57 Preferences.getUI("ProxyPort/Http")) |
58 self.httpsProxyPortSpin.setValue(\ |
58 self.httpsProxyPortSpin.setValue( |
59 Preferences.getUI("ProxyPort/Https")) |
59 Preferences.getUI("ProxyPort/Https")) |
60 self.ftpProxyPortSpin.setValue(\ |
60 self.ftpProxyPortSpin.setValue( |
61 Preferences.getUI("ProxyPort/Ftp")) |
61 Preferences.getUI("ProxyPort/Ftp")) |
62 |
62 |
63 def save(self): |
63 def save(self): |
64 """ |
64 """ |
65 Public slot to save the Application configuration. |
65 Public slot to save the Application configuration. |
91 @pyqtSlot() |
91 @pyqtSlot() |
92 def on_downloadDirButton_clicked(self): |
92 def on_downloadDirButton_clicked(self): |
93 """ |
93 """ |
94 Private slot to handle the directory selection via dialog. |
94 Private slot to handle the directory selection via dialog. |
95 """ |
95 """ |
96 directory = QFileDialog.getExistingDirectory(\ |
96 directory = QFileDialog.getExistingDirectory( |
97 self, |
97 self, |
98 self.trUtf8("Select download directory"), |
98 self.trUtf8("Select download directory"), |
99 self.downloadDirEdit.text(), |
99 self.downloadDirEdit.text(), |
100 QFileDialog.Options(QFileDialog.ShowDirsOnly)) |
100 QFileDialog.Options(QFileDialog.ShowDirsOnly)) |
101 |
101 |