bug fixes

This commit is contained in:
ingvar1995 2016-07-02 18:01:11 +03:00
parent 6703cbd301
commit 9b0c6e63ce
4 changed files with 22 additions and 11 deletions

View file

@ -4,8 +4,8 @@ import contact
class Groupchat(contact.Contact):
def __init__(self, group_id, *args):
super().__init__(args)
super().__init__(*args)
self._id = group_id
def load_avatar(self):
super().load_avatar('group.png')
def load_avatar(self, default_path='group.png'):
super().load_avatar(default_path)

View file

@ -1,11 +1,10 @@
import os
from settings import *
try:
from PySide import QtCore, QtGui
except ImportError:
from PyQt4 import QtCore, QtGui
from toxcore_enums_and_consts import TOX_PUBLIC_KEY_SIZE
import basecontact
from messages import *
from history import *
class Contact(basecontact.BaseContact):

View file

@ -39,6 +39,18 @@ class TextMessage(Message):
return self._message, self._owner, self._time, self._type
class GroupChatTextMessage(TextMessage):
def __init__(self, friend_name, *args):
super().__init__(*args)
self._name = friend_name
def get_data(self):
data = list(super().get_data())
data.append(self._name)
return tuple(data)
class TransferMessage(Message):
"""
Message with info about file transfer

View file

@ -27,7 +27,7 @@ class Profile(basecontact.BaseContact, Singleton):
:param tox: tox instance
:param screen: ref to main screen
"""
contact.Contact.__init__(self,
basecontact.BaseContact.__init__(self,
tox.self_get_name(),
tox.self_get_status_message(),
screen.user_info,