1225 @param name object name of the new dock window (string) |
1225 @param name object name of the new dock window (string) |
1226 @return the generated dock window (QDockWindow) |
1226 @return the generated dock window (QDockWindow) |
1227 """ |
1227 """ |
1228 dock = QDockWidget() |
1228 dock = QDockWidget() |
1229 dock.setObjectName(name) |
1229 dock.setObjectName(name) |
1230 dock.setFeatures(\ |
1230 dock.setFeatures( |
1231 QDockWidget.DockWidgetFeatures(QDockWidget.AllDockWidgetFeatures)) |
1231 QDockWidget.DockWidgetFeatures(QDockWidget.AllDockWidgetFeatures)) |
1232 return dock |
1232 return dock |
1233 |
1233 |
1234 def __setupDockWindow(self, dock, where, widget, caption): |
1234 def __setupDockWindow(self, dock, where, widget, caption): |
1235 """ |
1235 """ |
1325 self.setDebugProfileAct = E5Action(self.trUtf8('Debug Profile'), |
1325 self.setDebugProfileAct = E5Action(self.trUtf8('Debug Profile'), |
1326 UI.PixmapCache.getIcon("viewProfileDebug.png"), |
1326 UI.PixmapCache.getIcon("viewProfileDebug.png"), |
1327 self.trUtf8('Debug Profile'), |
1327 self.trUtf8('Debug Profile'), |
1328 0, 0, |
1328 0, 0, |
1329 self.viewProfileActGrp, 'debug_profile', True) |
1329 self.viewProfileActGrp, 'debug_profile', True) |
1330 self.setDebugProfileAct.setStatusTip(\ |
1330 self.setDebugProfileAct.setStatusTip( |
1331 self.trUtf8('Activate the debug view profile')) |
1331 self.trUtf8('Activate the debug view profile')) |
1332 self.setDebugProfileAct.setWhatsThis(self.trUtf8( |
1332 self.setDebugProfileAct.setWhatsThis(self.trUtf8( |
1333 """<b>Debug Profile</b>""" |
1333 """<b>Debug Profile</b>""" |
1334 """<p>Activate the "Debug View Profile". Windows being shown,""" |
1334 """<p>Activate the "Debug View Profile". Windows being shown,""" |
1335 """ if this profile is active, may be configured with the""" |
1335 """ if this profile is active, may be configured with the""" |
1501 self.actions.append(self.taskViewerActivateAct) |
1501 self.actions.append(self.taskViewerActivateAct) |
1502 self.addAction(self.taskViewerActivateAct) |
1502 self.addAction(self.taskViewerActivateAct) |
1503 |
1503 |
1504 self.templateViewerAct = E5Action(self.trUtf8('Template-Viewer'), |
1504 self.templateViewerAct = E5Action(self.trUtf8('Template-Viewer'), |
1505 self.trUtf8('Temp&late-Viewer'), 0, 0, self, 'template_viewer', True) |
1505 self.trUtf8('Temp&late-Viewer'), 0, 0, self, 'template_viewer', True) |
1506 self.templateViewerAct.setStatusTip(\ |
1506 self.templateViewerAct.setStatusTip( |
1507 self.trUtf8('Toggle the Template-Viewer window')) |
1507 self.trUtf8('Toggle the Template-Viewer window')) |
1508 self.templateViewerAct.setWhatsThis(self.trUtf8( |
1508 self.templateViewerAct.setWhatsThis(self.trUtf8( |
1509 """<b>Toggle the Template-Viewer window</b>""" |
1509 """<b>Toggle the Template-Viewer window</b>""" |
1510 """<p>If the Template-Viewer window is hidden then display it.""" |
1510 """<p>If the Template-Viewer window is hidden then display it.""" |
1511 """ If it is displayed then close it.</p>""" |
1511 """ If it is displayed then close it.</p>""" |
1695 self.actions.append(self.checkUpdateAct) |
1695 self.actions.append(self.checkUpdateAct) |
1696 |
1696 |
1697 self.showVersionsAct = E5Action(self.trUtf8('Show downloadable versions'), |
1697 self.showVersionsAct = E5Action(self.trUtf8('Show downloadable versions'), |
1698 self.trUtf8('Show &downloadable versions...'), |
1698 self.trUtf8('Show &downloadable versions...'), |
1699 0, 0, self, 'show_downloadable_versions') |
1699 0, 0, self, 'show_downloadable_versions') |
1700 self.showVersionsAct.setStatusTip(\ |
1700 self.showVersionsAct.setStatusTip( |
1701 self.trUtf8('Show the versions available for download')) |
1701 self.trUtf8('Show the versions available for download')) |
1702 self.showVersionsAct.setWhatsThis(self.trUtf8( |
1702 self.showVersionsAct.setWhatsThis(self.trUtf8( |
1703 """<b>Show downloadable versions...</b>""" |
1703 """<b>Show downloadable versions...</b>""" |
1704 """<p>Shows the eric5 versions available for download """ |
1704 """<p>Shows the eric5 versions available for download """ |
1705 """from the internet.</p>""" |
1705 """from the internet.</p>""" |
3020 |
3020 |
3021 self.__menus["tools"].addMenu(self.toolGroupsMenu) |
3021 self.__menus["tools"].addMenu(self.toolGroupsMenu) |
3022 act = self.__menus["tools"].addAction(self.trUtf8("Configure Tool Groups ..."), |
3022 act = self.__menus["tools"].addAction(self.trUtf8("Configure Tool Groups ..."), |
3023 self.__toolGroupsConfiguration) |
3023 self.__toolGroupsConfiguration) |
3024 act.setData(-1) |
3024 act.setData(-1) |
3025 act = self.__menus["tools"].addAction(\ |
3025 act = self.__menus["tools"].addAction( |
3026 self.trUtf8("Configure current Tool Group ..."), |
3026 self.trUtf8("Configure current Tool Group ..."), |
3027 self.__toolsConfiguration) |
3027 self.__toolsConfiguration) |
3028 act.setData(-2) |
3028 act.setData(-2) |
3029 self.__menus["tools"].addSeparator() |
3029 self.__menus["tools"].addSeparator() |
3030 |
3030 |
3053 try: |
3053 try: |
3054 for tool in self.toolGroups[self.currentToolGroup][1]: |
3054 for tool in self.toolGroups[self.currentToolGroup][1]: |
3055 if tool['menutext'] == '--': |
3055 if tool['menutext'] == '--': |
3056 self.__menus["tools"].addSeparator() |
3056 self.__menus["tools"].addSeparator() |
3057 else: |
3057 else: |
3058 act = self.__menus["tools"].addAction(\ |
3058 act = self.__menus["tools"].addAction( |
3059 UI.PixmapCache.getIcon(tool['icon']), tool['menutext']) |
3059 UI.PixmapCache.getIcon(tool['icon']), tool['menutext']) |
3060 act.setData(idx) |
3060 act.setData(idx) |
3061 idx += 1 |
3061 idx += 1 |
3062 except IndexError: |
3062 except IndexError: |
3063 # the current tool group might have been deleted |
3063 # the current tool group might have been deleted |
4883 |
4883 |
4884 def __exportShortcuts(self): |
4884 def __exportShortcuts(self): |
4885 """ |
4885 """ |
4886 Private slot to export the keyboard shortcuts. |
4886 Private slot to export the keyboard shortcuts. |
4887 """ |
4887 """ |
4888 fn, selectedFilter = QFileDialog.getSaveFileNameAndFilter(\ |
4888 fn, selectedFilter = QFileDialog.getSaveFileNameAndFilter( |
4889 None, |
4889 None, |
4890 self.trUtf8("Export Keyboard Shortcuts"), |
4890 self.trUtf8("Export Keyboard Shortcuts"), |
4891 "", |
4891 "", |
4892 self.trUtf8("Keyboard shortcut file (*.e4k);;" |
4892 self.trUtf8("Keyboard shortcut file (*.e4k);;" |
4893 "Compressed keyboard shortcut file (*.e4kz)"), |
4893 "Compressed keyboard shortcut file (*.e4kz)"), |
4912 |
4912 |
4913 def __importShortcuts(self): |
4913 def __importShortcuts(self): |
4914 """ |
4914 """ |
4915 Private slot to import the keyboard shortcuts. |
4915 Private slot to import the keyboard shortcuts. |
4916 """ |
4916 """ |
4917 fn = QFileDialog.getOpenFileName(\ |
4917 fn = QFileDialog.getOpenFileName( |
4918 None, |
4918 None, |
4919 self.trUtf8("Import Keyboard Shortcuts"), |
4919 self.trUtf8("Import Keyboard Shortcuts"), |
4920 "", |
4920 "", |
4921 self.trUtf8("Keyboard shortcut file (*.e4k *.e4kz)")) |
4921 self.trUtf8("Keyboard shortcut file (*.e4k *.e4kz)")) |
4922 |
4922 |
5411 else: |
5411 else: |
5412 period = Preferences.getUI("PerformVersionCheck") |
5412 period = Preferences.getUI("PerformVersionCheck") |
5413 if period == 0: |
5413 if period == 0: |
5414 return |
5414 return |
5415 elif period in [2, 3, 4]: |
5415 elif period in [2, 3, 4]: |
5416 lastCheck = Preferences.Prefs.settings.value(\ |
5416 lastCheck = Preferences.Prefs.settings.value( |
5417 "Updates/LastCheckDate", QDate(1970, 1, 1)) |
5417 "Updates/LastCheckDate", QDate(1970, 1, 1)) |
5418 if lastCheck.isValid(): |
5418 if lastCheck.isValid(): |
5419 now = QDate.currentDate() |
5419 now = QDate.currentDate() |
5420 if period == 2 and lastCheck.day() == now.day(): |
5420 if period == 2 and lastCheck.day() == now.day(): |
5421 # daily |
5421 # daily |
5487 versions = str(reply.readAll(), ioEncoding, 'replace').splitlines() |
5487 versions = str(reply.readAll(), ioEncoding, 'replace').splitlines() |
5488 self.__updateVersionsUrls(versions) |
5488 self.__updateVersionsUrls(versions) |
5489 if self.showAvailableVersions: |
5489 if self.showAvailableVersions: |
5490 self.__showAvailableVersionInfos(versions) |
5490 self.__showAvailableVersionInfos(versions) |
5491 else: |
5491 else: |
5492 Preferences.Prefs.settings.setValue(\ |
5492 Preferences.Prefs.settings.setValue( |
5493 "Updates/LastCheckDate", QDate.currentDate()) |
5493 "Updates/LastCheckDate", QDate.currentDate()) |
5494 self.__versionCheckResult(versions) |
5494 self.__versionCheckResult(versions) |
5495 |
5495 |
5496 def __updateVersionsUrls(self, versions): |
5496 def __updateVersionsUrls(self, versions): |
5497 """ |
5497 """ |