--- a/src/eric7/QScintilla/SearchReplaceWidget.py Fri May 19 13:54:29 2023 +0200 +++ b/src/eric7/QScintilla/SearchReplaceWidget.py Fri May 19 14:25:31 2023 +0200 @@ -10,6 +10,7 @@ import contextlib from PyQt6.QtCore import QEvent, Qt, pyqtSignal, pyqtSlot +from PyQt6.QtGui import QKeySequence from PyQt6.QtWidgets import ( QFrame, QHBoxLayout, @@ -254,6 +255,47 @@ self.__viewmanager.replaceAllAct.shortcuts() ) + # Set the tooltips of the associated buttons to include the action + # shortcuts. + self.findNextButton.setToolTip( + self.tr("Press to find the next occurrence ({0})").format( + self.findNextAct.shortcut().toString( + QKeySequence.SequenceFormat.NativeText + ) + ) + ) + self.findPrevButton.setToolTip( + self.tr("Press to find the previous occurrence ({0})").format( + self.findPrevAct.shortcut().toString( + QKeySequence.SequenceFormat.NativeText + ) + ) + ) + self.replaceSearchButton.setToolTip( + self.tr( + "Press to replace the selection and search for the next occurence" + " ({0})" + ).format( + self.replaceAndSearchAct.shortcut().toString( + QKeySequence.SequenceFormat.NativeText + ) + ) + ) + self.replaceButton.setToolTip( + self.tr("Press to replace the selection ({0})").format( + self.replaceSelectionAct.shortcut().toString( + QKeySequence.SequenceFormat.NativeText + ) + ) + ) + self.replaceAllButton.setToolTip( + self.tr("Press to replace all occurrences ({0})").format( + self.replaceAllAct.shortcut().toString( + QKeySequence.SequenceFormat.NativeText + ) + ) + ) + def __setFindNextEnabled(self, enable): """ Private method to set the enabled state of "Find Next".