From ee15359c192ca975ac3d540db58f38f818855be3 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Sun, 24 Apr 2016 14:09:29 +0300 Subject: [PATCH] docs update, translations update --- README.md | 7 +- docs/install.md | 21 +++-- src/calls.py | 2 +- src/profile.py | 9 +- src/translations/en_GB.qm | Bin 3980 -> 4585 bytes src/translations/en_GB.ts | 167 ++++++++++++++++++++++++-------------- src/translations/fr_FR.ts | 167 ++++++++++++++++++++++++-------------- src/translations/ru_RU.qm | Bin 6153 -> 6792 bytes src/translations/ru_RU.ts | 167 ++++++++++++++++++++++++-------------- 9 files changed, 337 insertions(+), 203 deletions(-) diff --git a/README.md b/README.md index 62770e7..659bd3e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Toxygen -Toxygen is simple [Tox](https://tox.chat/) client written on pure Python 2.7 +Toxygen is simple [Tox](https://tox.chat/) client written on pure Python ### [How to install](/docs/install.md) # Supported OS: @@ -20,12 +20,13 @@ Toxygen is simple [Tox](https://tox.chat/) client written on pure Python 2.7 - [x] Multilingual - [x] Sound notifications - [x] Inline images -- [ ] Audio +- [x] Audio - [ ] Video - [ ] Save file encryption - [ ] File resuming - [ ] Typing notifications - [ ] Changing nospam +- [ ] Plugins support - [ ] Group chats - [ ] Read receipts - [ ] Faux offline messaging @@ -36,6 +37,8 @@ Toxygen is simple [Tox](https://tox.chat/) client written on pure Python 2.7 [Download develop version](https://github.com/xveduk/toxygen/archive/develop.zip) +[Releases](https://github.com/xveduk/toxygen/releases) + ###Screenshots *Toxygen running on Ubuntu and Windows* ![Ubuntu](/docs/ubuntu.png) diff --git a/docs/install.md b/docs/install.md index f6207a9..958f06b 100644 --- a/docs/install.md +++ b/docs/install.md @@ -6,19 +6,22 @@ 1. [Download and install latest Python 2.7](https://www.python.org/downloads/windows/) 2. [Install PySide](https://pypi.python.org/pypi/PySide/1.2.4) *(PyQt4 support will be added later)* -3. [Download toxygen](https://github.com/xveduk/toxygen/archive/master.zip) -4. Unpack archive -5. Download latest [libtox.dll](https://build.tox.chat/view/libtoxcore/job/libtoxcore_build_windows_x86_shared_release/lastSuccessfulBuild/artifact/libtoxcore_build_windows_x86_shared_release.zip) build, download latest [libsodium.a](https://build.tox.chat/view/libsodium/job/libsodium_build_windows_x86_static_release/lastSuccessfulBuild/artifact/libsodium_build_windows_x86_static_release.zip) build, put it into \src\libs\ -6. Run \src\main.py +3. Install PyAudio: ``python -m pip install pyaudio`` +4. [Download toxygen](https://github.com/xveduk/toxygen/archive/master.zip) +5. Unpack archive +6. Download latest [libtox.dll](https://build.tox.chat/view/libtoxcore/job/libtoxcore_build_windows_x86_shared_release/lastSuccessfulBuild/artifact/libtoxcore_build_windows_x86_shared_release.zip) build, download latest [libsodium.a](https://build.tox.chat/view/libsodium/job/libsodium_build_windows_x86_static_release/lastSuccessfulBuild/artifact/libsodium_build_windows_x86_static_release.zip) build, put it into \src\libs\ +7. Run \src\main.py ### Linux -1. [Install PySide](https://wiki.qt.io/PySide_Binaries_Linux) *(PyQt4 support will be added later)* -2. [Download toxygen](https://github.com/xveduk/toxygen/archive/master.zip) -3. Unpack archive -4. Install [toxcore](https://github.com/irungentoo/toxcore/blob/master/INSTALL.md) in your system -5. Run app: +1. Install Python2.7: ``sudo apt-get install python2.7`` +2. [Install PySide](https://wiki.qt.io/PySide_Binaries_Linux) *(PyQt4 support will be added later)* +3. Install PyAudio: ``pip install pyaudio`` +4. [Download toxygen](https://github.com/xveduk/toxygen/archive/master.zip) +5. Unpack archive +6. Install [toxcore](https://github.com/irungentoo/toxcore/blob/master/INSTALL.md) in your system +7. Run app: ``python main.py`` ## Use precompiled binary: diff --git a/src/calls.py b/src/calls.py index b85d4f5..61bf361 100644 --- a/src/calls.py +++ b/src/calls.py @@ -3,7 +3,7 @@ import time import threading import settings from toxav_enums import * -# TODO: play sound until outgoing call will be started or cancelled +# TODO: play sound until outgoing call will be started or cancelled and add timeout CALL_TYPE = { 'NONE': 0, diff --git a/src/profile.py b/src/profile.py index c2dfea7..20306cd 100644 --- a/src/profile.py +++ b/src/profile.py @@ -293,6 +293,7 @@ class Profile(Contact, Singleton): self._tox = tox self._file_transfers = {} # dict of file transfers. key - tuple (friend_number, file_number) self._call = calls.AV(tox.AV) # object with data about calls + self._incoming_calls = set() settings = Settings.get_instance() self._show_online = settings['show_online_friends'] screen.online_contacts.setChecked(self._show_online) @@ -380,7 +381,6 @@ class Profile(Contact, Singleton): """ :param value: number of new active friend in friend's list or None to update active user's data """ - # TODO: check if there is incoming call with friend if value is None and self._active_friend == -1: # nothing to update return if value == -1: # all friends were deleted @@ -417,6 +417,8 @@ class Profile(Contact, Singleton): self._messages.scrollToBottom() if value in self._call: self._screen.active_call() + elif value in self._incoming_calls: + self._screen.incoming_call() else: self._screen.call_finished() else: @@ -991,9 +993,9 @@ class Profile(Contact, Singleton): def incoming_call(self, audio, video, friend_number): friend = self.get_friend_by_number(friend_number) + self._incoming_calls.add(friend_number) if friend_number == self.get_active_number(): self._screen.incoming_call() - # self.accept_call(friend_number, audio, video) else: friend.set_messages(True) if video: @@ -1007,10 +1009,13 @@ class Profile(Contact, Singleton): def accept_call(self, friend_number, audio, video): self._call.accept_call(friend_number, audio, video) self._screen.active_call() + self._incoming_calls.remove(friend_number) if hasattr(self, '_call_widget'): del self._call_widget def stop_call(self, friend_number, by_friend): + if friend_number in self._incoming_calls: + self._incoming_calls.remove(friend_number) self._screen.call_finished() self._call.finish_call(friend_number, by_friend) # finish or decline call if hasattr(self, '_call_widget'): diff --git a/src/translations/en_GB.qm b/src/translations/en_GB.qm index 990f160b1a0bbf4f75e48aa4442e5e4c03a86ebf..74be0c1d52396271e29e5b10efbb1ff96d9ba399 100644 GIT binary patch delta 1121 zcma)(TSyd99LB%do!QwPXID!NGRsXN!Uu~evh89Pl}2ir(M71X-OUDcNA^|}v4uUP z1X-3D(S;yTy22Ke*#%51yFPTIAi^M#-n2WVeY2IlRP-?O=lst(-~ac0XIDmVR((pe z04R0=I0>w*2ZRoY4@4kw7Q~)L_V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a/src/translations/en_GB.ts +++ b/src/translations/en_GB.ts @@ -4,17 +4,17 @@ AddContact - + Add contact Add contact - + TOX ID: TOX ID: - + Message: Message: @@ -22,37 +22,37 @@ Form - + Send request Send request - + IPv6 IPv6 - + UDP UDP - + Proxy Proxy - + IP: IP: - + Port: Port: - + Online contacts Online contacts @@ -60,172 +60,213 @@ MainWindow - + Profile - + Settings - + About - + Add contact - + Privacy - + Interface - + Notifications - + Network - + About program - + User {} wants to add you to contact list. Message: {} - + Friend request - + Toxygen is Tox client written on Python 2.7. Version: - + Choose file - + Disallow auto accept - + Allow auto accept - + Set alias - + Clear history - + Copy public key - + 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: + + + Audio + Audio + NetworkSettings - + Network settings Network settings + + + Restart TOX core + Restart Tox core + ProfileSettingsForm - + Export profile - + Profile settings - + Name: - + Status: - + TOX ID: - + Copy TOX ID - + New avatar - + Reset avatar + + audioSettingsForm + + + Audio settings + Audio settings + + + + Input device: + Input device: + + + + Output device: + Output device: + + + + incoming_call + + + Incoming video call + Incoming video call + + + + Incoming audio call + Incoming audio call + + interfaceForm - + Interface settings - + Theme: - + Language: @@ -233,42 +274,42 @@ login - + Log in - + Create - + Profile name: - + Load profile - + Use as default - + Load existing profile - + Create new profile - + toxygen @@ -281,22 +322,22 @@ notificationsForm - + Notification settings - + Enable notifications - + Enable call's sound - + Enable sound notifications @@ -304,47 +345,47 @@ privacySettings - + Privacy settings - + Save chat history - + Allow file auto accept - + Send typing notifications - + Auto accept default path: - + Change - + Allow inlines - + Chat history - + History will be cleaned! Continue? diff --git a/src/translations/fr_FR.ts b/src/translations/fr_FR.ts index c80ebac..95f4a8a 100644 --- a/src/translations/fr_FR.ts +++ b/src/translations/fr_FR.ts @@ -3,17 +3,17 @@ AddContact - + Add contact Rajouter un contact - + TOX ID: ID TOX : - + Message: Message : @@ -21,37 +21,37 @@ Form - + Send request Envoyer une demande - + IPv6 IPv6 - + UDP UDP - + Proxy Proxy - + IP: IP : - + Port: Port : - + Online contacts Contacts connectés @@ -59,172 +59,213 @@ 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 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: + + + Audio + + NetworkSettings - + Network settings Paramêtres réseaux + + + Restart TOX core + + ProfileSettingsForm - + Export profile Exporter le profile - + Profile settings Paramêtres du profil - + Name: Nom : - + Status: Status : - + TOX ID: ID TOX : - + Copy TOX ID Copier l'ID TOX - + New avatar Nouvel avatar - + Reset avatar Réinitialiser l'avatar + + audioSettingsForm + + + Audio settings + + + + + Input device: + + + + + Output device: + + + + + incoming_call + + + Incoming video call + + + + + Incoming audio call + + + interfaceForm - + Interface settings Paramêtres de l'interface - + Theme: Thème : - + Language: Langue : @@ -232,42 +273,42 @@ login - + Log in Se connecter - + Create Créer - + Profile name: Nom du profil : - + Load profile Charger le profil - + Use as default Utiliser par défaut - + Load existing profile Charger un profil existant - + Create new profile Créer un nouveau profil - + toxygen toxygen @@ -280,22 +321,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 @@ -303,47 +344,47 @@ 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? diff --git a/src/translations/ru_RU.qm b/src/translations/ru_RU.qm index e98cd9822a2a8a99a13227ee430d6f6e085ee22a..cc95d76db3379e4811d196f334ef050b28eebe90 100644 GIT binary patch delta 1144 zcmZ`%Ye-XJ7=E^WXJmnd=f%av% z9Z(+=*sd2qTAnz2{WSAi#G{X| z0ewV#nWpfbCXLIYC|!$`6Zu8_W~peU9T1Xqv7JOMWzzkE9)w|Tk>0kuIry@EZHR;A zHvMJ?3ruJ94fm6&s8LqF_3#dPY*Hd%D3mL5b#!E+ykeP)3L)=I4FIVIx$yxN%X<0H zvmj%UVaJ6J%x^O^&qx81JB+#&hlnQ|3mkJuENCog>I{?7XJgsC3|hVWPgL8DkJ}n( zS*tQ$LyJi*9<`g5nvoKfKsi#-N=eb)yuKC}xXn zkt^~IF%5bisW9mF`lGedSAFqRF;?V=Sv=E)O%$-UP!zGcNL0Wooa~$>@?k|4oLJJ2 zkXY%d57gELtX0k>R+qod6Sb>rw3;yoPMXugwgCgp@qyNQPaxp+t*MvEA*nXTVd3A* zTz}nq4VQ`WB0WxkLxny5mK7T>viRhaj17){5~fn$hG4+z_Jq7HkE0(nJP>ulkf`N@ z;F_Jmz+k`wai@r6F(=N;DN1RYolI@vfAZ;QjPy*N|D;n&eJ=lcx?qhPV0G25TNk5l m^8U@>R&21C!{lx!|5e`xS=arBVa?ePzR9zA0A8Gi$Nr2p;! delta 575 zcmXAmT}YEr9LAsbYwzB7@4FATMM)857tzI(X!sE^N=g~(MHym*MGJ8^4YI6^8eu_O z5QFJj7xr;c=tXw1F4ATn%xM_2E)2!7Aq902bR&WZSxnuI6n z1lk$^j02qsKqx`}CDDfa(C`#>Df3+M>< zvp#~3)Gw~*kPr3(9ThIgcc*;fM9TJP_7)4+92>KfwUD_Wr8Fom16 z=JYHeXSHDK9wvF~|7!TPLN>f8_Mu-|wTNfPX&F?xA|V}iyjfsw0A#&RW{T2iJj{+#`n%=Yzp z8cCbO-Ae?H+qb5ffZFWn?5>n4oOi^|ydY_ AddContact - + Add contact Добавить контакт - + TOX ID: TOX ID: - + Message: Сообщение: @@ -22,37 +22,37 @@ Form - + Send request Отправить запрос - + IPv6 IPv6 - + UDP UDP - + Proxy Прокси - + IP: IP: - + Port: Порт: - + Online contacts Контакты в сети @@ -60,145 +60,155 @@ MainWindow - + Profile Профиль - + Settings Настройки - + About О программе - + Add contact Добавить контакт - + Privacy Приватность - + Interface Интерфейс - + Notifications Уведомления - + Network Сеть - + About program О программе - + User {} wants to add you to contact list. Message: {} Пользователь {} хочет добавить Вас в список контактов. Сообщение: {} - + Friend request Запрос на добавление в друзья - + Toxygen is Tox client written on Python 2.7. Version: Toxygen - клиент для мессенджера Tox, написанный на Python 2.7. Версия: - + Choose file Выберите файл - + Disallow auto accept Запретить автоматическое получение файлов - + Allow auto accept Разрешить автоматическое получение файлов - + Set alias Изменить псевдоним - + Clear history Очистить историю - + Copy public key Копировать публичный ключ - + Remove friend Удалить друга - + Enter new alias for friend {} or leave empty to use friend's name: Введите новый псевдоним для друга {} или оставьте пустым для использования его имени: + + + Audio + Аудио + NetworkSettings - + Network settings Настройки сети + + + Restart TOX core + Перезапустить ядро TOX + ProfileSettingsForm - + Export profile Экспорт профиля - + Profile settings Настройки профиля - + Name: Имя: - + Status: Статус: - + TOX ID: TOX ID: - + Copy TOX ID Копировать TOX ID @@ -208,30 +218,61 @@ Язык: - + New avatar Новый аватар - + Reset avatar Сбросить аватар + + audioSettingsForm + + + Audio settings + Настройки аудио + + + + Input device: + Устройство ввода: + + + + Output device: + Устройство вывода: + + + + incoming_call + + + Incoming video call + Входящий видеозвонок + + + + Incoming audio call + Входящий аудиозвонок + + interfaceForm - + Interface settings Настройки интерфейса - + Theme: Тема: - + Language: Язык: @@ -239,42 +280,42 @@ login - + Log in Вход - + Create Создать - + Profile name: Имя профиля: - + Load profile Загрузить профиль - + Use as default По умолчанию - + Load existing profile Загрузить профиль - + Create new profile Создать новый профиль - + toxygen toxygen @@ -287,22 +328,22 @@ notificationsForm - + Notification settings Настройки уведомлений - + Enable notifications Включить уведомления - + Enable call's sound Включить звук звонка - + Enable sound notifications Включить звуковые уведомления @@ -311,47 +352,47 @@ privacySettings - + Privacy settings Настройки приватности - + Save chat history Сохранять историю переписки - + Allow file auto accept Разрешить автополучение файлов - + Send typing notifications Посылать уведомления о наборе текста - + Auto accept default path: Путь автоприема файлов: - + Change Изменить - + Allow inlines Разрешать инлайны - + Chat history История чата - + History will be cleaned! Continue? История переписки будет очищена! Продолжить?