Esempio n. 1
0
 def __init__(self, instance):
     super(MessageNotifyObject, self).__init__()
     friend = getFriend(instance)        
     self._instance = instance
     self.title = getDisplayName(instance)
     self.image = avatarManager.get_avatar(friend.jid)    
     self.total = 1
     self.type_ = NOTIFY_TYPE_MESSAGE
     self.jid = friend.jid
Esempio n. 2
0
 def __init__(self, instance):
     super(MessageNotifyObject, self).__init__()
     friend = getFriend(instance)
     self._instance = instance
     self.title = getDisplayName(instance)
     self.image = avatarManager.get_avatar(friend.jid)
     self.total = 1
     self.type_ = NOTIFY_TYPE_MESSAGE
     self.jid = friend.jid
Esempio n. 3
0
    def __init__(self, instance, parent=None):
        super(FriendWrapper, self).__init__(parent)

        self.jid = instance.jid
        self.nickname = instance.nickname
        self.remark = instance.remark
        try:
            self.groupName = instance.group.name
        except:
            self.groupName = ""

        self.avatar = avatarManager.get_avatar(self.jid)
        self.displayName = controlUtils.getDisplayName(instance)

        cacheSignals.avatar_saved.connect(self._onAvatarSaved)
        dbSignals.post_save.connect(self._onFriendPostSave, sender=Friend)
        xmppSignals.roster_changed_status.connect(self._onRosterChangedStatus)
Esempio n. 4
0
    def __init__(self, instance, parent=None):
        super(FriendWrapper, self).__init__(parent)

        self.jid = instance.jid
        self.nickname = instance.nickname
        self.remark = instance.remark
        try:
            self.groupName = instance.group.name
        except:
            self.groupName = ""

        self.avatar = avatarManager.get_avatar(self.jid)
        self.displayName = controlUtils.getDisplayName(instance)

        cacheSignals.avatar_saved.connect(self._onAvatarSaved)
        dbSignals.post_save.connect(self._onFriendPostSave, sender=Friend)
        xmppSignals.roster_changed_status.connect(self._onRosterChangedStatus)
Esempio n. 5
0
 def updateAvatar(self):
     self.avatar = avatarManager.get_avatar(self.jid)
Esempio n. 6
0
 def updateAvatar(self):
     self.avatar = avatarManager.get_avatar(self.jid)