45 self.settingsDir = settingsDir |
45 self.settingsDir = settingsDir |
46 |
46 |
47 self.maxMenuFilePathLen = 75 |
47 self.maxMenuFilePathLen = 75 |
48 |
48 |
49 self.rsettings = QSettings( |
49 self.rsettings = QSettings( |
50 QSettings.IniFormat, |
50 QSettings.Format.IniFormat, |
51 QSettings.UserScope, |
51 QSettings.Scope.UserScope, |
52 Globals.settingsNameOrganization, |
52 Globals.settingsNameOrganization, |
53 Globals.settingsNameRecent) |
53 Globals.settingsNameRecent) |
54 |
54 |
55 self.recentProjects = [] |
55 self.recentProjects = [] |
56 self.__loadRecentProjects() |
56 self.__loadRecentProjects() |
229 |
229 |
230 @param reason reason code of the signal |
230 @param reason reason code of the signal |
231 (QSystemTrayIcon.ActivationReason) |
231 (QSystemTrayIcon.ActivationReason) |
232 """ |
232 """ |
233 if ( |
233 if ( |
234 reason == QSystemTrayIcon.Context or |
234 reason == QSystemTrayIcon.ActivationReason.Context or |
235 reason == QSystemTrayIcon.MiddleClick |
235 reason == QSystemTrayIcon.ActivationReason.MiddleClick |
236 ): |
236 ): |
237 self.__showContextMenu() |
237 self.__showContextMenu() |
238 elif reason == QSystemTrayIcon.DoubleClick: |
238 elif reason == QSystemTrayIcon.ActivationReason.DoubleClick: |
239 self.__startEric() |
239 self.__startEric() |
240 |
240 |
241 def __showContextMenu(self): |
241 def __showContextMenu(self): |
242 """ |
242 """ |
243 Private slot to show the context menu. |
243 Private slot to show the context menu. |
507 dlg.preferencesChanged.connect(self.preferencesChanged) |
507 dlg.preferencesChanged.connect(self.preferencesChanged) |
508 dlg.show() |
508 dlg.show() |
509 dlg.showConfigurationPageByName("trayStarterPage") |
509 dlg.showConfigurationPageByName("trayStarterPage") |
510 dlg.exec() |
510 dlg.exec() |
511 QApplication.processEvents() |
511 QApplication.processEvents() |
512 if dlg.result() == QDialog.Accepted: |
512 if dlg.result() == QDialog.DialogCode.Accepted: |
513 dlg.setPreferences() |
513 dlg.setPreferences() |
514 Preferences.syncPreferences() |
514 Preferences.syncPreferences() |
515 self.preferencesChanged() |
515 self.preferencesChanged() |
516 |
516 |
517 def preferencesChanged(self): |
517 def preferencesChanged(self): |