From bae87c8d724ac67ed0ef89f473b0eed281ba7ff8 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Tue, 12 Jul 2016 13:48:59 +0300 Subject: [PATCH] some fixes and image --- toxygen/callbacks.py | 2 +- toxygen/contact.py | 11 +++++++++++ toxygen/friend.py | 12 ------------ toxygen/images/group.png | Bin 0 -> 4142 bytes toxygen/mainscreen.py | 6 ++++++ toxygen/profile.py | 6 ++++-- toxygen/tox.py | 2 +- 7 files changed, 23 insertions(+), 16 deletions(-) create mode 100755 toxygen/images/group.png diff --git a/toxygen/callbacks.py b/toxygen/callbacks.py index d961ea2..3420161 100644 --- a/toxygen/callbacks.py +++ b/toxygen/callbacks.py @@ -298,7 +298,7 @@ def group_message(window, tray): def wrapped(tox, group_number, peer_id, message_type, message, length, user_data): profile = Profile.get_instance() settings = Settings.get_instance() - message = str(message, 'utf-8') + message = str(message[:length], 'utf-8') invoke_in_main_thread(profile.new_message, group_number, message_type, message, True) if not window.isActiveWindow(): bl = settings['notify_all_gc'] or profile.name in message diff --git a/toxygen/contact.py b/toxygen/contact.py index ac41dbe..5d78c63 100644 --- a/toxygen/contact.py +++ b/toxygen/contact.py @@ -150,3 +150,14 @@ class Contact(basecontact.BaseContact): messages = property(get_messages) + # ----------------------------------------------------------------------------------------------------------------- + # Number (can be used in toxcore) + # ----------------------------------------------------------------------------------------------------------------- + + def get_number(self): + return self._number + + def set_number(self, value): + self._number = value + + number = property(get_number, set_number) diff --git a/toxygen/friend.py b/toxygen/friend.py index 7347671..0045dcc 100644 --- a/toxygen/friend.py +++ b/toxygen/friend.py @@ -175,15 +175,3 @@ class Friend(contact.Contact): def set_alias(self, alias): self._alias = bool(alias) - - # ----------------------------------------------------------------------------------------------------------------- - # Friend's number (can be used in toxcore) - # ----------------------------------------------------------------------------------------------------------------- - - def get_number(self): - return self._number - - def set_number(self, value): - self._number = value - - number = property(get_number, set_number) diff --git a/toxygen/images/group.png b/toxygen/images/group.png new file mode 100755 index 0000000000000000000000000000000000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