Preferences/ConfigurationPages/NetworkPage.py

Sun, 13 Mar 2016 14:26:06 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 13 Mar 2016 14:26:06 +0100
branch
6_1_x
changeset 4854
b946a74a945f
parent 4853
f28d62c581de
permissions
-rw-r--r--

Fixed a Qt 5.6 compatibility issue in the Network configuration page.

0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
4632
ca310db386ed Updated copyright for 2016.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4350
diff changeset
3 # Copyright (c) 2008 - 2016 Detlev Offenbach <detlev@die-offenbachs.de>
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing the Network configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
3145
a9de05d4a22f # __IGNORE_WARNING__ added/ removed.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3058
diff changeset
10 from __future__ import unicode_literals
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2408
diff changeset
11
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12 import os
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3484
diff changeset
14 from PyQt5.QtCore import pyqtSlot
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 13
diff changeset
16 from E5Gui.E5Completers import E5DirCompleter
882
34b86be88bf0 Redid the native file dialog code to be future proof.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 880
diff changeset
17 from E5Gui import E5FileDialog
2074
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
18 from E5Network.E5Ftp import E5FtpProxyType
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
20 from .ConfigurationPageBase import ConfigurationPageBase
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
21 from .Ui_NetworkPage import Ui_NetworkPage
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 import Preferences
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 import Utilities
3186
a05eff845522 Changed all the file or directory selection buttons to QToolButton and gave them an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
25 import UI.PixmapCache
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
27
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 class NetworkPage(ConfigurationPageBase, Ui_NetworkPage):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 Class implementing the Network configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 def __init__(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 """
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2408
diff changeset
36 super(NetworkPage, self).__init__()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 self.setupUi(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 self.setObjectName("NetworkPage")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39
3186
a05eff845522 Changed all the file or directory selection buttons to QToolButton and gave them an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
40 self.downloadDirButton.setIcon(UI.PixmapCache.getIcon("open.png"))
a05eff845522 Changed all the file or directory selection buttons to QToolButton and gave them an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
41
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 13
diff changeset
42 self.downloadDirCompleter = E5DirCompleter(self.downloadDirEdit)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
44 self.ftpProxyTypeCombo.addItem(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3186
diff changeset
45 self.tr("No FTP Proxy"), E5FtpProxyType.NoProxy)
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
46 self.ftpProxyTypeCombo.addItem(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3186
diff changeset
47 self.tr("No Proxy Authentication required"),
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
48 E5FtpProxyType.NonAuthorizing)
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
49 self.ftpProxyTypeCombo.addItem(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3186
diff changeset
50 self.tr("User@Server"), E5FtpProxyType.UserAtServer)
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
51 self.ftpProxyTypeCombo.addItem(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3186
diff changeset
52 self.tr("SITE"), E5FtpProxyType.Site)
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
53 self.ftpProxyTypeCombo.addItem(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3186
diff changeset
54 self.tr("OPEN"), E5FtpProxyType.Open)
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
55 self.ftpProxyTypeCombo.addItem(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3186
diff changeset
56 self.tr("User@Proxyuser@Server"),
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
57 E5FtpProxyType.UserAtProxyuserAtServer)
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
58 self.ftpProxyTypeCombo.addItem(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3186
diff changeset
59 self.tr("Proxyuser@Server"), E5FtpProxyType.ProxyuserAtServer)
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
60 self.ftpProxyTypeCombo.addItem(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3186
diff changeset
61 self.tr("AUTH and RESP"), E5FtpProxyType.AuthResp)
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
62 self.ftpProxyTypeCombo.addItem(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3186
diff changeset
63 self.tr("Bluecoat Proxy"), E5FtpProxyType.Bluecoat)
2074
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
64
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65 # set initial values
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 self.downloadDirEdit.setText(Preferences.getUI("DownloadPath"))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67 self.requestFilenameCheckBox.setChecked(
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
68 Preferences.getUI("RequestDownloadFilename"))
4853
f28d62c581de Fixed a Qt 5.6 compatibility issue in the Network configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4632
diff changeset
69 try:
f28d62c581de Fixed a Qt 5.6 compatibility issue in the Network configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4632
diff changeset
70 policy = Preferences.getHelp("DownloadManagerRemovePolicy")
f28d62c581de Fixed a Qt 5.6 compatibility issue in the Network configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4632
diff changeset
71 from Helpviewer.Download.DownloadManager import DownloadManager
f28d62c581de Fixed a Qt 5.6 compatibility issue in the Network configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4632
diff changeset
72 if policy == DownloadManager.RemoveNever:
f28d62c581de Fixed a Qt 5.6 compatibility issue in the Network configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4632
diff changeset
73 self.cleanupNeverButton.setChecked(True)
f28d62c581de Fixed a Qt 5.6 compatibility issue in the Network configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4632
diff changeset
74 elif policy == DownloadManager.RemoveExit:
f28d62c581de Fixed a Qt 5.6 compatibility issue in the Network configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4632
diff changeset
75 self.cleanupExitButton.setChecked(True)
f28d62c581de Fixed a Qt 5.6 compatibility issue in the Network configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4632
diff changeset
76 else:
f28d62c581de Fixed a Qt 5.6 compatibility issue in the Network configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4632
diff changeset
77 self.cleanupSuccessfulButton.setChecked(True)
f28d62c581de Fixed a Qt 5.6 compatibility issue in the Network configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4632
diff changeset
78 except ImportError:
f28d62c581de Fixed a Qt 5.6 compatibility issue in the Network configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4632
diff changeset
79 self.cleanupGroup.hide()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
80
2074
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
81 # HTTP proxy
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
82 self.httpProxyHostEdit.setText(
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
83 Preferences.getUI("ProxyHost/Http"))
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
84 self.httpProxyPortSpin.setValue(
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
85 Preferences.getUI("ProxyPort/Http"))
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
86
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
87 # HTTPS proxy
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
88 self.httpsProxyHostEdit.setText(
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
89 Preferences.getUI("ProxyHost/Https"))
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
90 self.httpsProxyPortSpin.setValue(
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
91 Preferences.getUI("ProxyPort/Https"))
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
92
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
93 # FTP proxy
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
94 self.ftpProxyHostEdit.setText(
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
95 Preferences.getUI("ProxyHost/Ftp"))
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
96 self.ftpProxyPortSpin.setValue(
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
97 Preferences.getUI("ProxyPort/Ftp"))
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
98 self.ftpProxyTypeCombo.setCurrentIndex(
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
99 self.ftpProxyTypeCombo.findData(
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
100 Preferences.getUI("ProxyType/Ftp")))
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
101 self.ftpProxyUserEdit.setText(
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
102 Preferences.getUI("ProxyUser/Ftp"))
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
103 self.ftpProxyPasswordEdit.setText(
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
104 Preferences.getUI("ProxyPassword/Ftp"))
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
105 self.ftpProxyAccountEdit.setText(
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
106 Preferences.getUI("ProxyAccount/Ftp"))
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
107
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
108 self.httpProxyForAllCheckBox.setChecked(
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
109 Preferences.getUI("UseHttpProxyForAll"))
4349
a99dcf04f6f5 Started to extend the network proxy code to support exceptions and PAC.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
110 if not Preferences.getUI("UseProxy"):
a99dcf04f6f5 Started to extend the network proxy code to support exceptions and PAC.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
111 self.noProxyButton.setChecked(True)
a99dcf04f6f5 Started to extend the network proxy code to support exceptions and PAC.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
112 elif Preferences.getUI("UseSystemProxy"):
270
41505c92ac31 Added code to enhance the proxy configuration and removed the usage of QHttp.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 55
diff changeset
113 self.systemProxyButton.setChecked(True)
41505c92ac31 Added code to enhance the proxy configuration and removed the usage of QHttp.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 55
diff changeset
114 else:
41505c92ac31 Added code to enhance the proxy configuration and removed the usage of QHttp.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 55
diff changeset
115 self.manualProxyButton.setChecked(True)
4349
a99dcf04f6f5 Started to extend the network proxy code to support exceptions and PAC.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
116
a99dcf04f6f5 Started to extend the network proxy code to support exceptions and PAC.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
117 self.exceptionsEdit.setText(
a99dcf04f6f5 Started to extend the network proxy code to support exceptions and PAC.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
118 ", ".join(Preferences.getUI("ProxyExceptions").split(",")))
2074
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
119
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
120 def save(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121 """
2190
abd65b78425e Added a notification system and updated the source documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2074
diff changeset
122 Public slot to save the Networj configuration.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123 """
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
124 Preferences.setUI(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
125 "DownloadPath",
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126 self.downloadDirEdit.text())
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
127 Preferences.setUI(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
128 "RequestDownloadFilename",
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
129 self.requestFilenameCheckBox.isChecked())
4854
b946a74a945f Fixed a Qt 5.6 compatibility issue in the Network configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4853
diff changeset
130 try:
b946a74a945f Fixed a Qt 5.6 compatibility issue in the Network configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4853
diff changeset
131 from Helpviewer.Download.DownloadManager import DownloadManager
b946a74a945f Fixed a Qt 5.6 compatibility issue in the Network configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4853
diff changeset
132 if self.cleanupNeverButton.isChecked():
b946a74a945f Fixed a Qt 5.6 compatibility issue in the Network configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4853
diff changeset
133 policy = DownloadManager.RemoveNever
b946a74a945f Fixed a Qt 5.6 compatibility issue in the Network configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4853
diff changeset
134 elif self.cleanupExitButton.isChecked():
b946a74a945f Fixed a Qt 5.6 compatibility issue in the Network configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4853
diff changeset
135 policy = DownloadManager.RemoveExit
b946a74a945f Fixed a Qt 5.6 compatibility issue in the Network configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4853
diff changeset
136 else:
b946a74a945f Fixed a Qt 5.6 compatibility issue in the Network configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4853
diff changeset
137 policy = DownloadManager.RemoveSuccessFullDownload
b946a74a945f Fixed a Qt 5.6 compatibility issue in the Network configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4853
diff changeset
138 Preferences.setHelp("DownloadManagerRemovePolicy", policy)
b946a74a945f Fixed a Qt 5.6 compatibility issue in the Network configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4853
diff changeset
139 except ImportError:
b946a74a945f Fixed a Qt 5.6 compatibility issue in the Network configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4853
diff changeset
140 # ignore it
b946a74a945f Fixed a Qt 5.6 compatibility issue in the Network configuration page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4853
diff changeset
141 pass
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
142
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
143 Preferences.setUI(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
144 "UseProxy",
4349
a99dcf04f6f5 Started to extend the network proxy code to support exceptions and PAC.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
145 not self.noProxyButton.isChecked())
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
146 Preferences.setUI(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
147 "UseSystemProxy",
270
41505c92ac31 Added code to enhance the proxy configuration and removed the usage of QHttp.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 55
diff changeset
148 self.systemProxyButton.isChecked())
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
149 Preferences.setUI(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
150 "UseHttpProxyForAll",
289
baf4c1354c6a Extended the proxy handling to HTTPS and FTP.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 286
diff changeset
151 self.httpProxyForAllCheckBox.isChecked())
2074
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
152
4349
a99dcf04f6f5 Started to extend the network proxy code to support exceptions and PAC.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
153 Preferences.setUI(
a99dcf04f6f5 Started to extend the network proxy code to support exceptions and PAC.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
154 "ProxyExceptions",
a99dcf04f6f5 Started to extend the network proxy code to support exceptions and PAC.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
155 ",".join(
a99dcf04f6f5 Started to extend the network proxy code to support exceptions and PAC.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
156 [h.strip() for h in self.exceptionsEdit.text().split(",")]))
a99dcf04f6f5 Started to extend the network proxy code to support exceptions and PAC.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
157
2074
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
158 # HTTP proxy
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
159 Preferences.setUI(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
160 "ProxyHost/Http",
289
baf4c1354c6a Extended the proxy handling to HTTPS and FTP.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 286
diff changeset
161 self.httpProxyHostEdit.text())
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
162 Preferences.setUI(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
163 "ProxyPort/Http",
2074
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
164 self.httpProxyPortSpin.value())
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
165
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
166 # HTTPS proxy
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
167 Preferences.setUI(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
168 "ProxyHost/Https",
289
baf4c1354c6a Extended the proxy handling to HTTPS and FTP.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 286
diff changeset
169 self.httpsProxyHostEdit.text())
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
170 Preferences.setUI(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
171 "ProxyPort/Https",
2074
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
172 self.httpsProxyPortSpin.value())
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
173
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
174 # FTP proxy
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
175 Preferences.setUI(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
176 "ProxyHost/Ftp",
289
baf4c1354c6a Extended the proxy handling to HTTPS and FTP.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 286
diff changeset
177 self.ftpProxyHostEdit.text())
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
178 Preferences.setUI(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
179 "ProxyPort/Ftp",
289
baf4c1354c6a Extended the proxy handling to HTTPS and FTP.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 286
diff changeset
180 self.ftpProxyPortSpin.value())
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
181 Preferences.setUI(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
182 "ProxyType/Ftp",
2074
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
183 self.ftpProxyTypeCombo.itemData(
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
184 self.ftpProxyTypeCombo.currentIndex()))
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
185 Preferences.setUI(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
186 "ProxyUser/Ftp",
2074
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
187 self.ftpProxyUserEdit.text())
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
188 Preferences.setUI(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
189 "ProxyPassword/Ftp",
2074
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
190 self.ftpProxyPasswordEdit.text())
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
191 Preferences.setUI(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
192 "ProxyAccount/Ftp",
2074
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
193 self.ftpProxyAccountEdit.text())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
194
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
195 @pyqtSlot()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
196 def on_downloadDirButton_clicked(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
197 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
198 Private slot to handle the directory selection via dialog.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
199 """
882
34b86be88bf0 Redid the native file dialog code to be future proof.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 880
diff changeset
200 directory = E5FileDialog.getExistingDirectory(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
201 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3186
diff changeset
202 self.tr("Select download directory"),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
203 self.downloadDirEdit.text(),
882
34b86be88bf0 Redid the native file dialog code to be future proof.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 880
diff changeset
204 E5FileDialog.Options(E5FileDialog.ShowDirsOnly))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
205
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
206 if directory:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
207 dn = Utilities.toNativeSeparators(directory)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
208 while dn.endswith(os.sep):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
209 dn = dn[:-1]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
210 self.downloadDirEdit.setText(dn)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
211
1127
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
212 @pyqtSlot()
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
213 def on_clearProxyPasswordsButton_clicked(self):
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
214 """
2074
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
215 Private slot to clear the saved HTTP(S) proxy passwords.
1127
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
216 """
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
217 Preferences.setUI("ProxyPassword/Http", "")
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
218 Preferences.setUI("ProxyPassword/Https", "")
2074
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
219
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
220 @pyqtSlot(int)
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
221 def on_ftpProxyTypeCombo_currentIndexChanged(self, index):
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
222 """
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
223 Private slot handling the selection of a proxy type.
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
224
2194
0fce40af66b8 Fixed a few PEP-8 related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
225 @param index index of the selected item (integer)
2074
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
226 """
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
227 proxyType = self.ftpProxyTypeCombo.itemData(index)
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
228 self.ftpProxyHostEdit.setEnabled(proxyType != E5FtpProxyType.NoProxy)
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
229 self.ftpProxyPortSpin.setEnabled(proxyType != E5FtpProxyType.NoProxy)
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
230 self.ftpProxyUserEdit.setEnabled(
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
231 proxyType not in [E5FtpProxyType.NoProxy,
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
232 E5FtpProxyType.NonAuthorizing])
2074
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
233 self.ftpProxyPasswordEdit.setEnabled(
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
234 proxyType not in [E5FtpProxyType.NoProxy,
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
235 E5FtpProxyType.NonAuthorizing])
2074
5cb87968aad5 Reworked the FTP stuff to support a bunch of different FTP proxy types. Unfortunately FTP proxy support is not standardized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
236 self.ftpProxyAccountEdit.setEnabled(
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
237 proxyType not in [E5FtpProxyType.NoProxy,
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
238 E5FtpProxyType.NonAuthorizing])
1127
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
239
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
240
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
241 def create(dlg):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
242 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
243 Module function to create the configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
244
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
245 @param dlg reference to the configuration dialog
2964
84b65fb9e780 Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2408
diff changeset
246 @return reference to the instantiated page (ConfigurationPageBase)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
247 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
248 page = NetworkPage()
668
b0061a6f7484 Added a download manager to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
249 return page

eric ide

mercurial