bug fixes

This commit is contained in:
ingvar1995 2016-07-13 17:16:15 +03:00
parent c865ae4df6
commit 01e6d45232
4 changed files with 4 additions and 4 deletions

View file

@ -57,7 +57,7 @@ class LoginScreen(CenteredWidget):
self.load_profile.raise_() self.load_profile.raise_()
self.new_name.raise_() self.new_name.raise_()
self.new_profile.raise_() self.new_profile.raise_()
self.toxygen.setGeometry(QtCore.QRect(160, 10, 90, 21)) self.toxygen.setGeometry(QtCore.QRect(160, 8, 90, 25))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("Impact") font.setFamily("Impact")
font.setPointSize(16) font.setPointSize(16)

View file

@ -263,7 +263,7 @@ class ProfileSettings(CenteredWidget):
buffer = QtCore.QBuffer(byte_array) buffer = QtCore.QBuffer(byte_array)
buffer.open(QtCore.QIODevice.WriteOnly) buffer.open(QtCore.QIODevice.WriteOnly)
bitmap.save(buffer, 'PNG') bitmap.save(buffer, 'PNG')
Profile.get_instance().set_avatar(str(byte_array.data())) Profile.get_instance().set_avatar(bytes(byte_array.data()))
def export_profile(self): def export_profile(self):
directory = QtGui.QFileDialog.getExistingDirectory(options=QtGui.QFileDialog.DontUseNativeDialog) + '/' directory = QtGui.QFileDialog.getExistingDirectory(options=QtGui.QFileDialog.DontUseNativeDialog) + '/'

View file

@ -397,7 +397,6 @@ class Profile(contact.Contact, Singleton):
plugin_support.PluginLoader.get_instance().command(text[8:]) plugin_support.PluginLoader.get_instance().command(text[8:])
self._screen.messageEdit.clear() self._screen.messageEdit.clear()
elif text and friend_num + 1: elif text and friend_num + 1:
text = ''.join(c if c <= '\u10FFFF' else '\u25AF' for c in text)
if text.startswith('/me '): if text.startswith('/me '):
message_type = TOX_MESSAGE_TYPE['ACTION'] message_type = TOX_MESSAGE_TYPE['ACTION']
text = text[4:] text = text[4:]
@ -939,6 +938,7 @@ class Profile(contact.Contact, Singleton):
:param data: raw data - png :param data: raw data - png
""" """
self.send_inline(data, 'toxygen_inline.png') self.send_inline(data, 'toxygen_inline.png')
self._messages.repaint()
def send_sticker(self, path): def send_sticker(self, path):
with open(path, 'rb') as fl: with open(path, 'rb') as fl:

File diff suppressed because one or more lines are too long