41 consoleList.append("cmd.exe /c") |
41 consoleList.append("cmd.exe /c") |
42 elif isMacPlatform(): |
42 elif isMacPlatform(): |
43 consoleList.append("xterm -e") |
43 consoleList.append("xterm -e") |
44 else: |
44 else: |
45 consoleList.append("konsole -e") |
45 consoleList.append("konsole -e") |
46 consoleList.append("@konsole --workdir . -e") |
46 consoleList.append("@konsole --workdir . -e") |
47 # KDE4 konsole spawns |
47 # KDE4 konsole spawns |
48 consoleList.append("gnome-terminal -x") |
48 consoleList.append("gnome-terminal -x") |
49 consoleList.append("xterm -e") |
49 consoleList.append("xterm -e") |
50 |
50 |
51 consoleNoCloseList = [] |
51 consoleNoCloseList = [] |
94 |
94 |
95 def save(self): |
95 def save(self): |
96 """ |
96 """ |
97 Public slot to save the Pyramid configuration. |
97 Public slot to save the Pyramid configuration. |
98 """ |
98 """ |
99 self.__plugin.setPreferences("ConsoleCommand", |
99 self.__plugin.setPreferences("ConsoleCommand", |
100 self.consoleCommandCombo.currentText()) |
100 self.consoleCommandCombo.currentText()) |
101 self.__plugin.setPreferences("ConsoleCommandNoClose", |
101 self.__plugin.setPreferences("ConsoleCommandNoClose", |
102 self.consoleCommandNoCloseCombo.currentText()) |
102 self.consoleCommandNoCloseCombo.currentText()) |
103 |
103 |
104 self.__plugin.setPreferences("VirtualEnvironmentPy2", |
104 self.__plugin.setPreferences("VirtualEnvironmentPy2", |
105 self.virtualEnvPy2Edit.text()) |
105 self.virtualEnvPy2Edit.text()) |
106 self.__plugin.setPreferences("VirtualEnvironmentPy3", |
106 self.__plugin.setPreferences("VirtualEnvironmentPy3", |
107 self.virtualEnvPy3Edit.text()) |
107 self.virtualEnvPy3Edit.text()) |
108 |
108 |
109 self.__plugin.setPreferences("Python2ConsoleType", |
109 self.__plugin.setPreferences("Python2ConsoleType", |
110 self.py2ShellCombo.itemData(self.py2ShellCombo.currentIndex())) |
110 self.py2ShellCombo.itemData(self.py2ShellCombo.currentIndex())) |
111 self.__plugin.setPreferences("Python3ConsoleType", |
111 self.__plugin.setPreferences("Python3ConsoleType", |
112 self.py3ShellCombo.itemData(self.py3ShellCombo.currentIndex())) |
112 self.py3ShellCombo.itemData(self.py3ShellCombo.currentIndex())) |
113 |
113 |
114 self.__plugin.setPreferences("PyramidDocUrl", |
114 self.__plugin.setPreferences("PyramidDocUrl", |
115 self.urlEdit.text()) |
115 self.urlEdit.text()) |
116 |
116 |
117 @pyqtSlot() |
117 @pyqtSlot() |
118 def on_virtualEnvPy3Button_clicked(self): |
118 def on_virtualEnvPy3Button_clicked(self): |
119 """ |
119 """ |
120 Private slot to select the virtual environment for Python 3 via a |
120 Private slot to select the virtual environment for Python 3 via a |
121 directory selection dialog. |
121 directory selection dialog. |
122 """ |
122 """ |
123 vDir = self.virtualEnvPy3Edit.text() |
123 vDir = self.virtualEnvPy3Edit.text() |
124 if not vDir: |
124 if not vDir: |
125 vDir = Utilities.getHomeDir() |
125 vDir = Utilities.getHomeDir() |
133 self.virtualEnvPy3Edit.setText(Utilities.toNativeSeparators(virtualEnv)) |
133 self.virtualEnvPy3Edit.setText(Utilities.toNativeSeparators(virtualEnv)) |
134 |
134 |
135 @pyqtSlot() |
135 @pyqtSlot() |
136 def on_virtualEnvPy2Button_clicked(self): |
136 def on_virtualEnvPy2Button_clicked(self): |
137 """ |
137 """ |
138 Private slot to select the virtual environment for Python 2 via a |
138 Private slot to select the virtual environment for Python 2 via a |
139 directory selection dialog. |
139 directory selection dialog. |
140 """ |
140 """ |
141 vDir = self.virtualEnvPy2Edit.text() |
141 vDir = self.virtualEnvPy2Edit.text() |
142 if not vDir: |
142 if not vDir: |
143 vDir = Utilities.getHomeDir() |
143 vDir = Utilities.getHomeDir() |