From 7d7efa6acd30f1a636ec5615af383c598324132b Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Thu, 14 Apr 2016 20:45:29 +0300 Subject: [PATCH] fixed repaint bug, translations update --- src/profile.py | 23 +++++---- src/translations/en_GB.qm | Bin 3743 -> 3980 bytes src/translations/en_GB.ts | 9 +++- src/translations/fr_FR.ts | 96 ++++++++++++++++++++++---------------- src/translations/ru_RU.qm | Bin 5878 -> 6153 bytes src/translations/ru_RU.ts | 9 +++- 6 files changed, 85 insertions(+), 52 deletions(-) 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 2c9c41041c58c7ea8c29b79dec2486113b815c8a..990f160b1a0bbf4f75e48aa4442e5e4c03a86ebf 100644 GIT binary patch delta 773 zcmbO)+ao_gq+Wo5!Ox0;fnhZRL*xVo2F9ZdEazDm7wc0|SdLgZs223=E9V8A6)77#P?Y8NxHG7#J8W7{aIhWME)SU^wbk z%)r1?%*eR;7Xt(5S;l=_$_xzb2}}oeg)%U3>M&ieKg_^T&*sAPxz?G1folUZgV-Ym z2KE`ur+B6?FmQfh$=v^yfq~;9OWEGJ3=FIvSmw1{WnkdG%(7y~QU(T&jV!01-DY55 zX<~V;&&9yN5yz@%w3C5>X*a9sw0{f?oI$Kk36=~DOwU=@9qwXa;OJyMX8)OifkTV+ z-r*Dm2DTY&8D-84^$e^&Y@Nr17#P^~*yRNU7#LV*v-?;uGcfSnVULSSW?*3W#NI4Y z!oa|-%|7AyPX-2-E9_G*lrk`|{NiX_`y#o#9c1NUDZ3*q?;44g$g3-Tv3FmQd~ zSy{1*fq}t+XE$Rp0|RRb&jYE?3=AwQc=fv0GcfSz@`n7n!oa}T!8q@II;!Ox0;fnhZRL*xVo2F9ZdEazDm7wc0|T=MgZs223=E9V8A6)77#P@O7{W8F7#J8W7{aIhWME)SU^wbk z%)r3i$H=((7Xt&w3&wq1$_xx_)l3I=g)%U3xHDa^Kg_^T&l=D4xz?G1f%7yogV-Ym z2DZ)2r+B6?FmUp-WbXgUz`*{7rEKq91_oAcmU%5#85p?Uv8>p!l!1Z$49n?fw;33i z=d!%k=VD-BuVhs;+R4Dcw42p*+CK&cj$Br!1WN`6rsu5d4tFsyurFafX8)Oif!&q$ z-r*Dm2G-4N8D-84^$aZOY@Nr17#P?*+2sWV7#LW#vHMssGca&}XOD|YW?*3W#NI4Y z!oa}g#y;WrPX-3&_v}+Ilrk`|h;lTpeayhX)xa^+T9|=>b0Q~m+*Aez)@PjdR;~;T zOcOc1e6<)D7|J0uyBO!$J)H~;+=sZ77>_V8Fff4V$uk+b>m|5W?6G2CV0+GWV){`A z2If-k{J-ZI7&y(jrx^TXVBnVEu@Iimz`)VVvmk#m0|OT~&&rBj3=9koJi8f-85mgl zc^*i8W?*1G%&XV6o`HeegE!>Y6$S>z4&J$Gw-^|>HuA~LNMT@LvF49VV_{%mO62cM n+QPuVEXu#~#uNqycFu@Q1_qw8&00*J%#$5hc{iuBsdEAV*GY%V 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 7e9ed2eb18b835d5c54924fc1511b1242bb66b1f..e98cd9822a2a8a99a13227ee430d6f6e085ee22a 100644 GIT binary patch delta 819 zcmeyS+i5UCq+Wo5!Ox0;fng^DL*xVo2FAM#EazDm7(|m9Se{Q~U|_h-z-fDrfkCv3 zL0Qk2fq}`A!Q>wc0|V=E2KQ-47#JA;GlVpEF)(nQWeCr#Vqjo&V+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_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