we now have "add to roster" in context menu in gc if we have the jid of the contact

This commit is contained in:
Yann Leboulanger 2005-06-08 09:45:32 +00:00
parent c68f709c31
commit 8312d6ee0b
1 changed files with 7 additions and 3 deletions

View File

@ -485,6 +485,9 @@ class Groupchat_window(chat.Chat):
#FIXME: we need the resource but it's not saved #FIXME: we need the resource but it's not saved
#self.plugin.send('ASK_OS_INFO', self.account, jid, resource) #self.plugin.send('ASK_OS_INFO', self.account, jid, resource)
def on_add_to_roster(self, widget, jid):
dialogs.Add_new_contact_window(self.plugin, self.account, jid)
def on_send_pm(self, widget, model, iter): def on_send_pm(self, widget, model, iter):
room_jid = self.get_active_jid() room_jid = self.get_active_jid()
nick = model.get_value(iter, 1) nick = model.get_value(iter, 1)
@ -549,12 +552,13 @@ class Groupchat_window(chat.Chat):
sub_menu.append(item) sub_menu.append(item)
item.connect('activate', self.revoke_owner, room_jid, jid) item.connect('activate', self.revoke_owner, room_jid, jid)
item = gtk.MenuItem()
menu.append(item)
item = gtk.MenuItem(_('_Information')) item = gtk.MenuItem(_('_Information'))
menu.append(item) menu.append(item)
item.connect('activate', self.on_info, jid) item.connect('activate', self.on_info, jid)
item = gtk.MenuItem(_('_Add to roster'))
menu.append(item)
item.connect('activate', self.on_add_to_roster, jid)
item = gtk.MenuItem(_('Send _Private Message')) item = gtk.MenuItem(_('Send _Private Message'))
menu.append(item) menu.append(item)