Preferences/ProgramsDialog.py

changeset 901
99b4cb6910ad
parent 896
f855351d5e98
child 945
8cd4d08fa9f6
child 1141
3017c0a73c73
equal deleted inserted replaced
900:c5d8b27ac6c1 901:99b4cb6910ad
19 from .Ui_ProgramsDialog import Ui_ProgramsDialog 19 from .Ui_ProgramsDialog import Ui_ProgramsDialog
20 20
21 import Preferences 21 import Preferences
22 import Utilities 22 import Utilities
23 23
24 from eric5config import getConfig
25 24
26 class ProgramsDialog(QDialog, Ui_ProgramsDialog): 25 class ProgramsDialog(QDialog, Ui_ProgramsDialog):
27 """ 26 """
28 Class implementing the Programs page. 27 Class implementing the Programs page.
29 """ 28 """
134 # 4b. Resource Compiler for Qt4 133 # 4b. Resource Compiler for Qt4
135 self.__createProgramEntry(self.trUtf8("Resource Compiler (Ruby, Qt4)"), 134 self.__createProgramEntry(self.trUtf8("Resource Compiler (Ruby, Qt4)"),
136 Utilities.isWindowsPlatform() and "rbrcc.exe" or "rbrcc", 135 Utilities.isWindowsPlatform() and "rbrcc.exe" or "rbrcc",
137 '-version', 'Ruby Resource Compiler', -1) 136 '-version', 'Ruby Resource Compiler', -1)
138 137
139 # 5. do the Eric5 programs 138 # 5. do the CORBA programs
140 # 5a. Translation Previewer 139 # 5a. omniORB
141 self.__createProgramEntry(self.trUtf8("Eric5 Translation Previewer"),
142 Utilities.isWindowsPlatform() and \
143 os.path.join(getConfig("bindir"), "eric5_trpreviewer.bat") or \
144 "eric5_trpreviewer",
145 '--version', 'Eric5', -3)
146 # 5b. Forms Previewer
147 self.__createProgramEntry(self.trUtf8("Eric5 Forms Previewer"),
148 Utilities.isWindowsPlatform() and \
149 os.path.join(getConfig("bindir"), "eric5_uipreviewer.bat") or \
150 "eric5_uipreviewer",
151 '--version', 'Eric5', -3)
152
153 # 6. do the CORBA programs
154 # 6a. omniORB
155 exe = Preferences.getCorba("omniidl") 140 exe = Preferences.getCorba("omniidl")
156 if Utilities.isWindowsPlatform(): 141 if Utilities.isWindowsPlatform():
157 exe += ".exe" 142 exe += ".exe"
158 self.__createProgramEntry(self.trUtf8("CORBA IDL Compiler"), exe, 143 self.__createProgramEntry(self.trUtf8("CORBA IDL Compiler"), exe,
159 '-V', 'omniidl', -1) 144 '-V', 'omniidl', -1)
160 145
161 # 7. do the spell checking entry 146 # 6. do the spell checking entry
162 try: 147 try:
163 import enchant 148 import enchant
164 try: 149 try:
165 text = os.path.dirname(enchant.__file__) 150 text = os.path.dirname(enchant.__file__)
166 except AttributeError: 151 except AttributeError:
172 except (ImportError, AttributeError, OSError): 157 except (ImportError, AttributeError, OSError):
173 text = "enchant" 158 text = "enchant"
174 version = "" 159 version = ""
175 self.__createEntry(self.trUtf8("Spell Checker - PyEnchant"), text, version) 160 self.__createEntry(self.trUtf8("Spell Checker - PyEnchant"), text, version)
176 161
177 # 8. do the pygments entry 162 # 7. do the pygments entry
178 try: 163 try:
179 import pygments 164 import pygments
180 try: 165 try:
181 text = os.path.dirname(pygments.__file__) 166 text = os.path.dirname(pygments.__file__)
182 except AttributeError: 167 except AttributeError:

eric ide

mercurial