diff --git a/src/profile.py b/src/profile.py index 3631b6c..fadd653 100644 --- a/src/profile.py +++ b/src/profile.py @@ -201,7 +201,7 @@ class Friend(Contact): """ if hasattr(self, '_message_getter'): del self._message_getter - self._corr = filter(lambda x: x.get_type() == 2, self._corr) + self._corr = filter(lambda x: x.get_type() == 2 and x.get_status() in (2, 4), self._corr) self._unsaved_messages = 0 def update_transfer_data(self, file_number, status, inline=None): @@ -388,7 +388,7 @@ class Profile(Contact, Singleton): if value is not None: self._active_friend = value friend = self._friends[value] - self._friends[self._active_friend].set_messages(False) + self._friends[value].set_messages(False) self._screen.messageEdit.clear() self._messages.clear() friend.load_corr() @@ -587,7 +587,6 @@ class Profile(Contact, Singleton): else: self._messages.insertItem(0, elem) self._messages.setItemWidget(elem, item) - self._messages.repaint() def create_file_transfer_item(self, tm, append=True): data = list(tm.get_data()) @@ -600,7 +599,6 @@ class Profile(Contact, Singleton): else: self._messages.insertItem(0, elem) self._messages.setItemWidget(elem, item) - self._messages.repaint() return item def create_inline_item(self, data, append=True): @@ -612,7 +610,6 @@ class Profile(Contact, Singleton): else: self._messages.insertItem(0, elem) self._messages.setItemWidget(elem, item) - self._messages.repaint() # ----------------------------------------------------------------------------------------------------------------- # Work with friends (remove, set alias, get public key) @@ -621,8 +618,17 @@ class Profile(Contact, Singleton): def set_alias(self, num): friend = self._friends[num] name = friend.name.encode('utf-8') - dialog = "Enter new alias for friend " + name.decode('utf-8') + " or leave empty to use friend's name:" - text, ok = QtGui.QInputDialog.getText(None, 'Set alias', dialog) + dialog = QtGui.QApplication.translate('MainWindow', + "Enter new alias for friend {} or leave empty to use friend's name:", + None, QtGui.QApplication.UnicodeUTF8) + dialog = dialog.format(name.decode('utf-8')) + title = QtGui.QApplication.translate('MainWindow', + 'Set alias', + None, QtGui.QApplication.UnicodeUTF8) + + text, ok = QtGui.QInputDialog.getText(None, + title, + dialog) if ok: settings = Settings.get_instance() aliases = settings['friends_aliases'] @@ -889,8 +895,7 @@ class Profile(Contact, Singleton): inline = InlineImage(transfer.get_data()) self.get_friend_by_number(friend_number).update_transfer_data(file_number, FILE_TRANSFER_MESSAGE_STATUS['FINISHED'], - inline - ) + inline) self.set_active(self._active_friend) else: self.get_friend_by_number(friend_number).update_transfer_data(file_number, FILE_TRANSFER_MESSAGE_STATUS['FINISHED']) diff --git a/src/translations/en_GB.qm b/src/translations/en_GB.qm index 2c9c410..990f160 100644 Binary files a/src/translations/en_GB.qm and b/src/translations/en_GB.qm differ diff --git a/src/translations/en_GB.ts b/src/translations/en_GB.ts index 402b76c..144c404 100644 --- a/src/translations/en_GB.ts +++ b/src/translations/en_GB.ts @@ -105,13 +105,13 @@ - + User {} wants to add you to contact list. Message: {} - + Friend request @@ -155,6 +155,11 @@ Remove friend + + + Enter new alias for friend {} or leave empty to use friend's name: + Enter new alias for friend {} or leave empty to use friend's name: + NetworkSettings diff --git a/src/translations/fr_FR.ts b/src/translations/fr_FR.ts index 42e5115..c80ebac 100644 --- a/src/translations/fr_FR.ts +++ b/src/translations/fr_FR.ts @@ -1,6 +1,5 @@ - - + AddContact @@ -52,7 +51,7 @@ Port : - + Online contacts Contacts connectés @@ -60,102 +59,106 @@ MainWindow - + Profile Profile - + Settings Paramêtres - + About À Propos - + Add contact Rajouter un contact - + Privacy Confidentialité - + Interface Interface - + Notifications Notifications - + Network Réseau - + About program À propos du programme - + User {} wants to add you to contact list. Message: {} L'Utilisateur {} veut vout rajouter à sa liste de contacts. Message : {} - + Friend request - D'un ami ? De l'ami ? Demande d'amis - + Toxygen is Tox client written on Python 2.7. Version: Toxygen est un client Tox écris en Python 2.7. Version : - + Choose file Choisir un fichier - + Disallow auto accept Désactiver l'auto-réception - + Allow auto accept Activer l'auto-réception - + Set alias Définir un alias - + Clear history Vider l'historique - + Copy public key Copier la clé publique - + Remove friend Retirer un ami + + + Enter new alias for friend {} or leave empty to use friend's name: + + NetworkSettings @@ -211,17 +214,17 @@ interfaceForm - + Interface settings Paramêtres de l'interface - + Theme: Thème : - + Language: Langue : @@ -269,7 +272,7 @@ toxygen - + Looks like other instance of Toxygen uses this profile! Continue? Il semble qu'une autre instance de Toxygen utilise ce profil ! Continuer ? @@ -277,22 +280,22 @@ notificationsForm - + Notification settings Paramêtres de notification - + Enable notifications Activer les notifications - + Enable call's sound Activer les sons d'appel - + Enable sound notifications Activer les sons de notifications @@ -300,45 +303,60 @@ privacySettings - + Privacy settings Paramêtres de confidentialité - + Save chat history Sauvegarder l'historique du chat - + Allow file auto accept Autoriser les fichier automatiquement - + Send typing notifications Notifier la frappe - + Auto accept default path: Chemin d'accès des fichiers acceptés automatiquement : - + Change Modifier + + + Allow inlines + + + + + Chat history + + + + + History will be cleaned! Continue? + + tray - + Open Toxygen Ouvrir Toxygen - + Exit Quitter diff --git a/src/translations/ru_RU.qm b/src/translations/ru_RU.qm index 7e9ed2e..e98cd98 100644 Binary files a/src/translations/ru_RU.qm and b/src/translations/ru_RU.qm differ diff --git a/src/translations/ru_RU.ts b/src/translations/ru_RU.ts index 0f5071b..7220df8 100644 --- a/src/translations/ru_RU.ts +++ b/src/translations/ru_RU.ts @@ -105,14 +105,14 @@ О программе - + User {} wants to add you to contact list. Message: {} Пользователь {} хочет добавить Вас в список контактов. Сообщение: {} - + Friend request Запрос на добавление в друзья @@ -156,6 +156,11 @@ Remove friend Удалить друга + + + Enter new alias for friend {} or leave empty to use friend's name: + Введите новый псевдоним для друга {} или оставьте пустым для использования его имени: + NetworkSettings