951 self.__findFileWidget = FindFileWidget(self.project, self) |
951 self.__findFileWidget = FindFileWidget(self.project, self) |
952 self.__findFileWidget.sourceFile.connect( |
952 self.__findFileWidget.sourceFile.connect( |
953 self.viewmanager.openSourceFile) |
953 self.viewmanager.openSourceFile) |
954 self.__findFileWidget.designerFile.connect(self.__designer) |
954 self.__findFileWidget.designerFile.connect(self.__designer) |
955 |
955 |
|
956 # Create the find location (file) widget |
|
957 from .FindLocationWidget import FindLocationWidget |
|
958 self.__findLocationWidget = FindLocationWidget(self.project, self) |
|
959 self.__findLocationWidget.sourceFile.connect( |
|
960 self.viewmanager.openSourceFile) |
|
961 self.__findLocationWidget.designerFile.connect(self.__designer) |
|
962 |
956 # Create the VCS Status widget |
963 # Create the VCS Status widget |
957 from VCS.StatusWidget import StatusWidget |
964 from VCS.StatusWidget import StatusWidget |
958 self.__vcsStatusWidget = StatusWidget( |
965 self.__vcsStatusWidget = StatusWidget( |
959 self.project, self.viewmanager, self) |
966 self.project, self.viewmanager, self) |
960 |
967 |
1083 |
1090 |
1084 self.rToolbox.addItem(self.__findFileWidget, |
1091 self.rToolbox.addItem(self.__findFileWidget, |
1085 UI.PixmapCache.getIcon("find"), |
1092 UI.PixmapCache.getIcon("find"), |
1086 self.tr("Find/Replace In Files")) |
1093 self.tr("Find/Replace In Files")) |
1087 |
1094 |
|
1095 self.rToolbox.addItem(self.__findLocationWidget, |
|
1096 UI.PixmapCache.getIcon("findLocation"), |
|
1097 self.tr("Find File")) |
|
1098 |
1088 self.rToolbox.addItem(self.pluginRepositoryViewer, |
1099 self.rToolbox.addItem(self.pluginRepositoryViewer, |
1089 UI.PixmapCache.getIcon("pluginRepository"), |
1100 UI.PixmapCache.getIcon("pluginRepository"), |
1090 self.tr("Plugin Repository")) |
1101 self.tr("Plugin Repository")) |
1091 |
1102 |
1092 self.rToolbox.addItem(self.__virtualenvManagerWidget, |
1103 self.rToolbox.addItem(self.__virtualenvManagerWidget, |
1234 |
1245 |
1235 self.rightSidebar.addTab( |
1246 self.rightSidebar.addTab( |
1236 self.__findFileWidget, |
1247 self.__findFileWidget, |
1237 UI.PixmapCache.getIcon("sbFind96"), |
1248 UI.PixmapCache.getIcon("sbFind96"), |
1238 self.tr("Find/Replace In Files")) |
1249 self.tr("Find/Replace In Files")) |
|
1250 |
|
1251 self.rightSidebar.addTab( |
|
1252 self.__findLocationWidget, |
|
1253 UI.PixmapCache.getIcon("sbFindLocation96"), |
|
1254 self.tr("Find File")) |
1239 |
1255 |
1240 self.rightSidebar.addTab( |
1256 self.rightSidebar.addTab( |
1241 self.pluginRepositoryViewer, |
1257 self.pluginRepositoryViewer, |
1242 UI.PixmapCache.getIcon("sbPluginRepository96"), |
1258 UI.PixmapCache.getIcon("sbPluginRepository96"), |
1243 self.tr("Plugin Repository")) |
1259 self.tr("Plugin Repository")) |
2258 self.findFileActivateAct.triggered.connect( |
2274 self.findFileActivateAct.triggered.connect( |
2259 self.__activateFindFileWidget) |
2275 self.__activateFindFileWidget) |
2260 self.actions.append(self.findFileActivateAct) |
2276 self.actions.append(self.findFileActivateAct) |
2261 self.addAction(self.findFileActivateAct) |
2277 self.addAction(self.findFileActivateAct) |
2262 |
2278 |
|
2279 self.findLocationActivateAct = EricAction( |
|
2280 self.tr("Find File"), |
|
2281 self.tr("Find File"), |
|
2282 QKeySequence(self.tr("Ctrl+Alt+Shift+L")), |
|
2283 0, self, |
|
2284 'find_location_activate') |
|
2285 self.findLocationActivateAct.setStatusTip(self.tr( |
|
2286 "Switch the input focus to the Find File window.")) |
|
2287 self.findLocationActivateAct.setWhatsThis(self.tr( |
|
2288 """<b>Find File</b>""" |
|
2289 """<p>This switches the input focus to the Find File window.""" |
|
2290 """</p>""" |
|
2291 )) |
|
2292 self.findLocationActivateAct.triggered.connect( |
|
2293 self.__activateFindLocationWidget) |
|
2294 self.actions.append(self.findLocationActivateAct) |
|
2295 self.addAction(self.findLocationActivateAct) |
|
2296 |
2263 self.vcsStatusListActivateAct = EricAction( |
2297 self.vcsStatusListActivateAct = EricAction( |
2264 self.tr("VCS Status List"), |
2298 self.tr("VCS Status List"), |
2265 self.tr("VCS Status List"), |
2299 self.tr("VCS Status List"), |
2266 QKeySequence(self.tr("Alt+Shift+V")), |
2300 QKeySequence(self.tr("Alt+Shift+V")), |
2267 0, self, |
2301 0, self, |
3378 if self.codeDocumentationViewer is not None: |
3412 if self.codeDocumentationViewer is not None: |
3379 self.__menus["subwindow"].addAction( |
3413 self.__menus["subwindow"].addAction( |
3380 self.codeDocumentationViewerActivateAct) |
3414 self.codeDocumentationViewerActivateAct) |
3381 self.__menus["subwindow"].addAction(self.debugViewerActivateAct) |
3415 self.__menus["subwindow"].addAction(self.debugViewerActivateAct) |
3382 self.__menus["subwindow"].addAction(self.findFileActivateAct) |
3416 self.__menus["subwindow"].addAction(self.findFileActivateAct) |
|
3417 self.__menus["subwindow"].addAction(self.findLocationActivateAct) |
3383 self.__menus["subwindow"].addAction( |
3418 self.__menus["subwindow"].addAction( |
3384 self.pluginRepositoryViewerActivateAct) |
3419 self.pluginRepositoryViewerActivateAct) |
3385 self.__menus["subwindow"].addAction(self.virtualenvManagerActivateAct) |
3420 self.__menus["subwindow"].addAction(self.virtualenvManagerActivateAct) |
3386 if self.pipWidget is not None: |
3421 if self.pipWidget is not None: |
3387 self.__menus["subwindow"].addAction(self.pipWidgetActivateAct) |
3422 self.__menus["subwindow"].addAction(self.pipWidgetActivateAct) |
6911 self.rightSidebar.setCurrentWidget(self.__findFileWidget) |
6946 self.rightSidebar.setCurrentWidget(self.__findFileWidget) |
6912 self.__findFileWidget.setFocus( |
6947 self.__findFileWidget.setFocus( |
6913 Qt.FocusReason.ActiveWindowFocusReason) |
6948 Qt.FocusReason.ActiveWindowFocusReason) |
6914 |
6949 |
6915 self.__findFileWidget.activate() |
6950 self.__findFileWidget.activate() |
|
6951 |
|
6952 def showFindLocationWidget(self): |
|
6953 """ |
|
6954 Public method to show the Find File widget. |
|
6955 """ |
|
6956 self.__activateFindLocationWidget() |
|
6957 |
|
6958 def __activateFindLocationWidget(self): |
|
6959 """ |
|
6960 Private method to activate the Find File widget. |
|
6961 """ |
|
6962 if self.__layoutType == "Toolboxes": |
|
6963 self.rToolboxDock.show() |
|
6964 self.rToolbox.setCurrentWidget(self.__findLocationWidget) |
|
6965 elif self.__layoutType == "Sidebars": |
|
6966 self.rightSidebar.show() |
|
6967 self.rightSidebar.setCurrentWidget(self.__findLocationWidget) |
|
6968 self.__findLocationWidget.setFocus( |
|
6969 Qt.FocusReason.ActiveWindowFocusReason) |
|
6970 |
|
6971 self.__findLocationWidget.activate() |
6916 |
6972 |
6917 def __activateVcsStatusList(self): |
6973 def __activateVcsStatusList(self): |
6918 """ |
6974 """ |
6919 Private slot to activate the VCS Status List. |
6975 Private slot to activate the VCS Status List. |
6920 """ |
6976 """ |