762 self.printPreviewAct.triggered.connect( |
762 self.printPreviewAct.triggered.connect( |
763 self.printPreviewCurrentEditor) |
763 self.printPreviewCurrentEditor) |
764 self.printPreviewAct.setEnabled(False) |
764 self.printPreviewAct.setEnabled(False) |
765 self.fileActions.append(self.printPreviewAct) |
765 self.fileActions.append(self.printPreviewAct) |
766 |
766 |
767 self.findFileNameAct = EricAction( |
767 self.findLocationAct = EricAction( |
768 QCoreApplication.translate('ViewManager', 'Search File'), |
768 QCoreApplication.translate('ViewManager', 'Find File'), |
769 QCoreApplication.translate('ViewManager', 'Search &File...'), |
769 UI.PixmapCache.getIcon("findLocation"), |
770 QKeySequence(QCoreApplication.translate( |
770 QCoreApplication.translate('ViewManager', 'Find &File...'), |
771 'ViewManager', "Alt+Ctrl+F", "File|Search File")), |
771 QKeySequence(QCoreApplication.translate( |
|
772 'ViewManager', "Alt+Ctrl+F", "File|Find File")), |
772 0, self, 'vm_file_search_file') |
773 0, self, 'vm_file_search_file') |
773 self.findFileNameAct.setStatusTip(QCoreApplication.translate( |
774 self.findLocationAct.setStatusTip(QCoreApplication.translate( |
774 'ViewManager', 'Search for a file')) |
775 'ViewManager', 'Search for a file by entering a search pattern')) |
775 self.findFileNameAct.setWhatsThis(QCoreApplication.translate( |
776 self.findLocationAct.setWhatsThis(QCoreApplication.translate( |
776 'ViewManager', |
777 'ViewManager', |
777 """<b>Search File</b>""" |
778 """<b>Find File</b>""" |
778 """<p>Search for a file.</p>""" |
779 """<p>This searches for a file by entering a search pattern.</p>""" |
779 )) |
780 )) |
780 self.findFileNameAct.triggered.connect(self.__findFileName) |
781 self.findLocationAct.triggered.connect(self.__findLocation) |
781 self.fileActions.append(self.findFileNameAct) |
782 self.fileActions.append(self.findLocationAct) |
782 |
783 |
783 def initFileMenu(self): |
784 def initFileMenu(self): |
784 """ |
785 """ |
785 Public method to create the File menu. |
786 Public method to create the File menu. |
786 |
787 |
804 menu.addMenu(self.bookmarkedMenu) |
805 menu.addMenu(self.bookmarkedMenu) |
805 menu.addSeparator() |
806 menu.addSeparator() |
806 menu.addAction(self.closeAct) |
807 menu.addAction(self.closeAct) |
807 menu.addAction(self.closeAllAct) |
808 menu.addAction(self.closeAllAct) |
808 menu.addSeparator() |
809 menu.addSeparator() |
809 menu.addAction(self.findFileNameAct) |
810 menu.addAction(self.findLocationAct) |
810 menu.addSeparator() |
811 menu.addSeparator() |
811 menu.addAction(self.saveAct) |
812 menu.addAction(self.saveAct) |
812 menu.addAction(self.saveAsAct) |
813 menu.addAction(self.saveAsAct) |
813 menu.addAction(self.saveCopyAct) |
814 menu.addAction(self.saveCopyAct) |
814 menu.addAction(self.saveAllAct) |
815 menu.addAction(self.saveAllAct) |
5318 |
5319 |
5319 @return flag indicating focus in checks should be performed (boolean) |
5320 @return flag indicating focus in checks should be performed (boolean) |
5320 """ |
5321 """ |
5321 return self.editorsCheckFocusIn |
5322 return self.editorsCheckFocusIn |
5322 |
5323 |
5323 def __findFileName(self): |
5324 def __findLocation(self): |
5324 """ |
5325 """ |
5325 Private method to handle the search for file action. |
5326 Private method to handle the Find File action. |
5326 """ |
5327 """ |
5327 self.ui.showFindFileByNameDialog() |
5328 self.ui.showFindLocationWidget() |
5328 |
5329 |
5329 def appFocusChanged(self, old, now): |
5330 def appFocusChanged(self, old, now): |
5330 """ |
5331 """ |
5331 Public method to handle the global change of focus. |
5332 Public method to handle the global change of focus. |
5332 |
5333 |