donot allow double bookmark

This commit is contained in:
Nikos Kouremenos 2005-06-07 22:02:51 +00:00
parent 1b55865fda
commit bf39254aed
1 changed files with 8 additions and 0 deletions

View File

@ -301,6 +301,14 @@ class Groupchat_window(chat.Chat):
'nick':self.nicks[self.get_active_jid()] '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].bookmarks.append(bm)
gajim.connections[self.account].store_bookmarks() gajim.connections[self.account].store_bookmarks()