45 else: |
45 else: |
46 consoleList.append("konsole -e") |
46 consoleList.append("konsole -e") |
47 consoleList.append("@konsole --workdir . -e") |
47 consoleList.append("@konsole --workdir . -e") |
48 # KDE4 konsole spawns |
48 # KDE4 konsole spawns |
49 consoleList.append("gnome-terminal -x") |
49 consoleList.append("gnome-terminal -x") |
|
50 consoleList.append("xfce4-terminal -e") |
50 consoleList.append("xterm -e") |
51 consoleList.append("xterm -e") |
51 self.consoleCommandCombo.addItems(consoleList) |
52 self.consoleCommandCombo.addItems(consoleList) |
52 |
53 |
53 self.virtualEnvPy2Completer = E5DirCompleter(self.virtualEnvPy2Edit) |
54 self.virtualEnvPy2Completer = E5DirCompleter(self.virtualEnvPy2Edit) |
54 self.virtualEnvPy3Completer = E5DirCompleter(self.virtualEnvPy3Edit) |
55 self.virtualEnvPy3Completer = E5DirCompleter(self.virtualEnvPy3Edit) |
75 self.py3ShellCombo.setCurrentIndex(self.py3ShellCombo.findData( |
76 self.py3ShellCombo.setCurrentIndex(self.py3ShellCombo.findData( |
76 self.__plugin.getPreferences("Python3ConsoleType"))) |
77 self.__plugin.getPreferences("Python3ConsoleType"))) |
77 |
78 |
78 self.urlEdit.setText( |
79 self.urlEdit.setText( |
79 self.__plugin.getPreferences("PyramidDocUrl")) |
80 self.__plugin.getPreferences("PyramidDocUrl")) |
|
81 |
|
82 self.translationsEdit.setText( |
|
83 self.__plugin.getPreferences("TranslationsEditor")) |
80 |
84 |
81 def save(self): |
85 def save(self): |
82 """ |
86 """ |
83 Public slot to save the Pyramid configuration. |
87 Public slot to save the Pyramid configuration. |
84 """ |
88 """ |
95 self.__plugin.setPreferences("Python3ConsoleType", |
99 self.__plugin.setPreferences("Python3ConsoleType", |
96 self.py3ShellCombo.itemData(self.py3ShellCombo.currentIndex())) |
100 self.py3ShellCombo.itemData(self.py3ShellCombo.currentIndex())) |
97 |
101 |
98 self.__plugin.setPreferences("PyramidDocUrl", |
102 self.__plugin.setPreferences("PyramidDocUrl", |
99 self.urlEdit.text()) |
103 self.urlEdit.text()) |
|
104 |
|
105 self.__plugin.setPreferences("TranslationsEditor", |
|
106 self.translationsEdit.text()) |
100 |
107 |
101 @pyqtSlot() |
108 @pyqtSlot() |
102 def on_virtualEnvPy3Button_clicked(self): |
109 def on_virtualEnvPy3Button_clicked(self): |
103 """ |
110 """ |
104 Private slot to select the virtual environment for Python 3 via a |
111 Private slot to select the virtual environment for Python 3 via a |
131 vDir, |
138 vDir, |
132 E5FileDialog.Options(E5FileDialog.Option(0))) |
139 E5FileDialog.Options(E5FileDialog.Option(0))) |
133 |
140 |
134 if virtualEnv: |
141 if virtualEnv: |
135 self.virtualEnvPy2Edit.setText(Utilities.toNativeSeparators(virtualEnv)) |
142 self.virtualEnvPy2Edit.setText(Utilities.toNativeSeparators(virtualEnv)) |
|
143 |
|
144 @pyqtSlot() |
|
145 def on_translationsButton_clicked(self): |
|
146 """ |
|
147 Private slot to select the translations editor via a file selection dialog. |
|
148 """ |
|
149 editor = E5FileDialog.getOpenFileName( |
|
150 self, |
|
151 self.trUtf8("Translations Editor"), |
|
152 self.translationsEdit.text(), |
|
153 self.trUtf8("All Files (*)")) |
|
154 if editor: |
|
155 self.translationsEdit.setText(Utilities.toNativeSeparators(editor)) |