275 def __activated(self, reason): |
275 def __activated(self, reason): |
276 """ |
276 """ |
277 Private slot to handle the activated signal. |
277 Private slot to handle the activated signal. |
278 |
278 |
279 @param reason reason code of the signal |
279 @param reason reason code of the signal |
280 (QSystemTrayIcon.ActivationReason) |
280 @type QSystemTrayIcon.ActivationReason |
281 """ |
281 """ |
282 if reason in ( |
282 if reason in ( |
283 QSystemTrayIcon.ActivationReason.Context, |
283 QSystemTrayIcon.ActivationReason.Context, |
284 QSystemTrayIcon.ActivationReason.MiddleClick, |
284 QSystemTrayIcon.ActivationReason.MiddleClick, |
285 ): |
285 ): |
304 |
304 |
305 def __startProc(self, applName, *applArgs): |
305 def __startProc(self, applName, *applArgs): |
306 """ |
306 """ |
307 Private method to start an eric application. |
307 Private method to start an eric application. |
308 |
308 |
309 @param applName name of the eric application script (string) |
309 @param applName name of the eric application script |
|
310 @type str |
310 @param *applArgs variable list of application arguments |
311 @param *applArgs variable list of application arguments |
|
312 @type list of str |
311 """ |
313 """ |
312 proc = QProcess() |
314 proc = QProcess() |
313 applPath = os.path.join(os.path.dirname(__file__), "..", applName) |
315 applPath = os.path.join(os.path.dirname(__file__), "..", applName) |
314 |
316 |
315 args = [] |
317 args = [] |
543 def __openRecent(self, act): |
545 def __openRecent(self, act): |
544 """ |
546 """ |
545 Private method to open a project or file from the list of recently |
547 Private method to open a project or file from the list of recently |
546 opened projects or files. |
548 opened projects or files. |
547 |
549 |
548 @param act reference to the action that triggered (QAction) |
550 @param act reference to the action that triggered |
|
551 @type QAction |
549 """ |
552 """ |
550 filename = act.data() |
553 filename = act.data() |
551 if filename: |
554 if filename: |
552 self.__startProc("eric7_ide.py", filename) |
555 self.__startProc("eric7_ide.py", filename) |
553 |
556 |