Skip to content
Snippets Groups Projects
Commit bf39254a authored by nkour's avatar nkour
Browse files

donot allow double bookmark

parent 1b55865f
No related branches found
No related tags found
No related merge requests found
......@@ -301,6 +301,14 @@ def on_add_bookmark_menuitem_activate(self, widget):
'nick':self.nicks[self.get_active_jid()]
}
for bookmark in gajim.connections[self.account].bookmarks:
if bookmark['jid'] == bm['jid']:
dialogs.Error_dialog(
_('Bookmark already set.'),
_('The bookmark is already in your roster.')).get_response()
return
gajim.connections[self.account].bookmarks.append(bm)
gajim.connections[self.account].store_bookmarks()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment