From bf39254aeda8822f2e5091829da32e700c40775b Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Tue, 7 Jun 2005 22:02:51 +0000 Subject: [PATCH] donot allow double bookmark --- src/groupchat_window.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/groupchat_window.py b/src/groupchat_window.py index 7a0dce60f..69da38e14 100644 --- a/src/groupchat_window.py +++ b/src/groupchat_window.py @@ -301,6 +301,14 @@ class Groupchat_window(chat.Chat): '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()