Wed, 20 Oct 2021 19:44:20 +0200
Adapted the eric web browser search widget to latest Qt development and harmonized some display strings.
eric7/WebBrowser/SearchWidget.py | file | annotate | diff | comparison | revisions | |
eric7/WebBrowser/WebBrowserView.py | file | annotate | diff | comparison | revisions |
--- a/eric7/WebBrowser/SearchWidget.py Tue Oct 19 19:57:26 2021 +0200 +++ b/eric7/WebBrowser/SearchWidget.py Wed Oct 20 19:44:20 2021 +0200 @@ -89,14 +89,14 @@ self.__findBackwards, self.__findNextPrevCallback) - def __findNextPrevCallback(self, found): + def __findNextPrevCallback(self, result): """ Private method to process the result of the last search. - @param found flag indicating if the last search succeeded - @type bool + @param result reference to the search result + @type QWebEngineFindTextResult """ - if not found: + if result.numberOfMatches() == 0: self.infoLabel.setText(self.tr("Expression was not found.")) self.__setFindtextComboBackground(True)
--- a/eric7/WebBrowser/WebBrowserView.py Tue Oct 19 19:57:26 2021 +0200 +++ b/eric7/WebBrowser/WebBrowserView.py Wed Oct 20 19:44:20 2021 +0200 @@ -670,13 +670,13 @@ menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("editCopy"), - self.tr("Copy Link to Clipboard")) + self.tr("Copy URL to Clipboard")) act.setData(hitTest.linkUrl()) act.triggered.connect( functools.partial(self.__copyLink, act)) act = menu.addAction( UI.PixmapCache.getIcon("mailSend"), - self.tr("Send Link")) + self.tr("Send URL")) act.setData(hitTest.linkUrl()) act.triggered.connect( functools.partial(self.__sendLink, act)) @@ -717,13 +717,13 @@ self.tr("Copy Image to Clipboard"), self.__copyImage) act = menu.addAction( UI.PixmapCache.getIcon("editCopy"), - self.tr("Copy Image Location to Clipboard")) + self.tr("Copy Image URL to Clipboard")) act.setData(hitTest.imageUrl()) act.triggered.connect( functools.partial(self.__copyLink, act)) act = menu.addAction( UI.PixmapCache.getIcon("mailSend"), - self.tr("Send Image Link")) + self.tr("Send Image URL")) act.setData(hitTest.imageUrl()) act.triggered.connect( functools.partial(self.__sendLink, act)) @@ -800,13 +800,13 @@ menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("editCopy"), - self.tr("Copy Media Address to Clipboard")) + self.tr("Copy Media URL to Clipboard")) act.setData(hitTest.mediaUrl()) act.triggered.connect( functools.partial(self.__copyLink, act)) act = menu.addAction( UI.PixmapCache.getIcon("mailSend"), - self.tr("Send Media Address")) + self.tr("Send Media URL")) act.setData(hitTest.mediaUrl()) act.triggered.connect( functools.partial(self.__sendLink, act)) @@ -930,13 +930,13 @@ self.tr("Bookmark this Page"), self.addBookmark) act = menu.addAction( UI.PixmapCache.getIcon("editCopy"), - self.tr("Copy Page Link")) + self.tr("Copy Page URL to Clipboard")) act.setData(self.url()) act.triggered.connect( functools.partial(self.__copyLink, act)) act = menu.addAction( UI.PixmapCache.getIcon("mailSend"), - self.tr("Send Page Link")) + self.tr("Send Page URL")) act.setData(self.url()) act.triggered.connect( functools.partial(self.__sendLink, act))