bug fixes
This commit is contained in:
parent
6703cbd301
commit
9b0c6e63ce
@ -4,8 +4,8 @@ import contact
|
|||||||
class Groupchat(contact.Contact):
|
class Groupchat(contact.Contact):
|
||||||
|
|
||||||
def __init__(self, group_id, *args):
|
def __init__(self, group_id, *args):
|
||||||
super().__init__(args)
|
super().__init__(*args)
|
||||||
self._id = group_id
|
self._id = group_id
|
||||||
|
|
||||||
def load_avatar(self):
|
def load_avatar(self, default_path='group.png'):
|
||||||
super().load_avatar('group.png')
|
super().load_avatar(default_path)
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
import os
|
|
||||||
from settings import *
|
|
||||||
try:
|
try:
|
||||||
from PySide import QtCore, QtGui
|
from PySide import QtCore, QtGui
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
from toxcore_enums_and_consts import TOX_PUBLIC_KEY_SIZE
|
|
||||||
import basecontact
|
import basecontact
|
||||||
|
from messages import *
|
||||||
|
from history import *
|
||||||
|
|
||||||
|
|
||||||
class Contact(basecontact.BaseContact):
|
class Contact(basecontact.BaseContact):
|
||||||
|
@ -39,6 +39,18 @@ class TextMessage(Message):
|
|||||||
return self._message, self._owner, self._time, self._type
|
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):
|
class TransferMessage(Message):
|
||||||
"""
|
"""
|
||||||
Message with info about file transfer
|
Message with info about file transfer
|
||||||
|
@ -27,7 +27,7 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
:param tox: tox instance
|
:param tox: tox instance
|
||||||
:param screen: ref to main screen
|
:param screen: ref to main screen
|
||||||
"""
|
"""
|
||||||
contact.Contact.__init__(self,
|
basecontact.BaseContact.__init__(self,
|
||||||
tox.self_get_name(),
|
tox.self_get_name(),
|
||||||
tox.self_get_status_message(),
|
tox.self_get_status_message(),
|
||||||
screen.user_info,
|
screen.user_info,
|
||||||
|
Loading…
Reference in New Issue
Block a user