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!")
|
message.error(win_id, "Can't set mark with empty URL!")
|
||||||
return
|
return
|
||||||
|
|
||||||
self.bookmarks[urlstr] = title
|
if urlstr in self.bookmarks:
|
||||||
self.changed.emit()
|
message.error(win_id, "Bookmark already exists!")
|
||||||
self.added.emit(title, urlstr)
|
else:
|
||||||
message.info(win_id, "Bookmarks added")
|
self.bookmarks[urlstr] = title
|
||||||
|
self.changed.emit()
|
||||||
|
self.added.emit(title, urlstr)
|
||||||
|
message.info(win_id, "Bookmark added")
|
||||||
|
|
||||||
def bookmark_del(self, url):
|
def bookmark_del(self, url):
|
||||||
"""Delete a bookmark.
|
"""Delete a bookmark.
|
||||||
|
Loading…
Reference in New Issue
Block a user