We may not add ourself to roster. Make entry in occupants menu insensitive.

This commit is contained in:
Stephan Erb 2008-01-28 21:22:38 +00:00
parent 7e2b371861
commit 67b9f1cdae
1 changed files with 2 additions and 1 deletions

View File

@ -2000,7 +2000,8 @@ class GroupchatControl(ChatControlBase):
self.handlers[id] = item
item = xml.get_widget('add_to_roster_menuitem')
if not jid:
our_jid = gajim.get_jid_from_account(self.account)
if not jid or jid == our_jid:
item.set_sensitive(False)
else:
id = item.connect('activate', self.on_add_to_roster, jid)