eric7/ViewManager/ViewManager.py

branch
eric7
changeset 8614
4a3a68e51b92
parent 8519
fd4722a8f782
child 8632
f25cd4b94eb0
diff -r 2af21036b293 -r 4a3a68e51b92 eric7/ViewManager/ViewManager.py
--- a/eric7/ViewManager/ViewManager.py	Fri Sep 17 19:53:54 2021 +0200
+++ b/eric7/ViewManager/ViewManager.py	Sat Sep 18 18:51:58 2021 +0200
@@ -2847,6 +2847,7 @@
         commands.
         """
         self.searchActGrp = createActionGroup(self)
+        self.searchOpenFilesActGrp = createActionGroup(self)
         
         self.searchAct = EricAction(
             QCoreApplication.translate('ViewManager', 'Search'),
@@ -3182,7 +3183,7 @@
             'ViewManager',
             """<b>Search in Files</b>"""
             """<p>Search for some text in the files of a directory tree"""
-            """ or the project. A dialog is shown to enter the searchtext"""
+            """ or the project. A window is shown to enter the searchtext"""
             """ and options for the search and to display the result.</p>"""
         ))
         self.searchFilesAct.triggered.connect(self.__searchFiles)
@@ -3201,7 +3202,7 @@
             'ViewManager',
             """<b>Replace in Files</b>"""
             """<p>Search for some text in the files of a directory tree"""
-            """ or the project and replace it. A dialog is shown to enter"""
+            """ or the project and replace it. A window is shown to enter"""
             """ the searchtext, the replacement text and options for the"""
             """ search and to display the result.</p>"""
         ))
@@ -3218,14 +3219,14 @@
                 'ViewManager',
                 "Meta+Ctrl+Alt+F", "Search|Search Open Files")),
             0,
-            self.searchActGrp, 'vm_search_in_open_files')
+            self.searchOpenFilesActGrp, 'vm_search_in_open_files')
         self.searchOpenFilesAct.setStatusTip(QCoreApplication.translate(
             'ViewManager', 'Search for a text in open files'))
         self.searchOpenFilesAct.setWhatsThis(QCoreApplication.translate(
             'ViewManager',
             """<b>Search in Open Files</b>"""
             """<p>Search for some text in the currently opened files."""
-            """ A dialog is shown to enter the searchtext"""
+            """ A window is shown to enter the search text"""
             """ and options for the search and to display the result.</p>"""
         ))
         self.searchOpenFilesAct.triggered.connect(self.__searchOpenFiles)
@@ -3240,19 +3241,21 @@
                 'ViewManager',
                 "Meta+Ctrl+Alt+R", "Search|Replace in Open Files")),
             0,
-            self.searchActGrp, 'vm_replace_in_open_files')
+            self.searchOpenFilesActGrp, 'vm_replace_in_open_files')
         self.replaceOpenFilesAct.setStatusTip(QCoreApplication.translate(
             'ViewManager', 'Search for a text in open files and replace it'))
         self.replaceOpenFilesAct.setWhatsThis(QCoreApplication.translate(
             'ViewManager',
             """<b>Replace in Open Files</b>"""
             """<p>Search for some text in the currently opened files"""
-            """ and replace it. A dialog is shown to enter"""
-            """ the searchtext, the replacement text and options for the"""
+            """ and replace it. A window is shown to enter"""
+            """ the search text, the replacement text and options for the"""
             """ search and to display the result.</p>"""
         ))
         self.replaceOpenFilesAct.triggered.connect(self.__replaceOpenFiles)
         self.searchActions.append(self.replaceOpenFilesAct)
+        
+        self.searchOpenFilesActGrp.setEnabled(False)
     
     def initSearchMenu(self):
         """
@@ -5678,25 +5681,25 @@
         """
         Private method to handle the search in files action.
         """
-        self.ui.showFindFilesDialog(self.textForFind())
+        self.ui.showFindFilesWidget(self.textForFind())
         
     def __replaceFiles(self):
         """
         Private method to handle the replace in files action.
         """
-        self.ui.showReplaceFilesDialog(self.textForFind())
+        self.ui.showReplaceFilesWidget(self.textForFind())
         
     def __searchOpenFiles(self):
         """
         Private method to handle the search in open files action.
         """
-        self.ui.showFindFilesDialog(self.textForFind(), openFiles=True)
+        self.ui.showFindFilesWidget(self.textForFind(), openFiles=True)
         
     def __replaceOpenFiles(self):
         """
         Private method to handle the replace in open files action.
         """
-        self.ui.showReplaceFilesDialog(self.textForFind(), openFiles=True)
+        self.ui.showReplaceFilesWidget(self.textForFind(), openFiles=True)
     
     ##################################################################
     ## Below are the action methods for the view menu
@@ -6340,6 +6343,7 @@
             self.printPreviewAct.setEnabled(False)
         self.editActGrp.setEnabled(False)
         self.searchActGrp.setEnabled(False)
+        self.searchOpenFilesActGrp.setEnabled(False)
         self.viewActGrp.setEnabled(False)
         self.viewFoldActGrp.setEnabled(False)
         self.unhighlightAct.setEnabled(False)
@@ -6386,6 +6390,7 @@
             self.printPreviewAct.setEnabled(True)
         self.editActGrp.setEnabled(True)
         self.searchActGrp.setEnabled(True)
+        self.searchOpenFilesActGrp.setEnabled(True)
         self.viewActGrp.setEnabled(True)
         self.viewFoldActGrp.setEnabled(True)
         self.unhighlightAct.setEnabled(True)

eric ide

mercurial