WebBrowser/Bookmarks/BookmarksManager.py

changeset 5015
ca1d44f0f6b2
parent 4913
e16573640cb8
child 5039
200f12184a43
equal deleted inserted replaced
5014:337f4a8fe6bb 5015:ca1d44f0f6b2
302 node.modified = timestamp 302 node.modified = timestamp
303 elif timestampType == BookmarkNode.TsVisited: 303 elif timestampType == BookmarkNode.TsVisited:
304 node.visited = timestamp 304 node.visited = timestamp
305 self.__saveTimer.changeOccurred() 305 self.__saveTimer.changeOccurred()
306 306
307 def incVisitCount(self, node):
308 """
309 Public method to increment the visit count of a bookmark.
310
311 @param node reference to the node to be changed (BookmarkNode)
312 """
313 if not self.__loaded:
314 return
315
316 if node:
317 node.visitCount += 1
318 self.__saveTimer.changeOccurred()
319
320 def setVisitCount(self, node, count):
321 """
322 Public method to set the visit count of a bookmark.
323
324 @param node reference to the node to be changed (BookmarkNode)
325 @param count visit count to be set (int or str)
326 """
327 try:
328 node.visitCount = int(count)
329 self.__saveTimer.changeOccurred()
330 except ValueError:
331 # ignore invalid values
332 pass
333
307 def bookmarks(self): 334 def bookmarks(self):
308 """ 335 """
309 Public method to get a reference to the root bookmark node. 336 Public method to get a reference to the root bookmark node.
310 337
311 @return reference to the root bookmark node (BookmarkNode) 338 @return reference to the root bookmark node (BookmarkNode)

eric ide

mercurial