Tools/TrayStarter.py

changeset 432
497e188ee86e
parent 18
3b1f5d872fd7
child 461
34528aaedf1c
equal deleted inserted replaced
431:96cc7d322f89 432:497e188ee86e
209 209
210 def __startMiniEditor(self): 210 def __startMiniEditor(self):
211 """ 211 """
212 Private slot to start the eric5 Mini Editor. 212 Private slot to start the eric5 Mini Editor.
213 """ 213 """
214 self.__startProc("eric5-editor.py", "--config=%s" % Utilities.getConfigDir()) 214 self.__startProc("eric5-editor.py", "--config={0}".format(
215 Utilities.getConfigDir()))
215 216
216 def __startEric(self): 217 def __startEric(self):
217 """ 218 """
218 Private slot to start the eric5 IDE. 219 Private slot to start the eric5 IDE.
219 """ 220 """
220 self.__startProc("eric5.py", "--config=%s" % Utilities.getConfigDir()) 221 self.__startProc("eric5.py", "--config={0}".format(
222 Utilities.getConfigDir()))
221 223
222 def __startPreferences(self): 224 def __startPreferences(self):
223 """ 225 """
224 Private slot to start the eric5 configuration dialog. 226 Private slot to start the eric5 configuration dialog.
225 """ 227 """
226 self.__startProc("eric5-configure.py", "--config=%s" % Utilities.getConfigDir()) 228 self.__startProc("eric5-configure.py", "--config={0}".format(
229 Utilities.getConfigDir()))
227 230
228 def __startPluginInstall(self): 231 def __startPluginInstall(self):
229 """ 232 """
230 Private slot to start the eric5 plugin installation dialog. 233 Private slot to start the eric5 plugin installation dialog.
231 """ 234 """
232 self.__startProc("eric5-plugininstall.py", 235 self.__startProc("eric5-plugininstall.py", "--config={0}".format(
233 "--config=%s" % Utilities.getConfigDir()) 236 Utilities.getConfigDir()))
234 237
235 def __startPluginUninstall(self): 238 def __startPluginUninstall(self):
236 """ 239 """
237 Private slot to start the eric5 plugin uninstallation dialog. 240 Private slot to start the eric5 plugin uninstallation dialog.
238 """ 241 """
239 self.__startProc("eric5-pluginuninstall.py", 242 self.__startProc("eric5-pluginuninstall.py", "--config={0}".format(
240 "--config=%s" % Utilities.getConfigDir()) 243 Utilities.getConfigDir()))
241 244
242 def __startPluginRepository(self): 245 def __startPluginRepository(self):
243 """ 246 """
244 Private slot to start the eric5 plugin repository dialog. 247 Private slot to start the eric5 plugin repository dialog.
245 """ 248 """
246 self.__startProc("eric5-pluginrepository.py", 249 self.__startProc("eric5-pluginrepository.py", "--config={0}".format(
247 "--config=%s" % Utilities.getConfigDir()) 250 Utilities.getConfigDir()))
248 251
249 def __startHelpViewer(self): 252 def __startHelpViewer(self):
250 """ 253 """
251 Private slot to start the eric5 web browser. 254 Private slot to start the eric5 web browser.
252 """ 255 """
253 self.__startProc("eric5-webbrowser.py", "--config=%s" % Utilities.getConfigDir()) 256 self.__startProc("eric5-webbrowser.py", "--config={0}".format(
257 Utilities.getConfigDir()))
254 258
255 def __startUIPreviewer(self): 259 def __startUIPreviewer(self):
256 """ 260 """
257 Private slot to start the eric5 UI previewer. 261 Private slot to start the eric5 UI previewer.
258 """ 262 """
259 self.__startProc("eric5-uipreviewer.py", "--config=%s" % Utilities.getConfigDir()) 263 self.__startProc("eric5-uipreviewer.py", "--config={0}".format(
264 Utilities.getConfigDir()))
260 265
261 def __startTRPreviewer(self): 266 def __startTRPreviewer(self):
262 """ 267 """
263 Private slot to start the eric5 translations previewer. 268 Private slot to start the eric5 translations previewer.
264 """ 269 """
265 self.__startProc("eric5-trpreviewer.py", "--config=%s" % Utilities.getConfigDir()) 270 self.__startProc("eric5-trpreviewer.py", "--config={0}".format(
271 Utilities.getConfigDir()))
266 272
267 def __startUnittest(self): 273 def __startUnittest(self):
268 """ 274 """
269 Private slot to start the eric5 unittest dialog. 275 Private slot to start the eric5 unittest dialog.
270 """ 276 """
271 self.__startProc("eric5-unittest.py", "--config=%s" % Utilities.getConfigDir()) 277 self.__startProc("eric5-unittest.py", "--config={0}".format(
278 Utilities.getConfigDir()))
272 279
273 def __startDiff(self): 280 def __startDiff(self):
274 """ 281 """
275 Private slot to start the eric5 diff dialog. 282 Private slot to start the eric5 diff dialog.
276 """ 283 """
277 self.__startProc("eric5-diff.py", "--config=%s" % Utilities.getConfigDir()) 284 self.__startProc("eric5-diff.py", "--config={0}".format(
285 Utilities.getConfigDir()))
278 286
279 def __startCompare(self): 287 def __startCompare(self):
280 """ 288 """
281 Private slot to start the eric5 compare dialog. 289 Private slot to start the eric5 compare dialog.
282 """ 290 """
283 self.__startProc("eric5-compare.py", "--config=%s" % Utilities.getConfigDir()) 291 self.__startProc("eric5-compare.py", "--config={0}".format(
292 Utilities.getConfigDir()))
284 293
285 def __startSqlBrowser(self): 294 def __startSqlBrowser(self):
286 """ 295 """
287 Private slot to start the eric5 sql browser dialog. 296 Private slot to start the eric5 sql browser dialog.
288 """ 297 """
289 self.__startProc("eric5-sqlbrowser.py", "--config=%s" % Utilities.getConfigDir()) 298 self.__startProc("eric5-sqlbrowser.py", "--config={0}".format(
299 Utilities.getConfigDir()))
290 300
291 def __startQRegExp(self): 301 def __startQRegExp(self):
292 """ 302 """
293 Private slot to start the eric5 QRegExp editor dialog. 303 Private slot to start the eric5 QRegExp editor dialog.
294 """ 304 """
295 self.__startProc("eric5-qregexp.py", "--config=%s" % Utilities.getConfigDir()) 305 self.__startProc("eric5-qregexp.py", "--config={0}".format(
306 Utilities.getConfigDir()))
296 307
297 def __startPyRe(self): 308 def __startPyRe(self):
298 """ 309 """
299 Private slot to start the eric5 Python re editor dialog. 310 Private slot to start the eric5 Python re editor dialog.
300 """ 311 """
301 self.__startProc("eric5-re.py", "--config=%s" % Utilities.getConfigDir()) 312 self.__startProc("eric5-re.py", "--config={0}".format(
313 Utilities.getConfigDir()))
302 314
303 def __showRecentProjectsMenu(self): 315 def __showRecentProjectsMenu(self):
304 """ 316 """
305 Private method to set up the recent projects menu. 317 Private method to set up the recent projects menu.
306 """ 318 """
311 self.recentProjectsMenu.clear() 323 self.recentProjectsMenu.clear()
312 324
313 idx = 1 325 idx = 1
314 for rp in self.recentProjects: 326 for rp in self.recentProjects:
315 if idx < 10: 327 if idx < 10:
316 formatStr = '&%d. %s' 328 formatStr = '&{0:d}. {1}'
317 else: 329 else:
318 formatStr = '%d. %s' 330 formatStr = '{0:d}. {1}'
319 act = self.recentProjectsMenu.addAction( 331 act = self.recentProjectsMenu.addAction(
320 formatStr % (idx, 332 formatStr.format(idx,
321 Utilities.compactPath(rp, self.maxMenuFilePathLen))) 333 Utilities.compactPath(rp, self.maxMenuFilePathLen)))
322 act.setData(rp) 334 act.setData(rp)
323 idx += 1 335 idx += 1
324 336
325 def __showRecentMultiProjectsMenu(self): 337 def __showRecentMultiProjectsMenu(self):
333 self.recentMultiProjectsMenu.clear() 345 self.recentMultiProjectsMenu.clear()
334 346
335 idx = 1 347 idx = 1
336 for rmp in self.recentMultiProjects: 348 for rmp in self.recentMultiProjects:
337 if idx < 10: 349 if idx < 10:
338 formatStr = '&%d. %s' 350 formatStr = '&{0:d}. {1}'
339 else: 351 else:
340 formatStr = '%d. %s' 352 formatStr = '{0:d}. {1}'
341 act = self.recentMultiProjectsMenu.addAction( 353 act = self.recentMultiProjectsMenu.addAction(
342 formatStr % (idx, 354 formatStr.format(idx,
343 Utilities.compactPath(rmp, self.maxMenuFilePathLen))) 355 Utilities.compactPath(rmp, self.maxMenuFilePathLen)))
344 act.setData(rmp) 356 act.setData(rmp)
345 idx += 1 357 idx += 1
346 358
347 def __showRecentFilesMenu(self): 359 def __showRecentFilesMenu(self):
355 self.recentFilesMenu.clear() 367 self.recentFilesMenu.clear()
356 368
357 idx = 1 369 idx = 1
358 for rf in self.recentFiles: 370 for rf in self.recentFiles:
359 if idx < 10: 371 if idx < 10:
360 formatStr = '&%d. %s' 372 formatStr = '&{0:d}. {1}'
361 else: 373 else:
362 formatStr = '%d. %s' 374 formatStr = '{0:d}. {1}'
363 act = self.recentFilesMenu.addAction(\ 375 act = self.recentFilesMenu.addAction(\
364 formatStr % (idx, 376 formatStr.format(idx,
365 Utilities.compactPath(rf, self.maxMenuFilePathLen))) 377 Utilities.compactPath(rf, self.maxMenuFilePathLen)))
366 act.setData(rf) 378 act.setData(rf)
367 idx += 1 379 idx += 1
368 380
369 def __openRecent(self, act): 381 def __openRecent(self, act):

eric ide

mercurial