From 1795dca57b3f6c521ff455f40b5ddd848cbe752f Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Wed, 27 Apr 2016 19:13:04 +0300 Subject: [PATCH] avatars fix --- src/profile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/profile.py b/src/profile.py index 51c5561..4dd0eb7 100644 --- a/src/profile.py +++ b/src/profile.py @@ -428,14 +428,14 @@ class Profile(Contact, Singleton): self._screen.account_name.setText(friend.name) self._screen.account_status.setText(friend.status_message) - avatar_path = (Settings.get_default_path() + 'avatars/{}.png').format(friend.tox_id[:TOX_PUBLIC_KEY_SIZE * 2]) + avatar_path = (ProfileHelper.get_path() + 'avatars/{}.png').format(friend.tox_id[:TOX_PUBLIC_KEY_SIZE * 2]) if not os.path.isfile(avatar_path): # load default image avatar_path = curr_directory() + '/images/avatar.png' pixmap = QtGui.QPixmap(QtCore.QSize(64, 64)) pixmap.load(avatar_path) self._screen.account_avatar.setScaledContents(False) self._screen.account_avatar.setPixmap(pixmap.scaled(64, 64, QtCore.Qt.KeepAspectRatio)) - self._screen.account_avatar.repaint() + self._screen.account_avatar.repaint() # comment? except: # no friend found. ignore log('Incorrect friend value: ' + str(value)) raise