src/eric7/WebBrowser/UrlBar/UrlBar.py

branch
eric7
changeset 10482
72d9b5ea39b4
parent 10439
21c28b0f9e41
child 10487
fb7b78071ee8
equal deleted inserted replaced
10481:9aea3575bd16 10482:72d9b5ea39b4
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 139 from eric7.WebBrowser.Bookmarks.BookmarkNode import BookmarkTimestampType
140 140
141 manager = self.__mw.bookmarksManager() 141 manager = self.__mw.bookmarksManager()
142 if manager.bookmarkForUrl(self.__browser.url()) is not None: 142 if manager.bookmarkForUrl(self.__browser.url()) is not None:
143 self.__bookmarkAction.setIcon(self.__bmActiveIcon) 143 self.__bookmarkAction.setIcon(self.__bmActiveIcon)
144 bookmarks = manager.bookmarksForUrl(self.__browser.url()) 144 bookmarks = manager.bookmarksForUrl(self.__browser.url())
145 for bookmark in bookmarks: 145 for bookmark in bookmarks:
146 manager.setTimestamp( 146 manager.setTimestamp(
147 bookmark, BookmarkNode.TsVisited, QDateTime.currentDateTime() 147 bookmark, BookmarkTimestampType.Visited, QDateTime.currentDateTime()
148 ) 148 )
149 elif self.__mw.speedDial().pageForUrl(self.__browser.url()).url != "": 149 elif self.__mw.speedDial().pageForUrl(self.__browser.url()).url != "":
150 self.__bookmarkAction.setIcon(self.__bmActiveIcon) 150 self.__bookmarkAction.setIcon(self.__bmActiveIcon)
151 else: 151 else:
152 self.__bookmarkAction.setIcon(self.__bmInactiveIcon) 152 self.__bookmarkAction.setIcon(self.__bmInactiveIcon)

eric ide

mercurial