bug fixes
This commit is contained in:
parent
6703cbd301
commit
9b0c6e63ce
@ -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)
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
@ -27,11 +27,11 @@ class Profile(basecontact.BaseContact, Singleton):
|
||||
:param tox: tox instance
|
||||
:param screen: ref to main screen
|
||||
"""
|
||||
contact.Contact.__init__(self,
|
||||
tox.self_get_name(),
|
||||
tox.self_get_status_message(),
|
||||
screen.user_info,
|
||||
tox.self_get_address())
|
||||
basecontact.BaseContact.__init__(self,
|
||||
tox.self_get_name(),
|
||||
tox.self_get_status_message(),
|
||||
screen.user_info,
|
||||
tox.self_get_address())
|
||||
Singleton.__init__(self)
|
||||
self._screen = screen
|
||||
self._messages = screen.messages
|
||||
|
Loading…
Reference in New Issue
Block a user