--- a/WebBrowser/Bookmarks/BookmarksManager.py Sun Jul 03 15:51:26 2016 +0200 +++ b/WebBrowser/Bookmarks/BookmarksManager.py Sun Jul 03 16:34:45 2016 +0200 @@ -304,6 +304,33 @@ node.visited = timestamp self.__saveTimer.changeOccurred() + def incVisitCount(self, node): + """ + Public method to increment the visit count of a bookmark. + + @param node reference to the node to be changed (BookmarkNode) + """ + if not self.__loaded: + return + + if node: + node.visitCount += 1 + self.__saveTimer.changeOccurred() + + def setVisitCount(self, node, count): + """ + Public method to set the visit count of a bookmark. + + @param node reference to the node to be changed (BookmarkNode) + @param count visit count to be set (int or str) + """ + try: + node.visitCount = int(count) + self.__saveTimer.changeOccurred() + except ValueError: + # ignore invalid values + pass + def bookmarks(self): """ Public method to get a reference to the root bookmark node.