src/eric7/PdfViewer/PdfViewerWindow.py

branch
pdf_viewer
changeset 9712
24bdc37413dd
parent 9707
717f95e35ca8
child 9713
84e997a2b306
equal deleted inserted replaced
9711:614bb8b0d175 9712:24bdc37413dd
584 584
585 def __initSettingsActions(self): 585 def __initSettingsActions(self):
586 """ 586 """
587 Private method to create the Settings actions. 587 Private method to create the Settings actions.
588 """ 588 """
589 self.prefAct = EricAction(
590 self.tr("Preferences"),
591 EricPixmapCache.getIcon("configure"),
592 self.tr("&Preferences..."),
593 0,
594 0,
595 self,
596 "pdfviewer_settings_preferences",
597 )
598 self.prefAct.setStatusTip(self.tr("Set the prefered configuration"))
599 self.prefAct.setWhatsThis(
600 self.tr(
601 """<b>Preferences</b>"""
602 """<p>Set the configuration items of the application"""
603 """ with your prefered values.</p>"""
604 )
605 )
606 self.prefAct.triggered.connect(self.__showPreferences)
607 self.prefAct.setMenuRole(QAction.MenuRole.PreferencesRole)
608 self.__actions.append(self.prefAct)
609
589 self.sidebarAct = EricAction( 610 self.sidebarAct = EricAction(
590 self.tr("Show Sidebar"), 611 self.tr("Show Sidebar"),
591 EricPixmapCache.getIcon("sidebarExpandLeft"), 612 EricPixmapCache.getIcon("sidebarExpandLeft"),
592 self.tr("Show &Sidebar"), 613 self.tr("Show &Sidebar"),
593 0, 614 0,
778 menu.addSeparator() 799 menu.addSeparator()
779 menu.addAction(self.gotoAct) 800 menu.addAction(self.gotoAct)
780 801
781 menu = mb.addMenu(self.tr("Se&ttings")) 802 menu = mb.addMenu(self.tr("Se&ttings"))
782 menu.setTearOffEnabled(True) 803 menu.setTearOffEnabled(True)
804 menu.addAction(self.prefAct)
805 menu.addSeparator()
783 menu.addAction(self.sidebarAct) 806 menu.addAction(self.sidebarAct)
784 menu.addSeparator() 807 menu.addSeparator()
785 menu.addAction(self.openRecentNewAct) 808 menu.addAction(self.openRecentNewAct)
786 809
787 mb.addSeparator() 810 mb.addSeparator()
1150 from eric7.Preferences.ConfigurationDialog import ( 1173 from eric7.Preferences.ConfigurationDialog import (
1151 ConfigurationDialog, 1174 ConfigurationDialog,
1152 ConfigurationMode, 1175 ConfigurationMode,
1153 ) 1176 )
1154 1177
1155 # TODO: not yet implemented 1178 dlg = ConfigurationDialog(
1179 None,
1180 "Configuration",
1181 True,
1182 fromEric=True,
1183 displayMode=ConfigurationMode.PDFVIEWERMODE,
1184 )
1185 dlg.show()
1186 dlg.showConfigurationPageByName("pdfViewerPage")
1187 dlg.exec()
1188 if dlg.result() == QDialog.DialogCode.Accepted:
1189 dlg.setPreferences()
1190 Preferences.syncPreferences()
1156 1191
1157 @pyqtSlot() 1192 @pyqtSlot()
1158 def __showFileMenu(self): 1193 def __showFileMenu(self):
1159 """ 1194 """
1160 Private slot to modify the file menu before being shown. 1195 Private slot to modify the file menu before being shown.

eric ide

mercurial