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 990f160..74be0c1 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 144c404..0cce13e 100644 --- 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 e98cd98..cc95d76 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 7220df8..434fb92 100644 --- a/src/translations/ru_RU.ts +++ b/src/translations/ru_RU.ts @@ -4,17 +4,17 @@ 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? История переписки будет очищена! Продолжить?