Preferences/ToolConfigurationDialog.py

changeset 3025
67064c71df21
parent 3020
542e97d4ecb3
child 3034
7ce719013078
child 3058
0a02c433f52d
equal deleted inserted replaced
3024:17c01303a239 3025:67064c71df21
98 98
99 if not executable: 99 if not executable:
100 E5MessageBox.critical( 100 E5MessageBox.critical(
101 self, 101 self,
102 self.trUtf8("Add tool entry"), 102 self.trUtf8("Add tool entry"),
103 self.trUtf8("You have to set an executable to add to the" 103 self.trUtf8(
104 "You have to set an executable to add to the"
104 " Tools-Menu first.")) 105 " Tools-Menu first."))
105 return 106 return
106 107
107 if not menutext: 108 if not menutext:
108 E5MessageBox.critical( 109 E5MessageBox.critical(
109 self, 110 self,
110 self.trUtf8("Add tool entry"), 111 self.trUtf8("Add tool entry"),
111 self.trUtf8("You have to insert a menuentry text to add the" 112 self.trUtf8(
113 "You have to insert a menuentry text to add the"
112 " selected program to the Tools-Menu first.")) 114 " selected program to the Tools-Menu first."))
113 return 115 return
114 116
115 if not Utilities.isinpath(executable): 117 if not Utilities.isinpath(executable):
116 E5MessageBox.critical( 118 E5MessageBox.critical(
117 self, 119 self,
118 self.trUtf8("Add tool entry"), 120 self.trUtf8("Add tool entry"),
119 self.trUtf8("The selected file could not be found or" 121 self.trUtf8(
122 "The selected file could not be found or"
120 " is not an executable." 123 " is not an executable."
121 " Please choose an executable filename.")) 124 " Please choose an executable filename."))
122 return 125 return
123 126
124 if len(self.toolsList.findItems( 127 if len(self.toolsList.findItems(
157 160
158 if not executable: 161 if not executable:
159 E5MessageBox.critical( 162 E5MessageBox.critical(
160 self, 163 self,
161 self.trUtf8("Change tool entry"), 164 self.trUtf8("Change tool entry"),
162 self.trUtf8("You have to set an executable to change the" 165 self.trUtf8(
166 "You have to set an executable to change the"
163 " Tools-Menu entry.")) 167 " Tools-Menu entry."))
164 return 168 return
165 169
166 if not menutext: 170 if not menutext:
167 E5MessageBox.critical( 171 E5MessageBox.critical(
168 self, 172 self,
169 self.trUtf8("Change tool entry"), 173 self.trUtf8("Change tool entry"),
170 self.trUtf8("You have to insert a menuentry text to change the" 174 self.trUtf8(
175 "You have to insert a menuentry text to change the"
171 " selected Tools-Menu entry.")) 176 " selected Tools-Menu entry."))
172 return 177 return
173 178
174 if not Utilities.isinpath(executable): 179 if not Utilities.isinpath(executable):
175 E5MessageBox.critical( 180 E5MessageBox.critical(
176 self, 181 self,
177 self.trUtf8("Change tool entry"), 182 self.trUtf8("Change tool entry"),
178 self.trUtf8("The selected file could not be found or" 183 self.trUtf8(
184 "The selected file could not be found or"
179 " is not an executable." 185 " is not an executable."
180 " Please choose an existing executable filename.")) 186 " Please choose an existing executable filename."))
181 return 187 return
182 188
183 self.toollist[row] = { 189 self.toollist[row] = {
267 execfile = Utilities.toNativeSeparators(execfile) 273 execfile = Utilities.toNativeSeparators(execfile)
268 if not Utilities.isinpath(execfile): 274 if not Utilities.isinpath(execfile):
269 E5MessageBox.critical( 275 E5MessageBox.critical(
270 self, 276 self,
271 self.trUtf8("Select executable"), 277 self.trUtf8("Select executable"),
272 self.trUtf8("The selected file is not an executable." 278 self.trUtf8(
279 "The selected file is not an executable."
273 " Please choose an executable filename.")) 280 " Please choose an executable filename."))
274 return 281 return
275 282
276 self.executableEdit.setText(execfile) 283 self.executableEdit.setText(execfile)
277 284

eric ide

mercurial