3115 ) |
3115 ) |
3116 ) |
3116 ) |
3117 self.iconEditorAct.triggered.connect(self.__editPixmap) |
3117 self.iconEditorAct.triggered.connect(self.__editPixmap) |
3118 self.actions.append(self.iconEditorAct) |
3118 self.actions.append(self.iconEditorAct) |
3119 |
3119 |
3120 self.snapshotAct = EricAction( |
3120 if DesktopUtilities.isWaylandSession(): |
3121 self.tr("Snapshot"), |
3121 self.snapshotAct = None |
3122 EricPixmapCache.getIcon("ericSnap"), |
3122 else: |
3123 self.tr("&Snapshot..."), |
3123 self.snapshotAct = EricAction( |
3124 0, |
3124 self.tr("Snapshot"), |
3125 0, |
3125 EricPixmapCache.getIcon("ericSnap"), |
3126 self, |
3126 self.tr("&Snapshot..."), |
3127 "snapshot", |
3127 0, |
3128 ) |
3128 0, |
3129 self.snapshotAct.setStatusTip(self.tr("Take snapshots of a screen region")) |
3129 self, |
3130 self.snapshotAct.setWhatsThis( |
3130 "snapshot", |
3131 self.tr( |
3131 ) |
3132 """<b>Snapshot</b>""" |
3132 self.snapshotAct.setStatusTip(self.tr("Take snapshots of a screen region")) |
3133 """<p>This opens a dialog to take snapshots of a screen""" |
3133 self.snapshotAct.setWhatsThis( |
3134 """ region.</p>""" |
3134 self.tr( |
3135 ) |
3135 """<b>Snapshot</b>""" |
3136 ) |
3136 """<p>This opens a dialog to take snapshots of a screen""" |
3137 self.snapshotAct.triggered.connect(self.__snapshot) |
3137 """ region.</p>""" |
3138 self.actions.append(self.snapshotAct) |
3138 ) |
|
3139 ) |
|
3140 self.snapshotAct.triggered.connect(self.__snapshot) |
|
3141 self.actions.append(self.snapshotAct) |
3139 |
3142 |
3140 self.pdfViewerAct = EricAction( |
3143 self.pdfViewerAct = EricAction( |
3141 self.tr("eric PDF Viewer"), |
3144 self.tr("eric PDF Viewer"), |
3142 EricPixmapCache.getIcon("ericPdf"), |
3145 EricPixmapCache.getIcon("ericPdf"), |
3143 self.tr("eric PDF &Viewer..."), |
3146 self.tr("eric PDF &Viewer..."), |
4169 toolstb.addAction(self.sqlBrowserAct) |
4172 toolstb.addAction(self.sqlBrowserAct) |
4170 toolstb.addSeparator() |
4173 toolstb.addSeparator() |
4171 toolstb.addAction(self.miniEditorAct) |
4174 toolstb.addAction(self.miniEditorAct) |
4172 toolstb.addAction(self.hexEditorAct) |
4175 toolstb.addAction(self.hexEditorAct) |
4173 toolstb.addAction(self.iconEditorAct) |
4176 toolstb.addAction(self.iconEditorAct) |
4174 toolstb.addAction(self.snapshotAct) |
4177 if self.snapshotAct is not None: |
|
4178 toolstb.addAction(self.snapshotAct) |
4175 toolstb.addAction(self.pdfViewerAct) |
4179 toolstb.addAction(self.pdfViewerAct) |
4176 if self.webBrowserAct: |
4180 if self.webBrowserAct: |
4177 toolstb.addSeparator() |
4181 toolstb.addSeparator() |
4178 toolstb.addAction(self.webBrowserAct) |
4182 toolstb.addAction(self.webBrowserAct) |
4179 self.toolbarManager.addToolBar(toolstb, toolstb.windowTitle()) |
4183 self.toolbarManager.addToolBar(toolstb, toolstb.windowTitle()) |
5138 btMenu.addAction(self.compareAct) |
5142 btMenu.addAction(self.compareAct) |
5139 btMenu.addAction(self.sqlBrowserAct) |
5143 btMenu.addAction(self.sqlBrowserAct) |
5140 btMenu.addAction(self.miniEditorAct) |
5144 btMenu.addAction(self.miniEditorAct) |
5141 btMenu.addAction(self.hexEditorAct) |
5145 btMenu.addAction(self.hexEditorAct) |
5142 btMenu.addAction(self.iconEditorAct) |
5146 btMenu.addAction(self.iconEditorAct) |
5143 btMenu.addAction(self.snapshotAct) |
5147 if self.snapshotAct is not None: |
|
5148 btMenu.addAction(self.snapshotAct) |
5144 btMenu.addAction(self.pdfViewerAct) |
5149 btMenu.addAction(self.pdfViewerAct) |
5145 if self.webBrowserAct: |
5150 if self.webBrowserAct: |
5146 btMenu.addAction(self.webBrowserAct) |
5151 btMenu.addAction(self.webBrowserAct) |
5147 |
5152 |
5148 ptMenu = QMenu(self.tr("&Plugin Tools"), self) |
5153 ptMenu = QMenu(self.tr("&Plugin Tools"), self) |
6510 |
6515 |
6511 def __snapshot(self): |
6516 def __snapshot(self): |
6512 """ |
6517 """ |
6513 Private slot to start the snapshot tool. |
6518 Private slot to start the snapshot tool. |
6514 """ |
6519 """ |
|
6520 if DesktopUtilities.isWaylandSession(): |
|
6521 EricMessageBox.critical( |
|
6522 self, |
|
6523 self.tr("Snapshot"), |
|
6524 self.tr( |
|
6525 "<p>The snapshot utility is not available for Wayland desktop" |
|
6526 " sessions.</p>" |
|
6527 ), |
|
6528 ) |
|
6529 return |
|
6530 |
6515 proc = QProcess() |
6531 proc = QProcess() |
6516 |
6532 |
6517 snap = os.path.join(getConfig("ericDir"), "eric7_snap.py") |
6533 snap = os.path.join(getConfig("ericDir"), "eric7_snap.py") |
6518 |
6534 |
6519 args = [] |
6535 args = [] |