From 15e4a9642f24c273e0d1e02bff90d395a6433063 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 20 Dec 2005 22:26:27 +0000 Subject: [PATCH] we now create Contact and GC_Contact instances from Contacts class in dialog.py --- src/dialogs.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/dialogs.py b/src/dialogs.py index 84fe497d3..dc68f922c 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -43,7 +43,6 @@ except: from filetransfers_window import FileTransfersWindow from gajim_themes_window import GajimThemesWindow from advanced import AdvancedConfigurationWindow -from gajim import Contact from common import gajim from common import helpers from common import i18n @@ -941,14 +940,15 @@ class PopupNotificationWindow: if self.msg_type.find('file') != 0: if self.msg_type == 'pm': room_jid, nick = self.jid.split('/', 1) - show = gajim.gc_contacts[self.account][room_jid][nick].show - contact = Contact(jid = self.jid, name = nick, groups = ['none'], - show = show, sub = 'none') + gc_contact = gajim.contacts.get_gc_contact(self.account, + room_jid, nick) + contact = gajim.contacts.contact_from_gc_contact(gc_contact) else: - contact = Contact(jid = self.jid, name = self.jid.split('@')[0], + contact = gajim.contacts.create_contact(jid = self.jid, + name = self.jid.split('@')[0], groups = [_('not in the roster')], show = 'not in the roster', - status = _('not in the roster'), sub = 'none', keyID = keyID) - gajim.contacts[self.account][self.jid] = [contact] + status = '', sub = 'none', keyID = keyID) + gajim.contacts.add_contact(self.account, contact) gajim.interface.roster.add_contact_to_roster(contact.jid, self.account)