3094 ) |
3094 ) |
3095 ) |
3095 ) |
3096 self.iconEditorAct.triggered.connect(self.__editPixmap) |
3096 self.iconEditorAct.triggered.connect(self.__editPixmap) |
3097 self.actions.append(self.iconEditorAct) |
3097 self.actions.append(self.iconEditorAct) |
3098 |
3098 |
3099 self.snapshotAct = EricAction( |
3099 if DesktopUtilities.isWaylandSession(): |
3100 self.tr("Snapshot"), |
3100 self.snapshotAct = None |
3101 EricPixmapCache.getIcon("ericSnap"), |
3101 else: |
3102 self.tr("&Snapshot..."), |
3102 self.snapshotAct = EricAction( |
3103 0, |
3103 self.tr("Snapshot"), |
3104 0, |
3104 EricPixmapCache.getIcon("ericSnap"), |
3105 self, |
3105 self.tr("&Snapshot..."), |
3106 "snapshot", |
3106 0, |
3107 ) |
3107 0, |
3108 self.snapshotAct.setStatusTip(self.tr("Take snapshots of a screen region")) |
3108 self, |
3109 self.snapshotAct.setWhatsThis( |
3109 "snapshot", |
3110 self.tr( |
3110 ) |
3111 """<b>Snapshot</b>""" |
3111 self.snapshotAct.setStatusTip(self.tr("Take snapshots of a screen region")) |
3112 """<p>This opens a dialog to take snapshots of a screen""" |
3112 self.snapshotAct.setWhatsThis( |
3113 """ region.</p>""" |
3113 self.tr( |
3114 ) |
3114 """<b>Snapshot</b>""" |
3115 ) |
3115 """<p>This opens a dialog to take snapshots of a screen""" |
3116 self.snapshotAct.triggered.connect(self.__snapshot) |
3116 """ region.</p>""" |
3117 self.actions.append(self.snapshotAct) |
3117 ) |
|
3118 ) |
|
3119 self.snapshotAct.triggered.connect(self.__snapshot) |
|
3120 self.actions.append(self.snapshotAct) |
3118 |
3121 |
3119 self.pdfViewerAct = EricAction( |
3122 self.pdfViewerAct = EricAction( |
3120 self.tr("eric PDF Viewer"), |
3123 self.tr("eric PDF Viewer"), |
3121 EricPixmapCache.getIcon("ericPdf"), |
3124 EricPixmapCache.getIcon("ericPdf"), |
3122 self.tr("eric PDF &Viewer..."), |
3125 self.tr("eric PDF &Viewer..."), |
4135 toolstb.addAction(self.sqlBrowserAct) |
4138 toolstb.addAction(self.sqlBrowserAct) |
4136 toolstb.addSeparator() |
4139 toolstb.addSeparator() |
4137 toolstb.addAction(self.miniEditorAct) |
4140 toolstb.addAction(self.miniEditorAct) |
4138 toolstb.addAction(self.hexEditorAct) |
4141 toolstb.addAction(self.hexEditorAct) |
4139 toolstb.addAction(self.iconEditorAct) |
4142 toolstb.addAction(self.iconEditorAct) |
4140 toolstb.addAction(self.snapshotAct) |
4143 if self.snapshotAct is not None: |
|
4144 toolstb.addAction(self.snapshotAct) |
4141 toolstb.addAction(self.pdfViewerAct) |
4145 toolstb.addAction(self.pdfViewerAct) |
4142 if self.webBrowserAct: |
4146 if self.webBrowserAct: |
4143 toolstb.addSeparator() |
4147 toolstb.addSeparator() |
4144 toolstb.addAction(self.webBrowserAct) |
4148 toolstb.addAction(self.webBrowserAct) |
4145 self.toolbarManager.addToolBar(toolstb, toolstb.windowTitle()) |
4149 self.toolbarManager.addToolBar(toolstb, toolstb.windowTitle()) |
5102 btMenu.addAction(self.compareAct) |
5106 btMenu.addAction(self.compareAct) |
5103 btMenu.addAction(self.sqlBrowserAct) |
5107 btMenu.addAction(self.sqlBrowserAct) |
5104 btMenu.addAction(self.miniEditorAct) |
5108 btMenu.addAction(self.miniEditorAct) |
5105 btMenu.addAction(self.hexEditorAct) |
5109 btMenu.addAction(self.hexEditorAct) |
5106 btMenu.addAction(self.iconEditorAct) |
5110 btMenu.addAction(self.iconEditorAct) |
5107 btMenu.addAction(self.snapshotAct) |
5111 if self.snapshotAct is not None: |
|
5112 btMenu.addAction(self.snapshotAct) |
5108 btMenu.addAction(self.pdfViewerAct) |
5113 btMenu.addAction(self.pdfViewerAct) |
5109 if self.webBrowserAct: |
5114 if self.webBrowserAct: |
5110 btMenu.addAction(self.webBrowserAct) |
5115 btMenu.addAction(self.webBrowserAct) |
5111 |
5116 |
5112 ptMenu = QMenu(self.tr("&Plugin Tools"), self) |
5117 ptMenu = QMenu(self.tr("&Plugin Tools"), self) |
6474 |
6479 |
6475 def __snapshot(self): |
6480 def __snapshot(self): |
6476 """ |
6481 """ |
6477 Private slot to start the snapshot tool. |
6482 Private slot to start the snapshot tool. |
6478 """ |
6483 """ |
|
6484 if DesktopUtilities.isWaylandSession(): |
|
6485 EricMessageBox.critical( |
|
6486 self, |
|
6487 self.tr("Snapshot"), |
|
6488 self.tr( |
|
6489 "<p>The snapshot utility is not available for Wayland desktop" |
|
6490 " sessions.</p>" |
|
6491 ), |
|
6492 ) |
|
6493 return |
|
6494 |
6479 proc = QProcess() |
6495 proc = QProcess() |
6480 |
6496 |
6481 snap = os.path.join(getConfig("ericDir"), "eric7_snap.py") |
6497 snap = os.path.join(getConfig("ericDir"), "eric7_snap.py") |
6482 |
6498 |
6483 args = [] |
6499 args = [] |