Skip to content

Commit

Permalink
Merge pull request #6141 from csabella/issue4111
Browse files Browse the repository at this point in the history
PR: Add shortcut to Find in Files in Search menu
  • Loading branch information
ccordoba12 authored Jan 7, 2018
2 parents ca27d3d + 4b80079 commit 2f81720
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions spyder/plugins/findinfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

# Third party imports
from qtpy.QtWidgets import QApplication
from qtpy.QtCore import Signal, Slot
from qtpy.QtCore import Signal, Slot, Qt
from qtpy.QtGui import QKeySequence

# Local imports
from spyder.config.base import _
Expand Down Expand Up @@ -140,11 +141,14 @@ def register_plugin(self):
self.main.projects.sig_project_closed.connect(self.unset_project_path)
self.main.editor.open_file_update.connect(self.set_current_opened_file)

findinfiles_action = create_action(self, _("&Find in files"),
findinfiles_action = create_action(
self, _("&Find in files"),
icon=ima.icon('findf'),
triggered=self.findinfiles_callback,
tip=_("Search text in multiple files"))

triggered=self.switch_to_plugin,
shortcut=QKeySequence(self.shortcut),
context=Qt.WidgetShortcut,
tip=_("Search text in multiple files"))

self.main.search_menu_actions += [MENU_SEPARATOR, findinfiles_action]
self.main.search_toolbar_actions += [MENU_SEPARATOR,
findinfiles_action]
Expand Down

0 comments on commit 2f81720

Please sign in to comment.