eric6/Preferences/ConfigurationPages/DebuggerPython2Page.py

Sun, 12 Apr 2020 19:07:49 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 12 Apr 2020 19:07:49 +0200
changeset 7533
88261c96484b
parent 7360
9190402e4505
permissions
-rw-r--r--

Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.

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
7360
9190402e4505 Updated copyright for 2020.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
3 # Copyright (c) 2006 - 2020 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 """
6381
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
7 Module implementing the Debugger Python2 configuration page.
0
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
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
10
6381
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
11 from PyQt5.QtCore import pyqtSlot
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
12
6346
92ed63434dce Started to remove all explicit references to Python interpreters and replace them by references to virtuak environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
13 from E5Gui.E5Application import e5App
4575
464a6b049f89 Changed the Python2 debugger and Editor APIs pages to use the path picker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
14 from E5Gui.E5PathPicker import E5PathPickerModes
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
16 from .ConfigurationPageBase import ConfigurationPageBase
6381
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
17 from .Ui_DebuggerPython2Page import Ui_DebuggerPython2Page
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 import Preferences
6381
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
20 import UI.PixmapCache
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
22
6381
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
23 class DebuggerPython2Page(ConfigurationPageBase, Ui_DebuggerPython2Page):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 """
6381
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
25 Class implementing the Debugger Python2 configuration page.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 def __init__(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 """
6381
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
31 super(DebuggerPython2Page, self).__init__()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 self.setupUi(self)
6381
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
33 self.setObjectName("DebuggerPython2Page")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34
6346
92ed63434dce Started to remove all explicit references to Python interpreters and replace them by references to virtuak environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
35 try:
6381
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
36 self.__virtualenvManager = e5App().getObject("VirtualEnvManager")
6346
92ed63434dce Started to remove all explicit references to Python interpreters and replace them by references to virtuak environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
37 except KeyError:
92ed63434dce Started to remove all explicit references to Python interpreters and replace them by references to virtuak environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
38 from VirtualEnv.VirtualenvManager import VirtualenvManager
6381
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
39 self.__virtualenvManager = VirtualenvManager()
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
40
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
41 self.venvDlgButton.setIcon(UI.PixmapCache.getIcon("virtualenv"))
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
42
4575
464a6b049f89 Changed the Python2 debugger and Editor APIs pages to use the path picker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
43 self.debugClientPicker.setMode(E5PathPickerModes.OpenFileMode)
464a6b049f89 Changed the Python2 debugger and Editor APIs pages to use the path picker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
44 self.debugClientPicker.setToolTip(self.tr(
464a6b049f89 Changed the Python2 debugger and Editor APIs pages to use the path picker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
45 "Press to select the Debug Client via a file selection dialog"))
464a6b049f89 Changed the Python2 debugger and Editor APIs pages to use the path picker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
46 self.debugClientPicker.setFilters(self.tr("Python Files (*.py *.py2)"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47
6381
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
48 self.__populateAndSetVenvComboBox()
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
49
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 # set initial values
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51 dct = Preferences.getDebugger("DebugClientType")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52 if dct == "standard":
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
53 self.standardButton.setChecked(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55 self.customButton.setChecked(True)
4575
464a6b049f89 Changed the Python2 debugger and Editor APIs pages to use the path picker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
56 self.debugClientPicker.setText(
5059
b619cb765507 Fixed a few bugs in the debugger interface and configuration pages related to path separator of different operating systems.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
57 Preferences.getDebugger("DebugClient"), toNative=False)
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 518
diff changeset
58 self.pyRedirectCheckBox.setChecked(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
59 Preferences.getDebugger("PythonRedirect"))
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 518
diff changeset
60 self.pyNoEncodingCheckBox.setChecked(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61 Preferences.getDebugger("PythonNoEncoding"))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62 self.sourceExtensionsEdit.setText(
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63 Preferences.getDebugger("PythonExtensions"))
6381
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
64
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65 def save(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67 Public slot to save the Debugger Python configuration.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
68 """
6357
ceb3d7c25650 DebuggerPythonPage, DebuggerPython3Page: fixed an issue causing an empty virtual environment selection to not being saved.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6349
diff changeset
69 Preferences.setDebugger(
ceb3d7c25650 DebuggerPythonPage, DebuggerPython3Page: fixed an issue causing an empty virtual environment selection to not being saved.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6349
diff changeset
70 "Python2VirtualEnv",
ceb3d7c25650 DebuggerPythonPage, DebuggerPython3Page: fixed an issue causing an empty virtual environment selection to not being saved.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6349
diff changeset
71 self.venvComboBox.currentText())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72 if self.standardButton.isChecked():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
73 dct = "standard"
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
74 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
75 dct = "custom"
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
76 Preferences.setDebugger("DebugClientType", dct)
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
77 Preferences.setDebugger(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
78 "DebugClient",
5059
b619cb765507 Fixed a few bugs in the debugger interface and configuration pages related to path separator of different operating systems.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
79 self.debugClientPicker.text(toNative=False))
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
80 Preferences.setDebugger(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
81 "PythonRedirect",
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
82 self.pyRedirectCheckBox.isChecked())
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
83 Preferences.setDebugger(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
84 "PythonNoEncoding",
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
85 self.pyNoEncodingCheckBox.isChecked())
6381
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
86
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
87 def __populateAndSetVenvComboBox(self):
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
88 """
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
89 Private method to populate and set the virtual environment combo box.
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
90 """
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
91 self.venvComboBox.clear()
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
92 self.venvComboBox.addItems(
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
93 [""] +
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
94 sorted(self.__virtualenvManager.getVirtualenvNamesForVariant(2))
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
95 )
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
96
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
97 # set initial value
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
98 venvName = Preferences.getDebugger("Python2VirtualEnv")
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
99 if venvName:
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
100 index = self.venvComboBox.findText(venvName)
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
101 if index < 0:
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
102 index = 0
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
103 self.venvComboBox.setCurrentIndex(index)
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
104
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
105 @pyqtSlot()
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
106 def on_refreshButton_clicked(self):
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
107 """
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
108 Private slot handling a click of the refresh button.
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
109 """
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
110 self.sourceExtensionsEdit.setText(
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
111 Preferences.getDebugger("PythonExtensions"))
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
112
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
113 @pyqtSlot()
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
114 def on_venvDlgButton_clicked(self):
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
115 """
6386
91dc4fa9bc9c Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6381
diff changeset
116 Private slot to show the virtual environment manager dialog.
6381
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
117 """
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
118 self.__virtualenvManager.showVirtualenvManagerDialog(modal=True)
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
119 self.__populateAndSetVenvComboBox()
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
120 self.activateWindow()
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
121 self.raise_()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
122
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
123
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124 def create(dlg):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
125 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126 Module function to create the configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128 @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: 2302
diff changeset
129 @return reference to the instantiated page (ConfigurationPageBase)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
130 """
6381
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6357
diff changeset
131 page = DebuggerPython2Page()
880
52ed20236a1c Added the option to not use the native file dialog to prevent crashes on Linux.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
132 return page

eric ide

mercurial