Preferences/ConfigurationPages/NetworkPage.py

changeset 945
8cd4d08fa9f6
parent 882
34b86be88bf0
child 1127
b1802ebe0066
equal deleted inserted replaced
944:1b59c4ba121e 945:8cd4d08fa9f6
19 19
20 from Helpviewer.Download.DownloadManager import DownloadManager 20 from Helpviewer.Download.DownloadManager import DownloadManager
21 21
22 import Preferences 22 import Preferences
23 import Utilities 23 import Utilities
24
24 25
25 class NetworkPage(ConfigurationPageBase, Ui_NetworkPage): 26 class NetworkPage(ConfigurationPageBase, Ui_NetworkPage):
26 """ 27 """
27 Class implementing the Network configuration page. 28 Class implementing the Network configuration page.
28 """ 29 """
71 72
72 def save(self): 73 def save(self):
73 """ 74 """
74 Public slot to save the Application configuration. 75 Public slot to save the Application configuration.
75 """ 76 """
76 Preferences.setUI("DownloadPath", 77 Preferences.setUI("DownloadPath",
77 self.downloadDirEdit.text()) 78 self.downloadDirEdit.text())
78 Preferences.setUI("RequestDownloadFilename", 79 Preferences.setUI("RequestDownloadFilename",
79 self.requestFilenameCheckBox.isChecked()) 80 self.requestFilenameCheckBox.isChecked())
80 if self.cleanupNeverButton.isChecked(): 81 if self.cleanupNeverButton.isChecked():
81 policy = DownloadManager.RemoveNever 82 policy = DownloadManager.RemoveNever
82 elif self.cleanupExitButton.isChecked(): 83 elif self.cleanupExitButton.isChecked():
83 policy = DownloadManager.RemoveExit 84 policy = DownloadManager.RemoveExit
85 policy = DownloadManager.RemoveSuccessFullDownload 86 policy = DownloadManager.RemoveSuccessFullDownload
86 Preferences.setHelp("DownloadManagerRemovePolicy", policy) 87 Preferences.setHelp("DownloadManagerRemovePolicy", policy)
87 88
88 Preferences.setUI("UseProxy", 89 Preferences.setUI("UseProxy",
89 self.proxyGroup.isChecked()) 90 self.proxyGroup.isChecked())
90 Preferences.setUI("UseSystemProxy", 91 Preferences.setUI("UseSystemProxy",
91 self.systemProxyButton.isChecked()) 92 self.systemProxyButton.isChecked())
92 Preferences.setUI("UseHttpProxyForAll", 93 Preferences.setUI("UseHttpProxyForAll",
93 self.httpProxyForAllCheckBox.isChecked()) 94 self.httpProxyForAllCheckBox.isChecked())
94 Preferences.setUI("ProxyHost/Http", 95 Preferences.setUI("ProxyHost/Http",
95 self.httpProxyHostEdit.text()) 96 self.httpProxyHostEdit.text())
96 Preferences.setUI("ProxyHost/Https", 97 Preferences.setUI("ProxyHost/Https",
97 self.httpsProxyHostEdit.text()) 98 self.httpsProxyHostEdit.text())
119 dn = Utilities.toNativeSeparators(directory) 120 dn = Utilities.toNativeSeparators(directory)
120 while dn.endswith(os.sep): 121 while dn.endswith(os.sep):
121 dn = dn[:-1] 122 dn = dn[:-1]
122 self.downloadDirEdit.setText(dn) 123 self.downloadDirEdit.setText(dn)
123 124
125
124 def create(dlg): 126 def create(dlg):
125 """ 127 """
126 Module function to create the configuration page. 128 Module function to create the configuration page.
127 129
128 @param dlg reference to the configuration dialog 130 @param dlg reference to the configuration dialog

eric ide

mercurial