Fixed to avoid having duplicate bookmarks.
This commit is contained in:
parent
d93732a6b3
commit
31eed6c9a6
@ -116,10 +116,13 @@ class BookmarkManager(QObject):
|
||||
message.error(win_id, "Can't set mark with empty URL!")
|
||||
return
|
||||
|
||||
self.bookmarks[urlstr] = title
|
||||
self.changed.emit()
|
||||
self.added.emit(title, urlstr)
|
||||
message.info(win_id, "Bookmarks added")
|
||||
if urlstr in self.bookmarks:
|
||||
message.error(win_id, "Bookmark already exists!")
|
||||
else:
|
||||
self.bookmarks[urlstr] = title
|
||||
self.changed.emit()
|
||||
self.added.emit(title, urlstr)
|
||||
message.info(win_id, "Bookmark added")
|
||||
|
||||
def bookmark_del(self, url):
|
||||
"""Delete a bookmark.
|
||||
|
Loading…
Reference in New Issue
Block a user