134 @pyqtSlot() |
134 @pyqtSlot() |
135 def __checkBookmark(self): |
135 def __checkBookmark(self): |
136 """ |
136 """ |
137 Private slot to check the current URL for the bookmarked state. |
137 Private slot to check the current URL for the bookmarked state. |
138 """ |
138 """ |
|
139 from eric7.WebBrowser.Bookmarks.BookmarkNode import BookmarkNode |
|
140 |
139 manager = self.__mw.bookmarksManager() |
141 manager = self.__mw.bookmarksManager() |
140 if manager.bookmarkForUrl(self.__browser.url()) is not None: |
142 if manager.bookmarkForUrl(self.__browser.url()) is not None: |
141 self.__bookmarkAction.setIcon(self.__bmActiveIcon) |
143 self.__bookmarkAction.setIcon(self.__bmActiveIcon) |
142 bookmarks = manager.bookmarksForUrl(self.__browser.url()) |
144 bookmarks = manager.bookmarksForUrl(self.__browser.url()) |
143 from eric7.WebBrowser.Bookmarks.BookmarkNode import BookmarkNode |
|
144 |
|
145 for bookmark in bookmarks: |
145 for bookmark in bookmarks: |
146 manager.setTimestamp( |
146 manager.setTimestamp( |
147 bookmark, BookmarkNode.TsVisited, QDateTime.currentDateTime() |
147 bookmark, BookmarkNode.TsVisited, QDateTime.currentDateTime() |
148 ) |
148 ) |
149 elif self.__mw.speedDial().pageForUrl(self.__browser.url()).url != "": |
149 elif self.__mw.speedDial().pageForUrl(self.__browser.url()).url != "": |
249 def __showBookmarkInfo(self): |
249 def __showBookmarkInfo(self): |
250 """ |
250 """ |
251 Private slot to show a dialog with some bookmark info. |
251 Private slot to show a dialog with some bookmark info. |
252 """ |
252 """ |
253 from .BookmarkActionSelectionDialog import BookmarkActionSelectionDialog |
253 from .BookmarkActionSelectionDialog import BookmarkActionSelectionDialog |
|
254 from .BookmarkInfoDialog import BookmarkInfoDialog |
254 |
255 |
255 url = self.__browser.url() |
256 url = self.__browser.url() |
256 dlg = BookmarkActionSelectionDialog(url) |
257 dlg = BookmarkActionSelectionDialog(url) |
257 if dlg.exec() == QDialog.DialogCode.Accepted: |
258 if dlg.exec() == QDialog.DialogCode.Accepted: |
258 action = dlg.getAction() |
259 action = dlg.getAction() |
259 if action == BookmarkActionSelectionDialog.AddBookmark: |
260 if action == BookmarkActionSelectionDialog.AddBookmark: |
260 self.__browser.addBookmark() |
261 self.__browser.addBookmark() |
261 elif action == BookmarkActionSelectionDialog.EditBookmark: |
262 elif action == BookmarkActionSelectionDialog.EditBookmark: |
262 bookmark = self.__mw.bookmarksManager().bookmarkForUrl(url) |
263 bookmark = self.__mw.bookmarksManager().bookmarkForUrl(url) |
263 from .BookmarkInfoDialog import BookmarkInfoDialog |
|
264 |
|
265 dlg = BookmarkInfoDialog(bookmark, self.__browser) |
264 dlg = BookmarkInfoDialog(bookmark, self.__browser) |
266 dlg.exec() |
265 dlg.exec() |
267 elif action == BookmarkActionSelectionDialog.AddSpeeddial: |
266 elif action == BookmarkActionSelectionDialog.AddSpeeddial: |
268 self.__mw.speedDial().addPage(url, self.__browser.title()) |
267 self.__mw.speedDial().addPage(url, self.__browser.title()) |
269 elif action == BookmarkActionSelectionDialog.RemoveSpeeddial: |
268 elif action == BookmarkActionSelectionDialog.RemoveSpeeddial: |
419 Private slot to show the threat info widget. |
418 Private slot to show the threat info widget. |
420 |
419 |
421 @param pos position to show the info at |
420 @param pos position to show the info at |
422 @type QPoint |
421 @type QPoint |
423 """ |
422 """ |
|
423 from eric7.WebBrowser.SafeBrowsing.SafeBrowsingInfoWidget import ( |
|
424 SafeBrowsingInfoWidget, |
|
425 ) |
|
426 |
424 threatInfo = self.__safeBrowsingLabel.getThreatInfo() |
427 threatInfo = self.__safeBrowsingLabel.getThreatInfo() |
425 if threatInfo: |
428 if threatInfo: |
426 from eric7.WebBrowser.SafeBrowsing.SafeBrowsingInfoWidget import ( |
|
427 SafeBrowsingInfoWidget, |
|
428 ) |
|
429 |
|
430 widget = SafeBrowsingInfoWidget(threatInfo, self.__browser) |
429 widget = SafeBrowsingInfoWidget(threatInfo, self.__browser) |
431 widget.showAt(pos) |
430 widget.showAt(pos) |
432 |
431 |
433 @pyqtSlot() |
432 @pyqtSlot() |
434 def __sslConfigurationChanged(self): |
433 def __sslConfigurationChanged(self): |