diff --git a/src/mainscreen.py b/src/mainscreen.py index 943d761..a4acd31 100644 --- a/src/mainscreen.py +++ b/src/mainscreen.py @@ -495,7 +495,11 @@ class MainWindow(QtGui.QMainWindow): self.listMenu = QtGui.QMenu() set_alias_item = self.listMenu.addAction(QtGui.QApplication.translate("MainWindow", 'Set alias', None, QtGui.QApplication.UnicodeUTF8)) clear_history_item = self.listMenu.addAction(QtGui.QApplication.translate("MainWindow", 'Clear history', None, QtGui.QApplication.UnicodeUTF8)) - copy_key_item = self.listMenu.addAction(QtGui.QApplication.translate("MainWindow", 'Copy public key', None, QtGui.QApplication.UnicodeUTF8)) + copy_menu = self.listMenu.addMenu(QtGui.QApplication.translate("MainWindow", 'Copy', None, QtGui.QApplication.UnicodeUTF8)) + copy_name_item = copy_menu.addAction(QtGui.QApplication.translate("MainWindow", 'Name', None, QtGui.QApplication.UnicodeUTF8)) + copy_status_item = copy_menu.addAction(QtGui.QApplication.translate("MainWindow", 'Status message', None, QtGui.QApplication.UnicodeUTF8)) + copy_key_item = copy_menu.addAction(QtGui.QApplication.translate("MainWindow", 'Public key', None, QtGui.QApplication.UnicodeUTF8)) + auto_accept_item = self.listMenu.addAction(auto) remove_item = self.listMenu.addAction(QtGui.QApplication.translate("MainWindow", 'Remove friend', None, QtGui.QApplication.UnicodeUTF8)) notes_item = self.listMenu.addAction(QtGui.QApplication.translate("MainWindow", 'Notes', None, QtGui.QApplication.UnicodeUTF8)) @@ -510,6 +514,8 @@ class MainWindow(QtGui.QMainWindow): self.connect(clear_history_item, QtCore.SIGNAL("triggered()"), lambda: self.clear_history(num)) self.connect(auto_accept_item, QtCore.SIGNAL("triggered()"), lambda: self.auto_accept(num, not allowed)) self.connect(notes_item, QtCore.SIGNAL("triggered()"), lambda: self.show_note(friend)) + self.connect(copy_name_item, QtCore.SIGNAL("triggered()"), lambda: self.copy_name(friend)) + self.connect(copy_status_item, QtCore.SIGNAL("triggered()"), lambda: self.copy_status(friend)) parent_position = self.friends_list.mapToGlobal(QtCore.QPoint(0, 0)) self.listMenu.move(parent_position + pos) self.listMenu.show() @@ -540,6 +546,14 @@ class MainWindow(QtGui.QMainWindow): clipboard = QtGui.QApplication.clipboard() clipboard.setText(tox_id) + def copy_name(self, friend): + clipboard = QtGui.QApplication.clipboard() + clipboard.setText(friend.name) + + def copy_status(self, friend): + clipboard = QtGui.QApplication.clipboard() + clipboard.setText(friend.status_message) + def clear_history(self, num): self.profile.clear_history(num) diff --git a/src/menu.py b/src/menu.py index a9b22a1..efc11c5 100644 --- a/src/menu.py +++ b/src/menu.py @@ -122,11 +122,13 @@ class ProfileSettings(CenteredWidget): self.new_nospam = QtGui.QPushButton(self) self.new_nospam.setGeometry(QtCore.QRect(420, 250, 180, 30)) self.new_nospam.clicked.connect(self.new_no_spam) - + self.copy_pk = QtGui.QPushButton(self) + self.copy_pk.setGeometry(QtCore.QRect(40, 300, 180, 30)) + self.copy_pk.clicked.connect(self.copy_public_key) self.new_avatar = QtGui.QPushButton(self) - self.new_avatar.setGeometry(QtCore.QRect(40, 300, 180, 30)) + self.new_avatar.setGeometry(QtCore.QRect(230, 300, 180, 30)) self.delete_avatar = QtGui.QPushButton(self) - self.delete_avatar.setGeometry(QtCore.QRect(230, 300, 180, 30)) + self.delete_avatar.setGeometry(QtCore.QRect(420, 300, 180, 30)) self.delete_avatar.clicked.connect(self.reset_avatar) self.new_avatar.clicked.connect(self.set_avatar) self.profile_pass = QtGui.QLabel(self) @@ -183,6 +185,7 @@ class ProfileSettings(CenteredWidget): self.status.addItem(QtGui.QApplication.translate("ProfileSettingsForm", "Online", None, QtGui.QApplication.UnicodeUTF8)) self.status.addItem(QtGui.QApplication.translate("ProfileSettingsForm", "Away", None, QtGui.QApplication.UnicodeUTF8)) self.status.addItem(QtGui.QApplication.translate("ProfileSettingsForm", "Busy", None, QtGui.QApplication.UnicodeUTF8)) + self.copy_pk.setText(QtGui.QApplication.translate("ProfileSettingsForm", "Copy public key", None, QtGui.QApplication.UnicodeUTF8)) if self.auto: self.default.setText(QtGui.QApplication.translate("ProfileSettingsForm", "Mark as not default profile", None, QtGui.QApplication.UnicodeUTF8)) else: @@ -227,6 +230,15 @@ class ProfileSettings(CenteredWidget): self.copyId.setIcon(icon) self.copyId.setIconSize(QtCore.QSize(10, 10)) + def copy_public_key(self): + clipboard = QtGui.QApplication.clipboard() + profile = Profile.get_instance() + clipboard.setText(profile.tox_id[:64]) + pixmap = QtGui.QPixmap(curr_directory() + '/images/accept.png') + icon = QtGui.QIcon(pixmap) + self.copy_pk.setIcon(icon) + self.copy_pk.setIconSize(QtCore.QSize(10, 10)) + def new_no_spam(self): self.tox_id.setText(Profile.get_instance().new_nospam()) diff --git a/src/translations/en_GB.ts b/src/translations/en_GB.ts index cb8914e..045735f 100644 --- a/src/translations/en_GB.ts +++ b/src/translations/en_GB.ts @@ -39,27 +39,27 @@ Send request - + IPv6 IPv6 - + UDP UDP - + Proxy Proxy - + IP: IP: - + Port: Port: @@ -69,12 +69,12 @@ Online contacts - + HTTP HTTP - + WARNING: using proxy with enabled UDP can produce IP leak @@ -84,47 +84,47 @@ can produce IP leak MainWindow - + Profile - + Settings - + About - + Add contact - + Privacy - + Interface - + Notifications - + Network - + About program @@ -140,37 +140,32 @@ can produce IP leak - + Choose file Choose file - + Disallow auto accept - + Allow auto accept - + Set alias - + Clear history - - Copy public key - - - - + Remove friend @@ -180,7 +175,7 @@ can produce IP leak Enter new alias for friend {} or leave empty to use friend's name: - + Audio Audio @@ -195,7 +190,7 @@ can produce IP leak Friend added - + Toxygen is Tox client written on Python. Version: Toxygen is Tox client written on Python. @@ -222,47 +217,47 @@ Version: Send file - + Send message Send message - + Start audio call with friend Start audio call with friend - + Plugins - + List of plugins - + Search - + All - + Online - + Notes - + Notes about user @@ -322,20 +317,35 @@ Version: - + Lock - + Cannot lock app - + Error. Profile password is not set. + + + Name + + + + + Status message + + + + + Public key + + MenuWindow @@ -388,12 +398,12 @@ Version: NetworkSettings - + Network settings Network settings - + Restart TOX core Restart Tox core @@ -414,42 +424,42 @@ Version: PluginsForm - + Plugins - + Open selected plugin - + No GUI found for this plugin - + No description available - + Disable plugin - + Enable plugin - + No plugins found - + Error @@ -457,193 +467,198 @@ Version: ProfileSettingsForm - + Export profile - + Profile settings - + Name: - + Status: - + TOX ID: - + Copy TOX ID - + New avatar - + Reset avatar - + New NoSpam New NoSpam - + Profile password - + Password (at least 8 symbols) - + Confirm password - + Set password - + Passwords do not match - + Leaving blank will reset current password - + There is no way to recover lost passwords - + Password must be at least 8 symbols - + Choose avatar - + Online - + Away - + Busy - + Mark as not default profile - + Mark as default profile + + + Copy public key + + WelcomeScreen - + Don't show again - + Tip of the day - + Press Esc if you want hide app to tray. - - Right click on screenshot button hides app to tray during screenshot - - - - + You can use Tox over Tor. For more info read <a href="https://wiki.tox.chat/users/tox_over_tor_tot">this post</a> - - Use Settings -> Interface to customize interface - - - - + Set profile password via Profile -> Settings. Password allows Toxygen encrypt your history and settings. - + Since v0.1.3 Toxygen supports plugins. <a href="https://github.com/xveduk/toxygen/blob/master/docs/plugins.md">Read more</a> - + New in Toxygen v0.2.2:<br>Users can lock application using profile password.<br>Compact contact list support<br>Bug fixes<br>Tox DNS improvements - - Toxygen supports faux offline messages and file transfers. Send message or file to offline friend and he will get it later + + Right click on screenshot button hides app to tray during screenshot. - - Set new NoSpam to avoid spam friend requests: Profile -> Settings -> Set new NoSpam + + Use Settings -> Interface to customize interface. + + + + + Toxygen supports faux offline messages and file transfers. Send message or file to offline friend and he will get it later. + + + + + Set new NoSpam to avoid spam friend requests: Profile -> Settings -> Set new NoSpam. audioSettingsForm - + Audio settings Audio settings - + Input device: Input device: - + Output device: Output device: @@ -684,57 +699,57 @@ Version: interfaceForm - + Interface settings - + Theme: - + Language: - + Smileys - + Smiley pack: - + Mirror mode - + Messages font size: - + Restart app to apply settings - + Restart required - + Select unread messages notification color - + Compact contact list @@ -795,22 +810,22 @@ Version: notificationsForm - + Notification settings - + Enable notifications - + Enable call's sound - + Enable sound notifications @@ -818,72 +833,72 @@ Version: 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? - + Blocked users: Blocked users: - + Unblock Unblock - + Block user Block user - + Add to friend list Add to friend list - + Do you want to add this user to friend list? Do you want to add this user to friend list? @@ -893,12 +908,12 @@ Version: Block by TOX ID: - + Block by public key: - + Save unsent messages only diff --git a/src/translations/fr_FR.ts b/src/translations/fr_FR.ts index a4f443c..bb91c4f 100644 --- a/src/translations/fr_FR.ts +++ b/src/translations/fr_FR.ts @@ -39,27 +39,27 @@ Envoyer une demande - + IPv6 IPv6 - + UDP UDP - + Proxy Proxy - + IP: IP : - + Port: Port : @@ -69,12 +69,12 @@ Contacts connectés - + HTTP HTTP - + WARNING: using proxy with enabled UDP can produce IP leak @@ -84,47 +84,47 @@ can produce IP leak 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 @@ -145,37 +145,37 @@ can produce IP leak 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 + Copier la clé publique - + Remove friend Retirer un ami @@ -185,7 +185,7 @@ can produce IP leak Entrez un nouvel alias pour l'ami {} ou laissez vide pour garder son nom de base : - + Audio Audio @@ -200,7 +200,7 @@ can produce IP leak Ami rajouté - + Toxygen is Tox client written on Python. Version: Toxygen est un client Tox écrit en Python. @@ -227,47 +227,47 @@ Version : Envoyer le fichier - + Send message Envoyer le message - + Start audio call with friend Lancer un appel audio avec un ami - + Plugins - + List of plugins - + Search - + All - + Online - + Notes - + Notes about user @@ -327,20 +327,35 @@ Version : - + Lock - + Cannot lock app - + Error. Profile password is not set. + + + Name + + + + + Status message + + + + + Public key + + MenuWindow @@ -393,12 +408,12 @@ Version : NetworkSettings - + Network settings Paramètres réseaux - + Restart TOX core Relancer le noyau TOX @@ -419,42 +434,42 @@ Version : PluginsForm - + Plugins - + Open selected plugin - + No GUI found for this plugin - + No description available - + Disable plugin - + Enable plugin - + No plugins found - + Error @@ -462,193 +477,198 @@ Version : 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 - + New NoSpam Nouveau NoSpam - + Profile password - + Password (at least 8 symbols) - + Confirm password - + Set password - + Passwords do not match - + Leaving blank will reset current password - + There is no way to recover lost passwords - + Password must be at least 8 symbols - + Choose avatar - + Online - + Away - + Busy - + Mark as not default profile - + Mark as default profile + + + Copy public key + Copier la clé publique + WelcomeScreen - + Don't show again - + Tip of the day - + Press Esc if you want hide app to tray. - - Right click on screenshot button hides app to tray during screenshot - - - - + You can use Tox over Tor. For more info read <a href="https://wiki.tox.chat/users/tox_over_tor_tot">this post</a> - - Use Settings -> Interface to customize interface - - - - + Set profile password via Profile -> Settings. Password allows Toxygen encrypt your history and settings. - + Since v0.1.3 Toxygen supports plugins. <a href="https://github.com/xveduk/toxygen/blob/master/docs/plugins.md">Read more</a> - + New in Toxygen v0.2.2:<br>Users can lock application using profile password.<br>Compact contact list support<br>Bug fixes<br>Tox DNS improvements - - Toxygen supports faux offline messages and file transfers. Send message or file to offline friend and he will get it later + + Right click on screenshot button hides app to tray during screenshot. - - Set new NoSpam to avoid spam friend requests: Profile -> Settings -> Set new NoSpam + + Use Settings -> Interface to customize interface. + + + + + Toxygen supports faux offline messages and file transfers. Send message or file to offline friend and he will get it later. + + + + + Set new NoSpam to avoid spam friend requests: Profile -> Settings -> Set new NoSpam. audioSettingsForm - + Audio settings Paramètres audio - + Input device: Péripherique d'entrée : - + Output device: Péripherique de sortie : @@ -689,57 +709,57 @@ Version : interfaceForm - + Interface settings Paramêtres de l'interface - + Theme: Thème : - + Language: Langue : - + Smileys - + Smiley pack: - + Mirror mode - + Messages font size: - + Restart app to apply settings - + Restart required - + Select unread messages notification color - + Compact contact list @@ -805,22 +825,22 @@ Version : 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 @@ -828,72 +848,72 @@ Version : privacySettings - + Privacy settings Paramêtres de confidentialité - + Save chat history Sauvegarder l'historique de 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 Activer l'auto-réception - + Chat history Historique de chat - + History will be cleaned! Continue? L'Historique va être nettoyé ! Confirmer ? - + Blocked users: Utilisateurs bloqués : - + Unblock Débloquer - + Block user Bloquer l'utilisateur - + Add to friend list Ajouter à la liste des amis - + Do you want to add this user to friend list? Voulez vous rajouter cet utilisateur à votre liste d'amis ? @@ -903,12 +923,12 @@ Version : Bloquer l'ID TOX : - + Block by public key: - + Save unsent messages only diff --git a/src/translations/ru_RU.qm b/src/translations/ru_RU.qm index 629e9bd..76bc9b3 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 7e62841..0f51862 100644 --- a/src/translations/ru_RU.ts +++ b/src/translations/ru_RU.ts @@ -40,27 +40,27 @@ Отправить запрос - + IPv6 IPv6 - + UDP UDP - + Proxy Прокси - + IP: IP: - + Port: Порт: @@ -70,12 +70,12 @@ Контакты в сети - + HTTP HTTP - + WARNING: using proxy with enabled UDP can produce IP leak @@ -87,47 +87,47 @@ can produce IP leak MainWindow - + Profile Профиль - + Settings Настройки - + About О программе - + Add contact Добавить контакт - + Privacy Приватность - + Interface Интерфейс - + Notifications Уведомления - + Network Сеть - + About program О программе @@ -144,37 +144,37 @@ can produce IP leak Запрос на добавление в друзья - + Choose file Выберите файл - + Disallow auto accept Запретить автоматическое получение файлов - + Allow auto accept Разрешить автоматическое получение файлов - + Set alias Изменить псевдоним - + Clear history Очистить историю Copy public key - Копировать публичный ключ + Копировать публичный ключ - + Remove friend Удалить друга @@ -184,7 +184,7 @@ can produce IP leak Введите новый псевдоним для друга {} или оставьте пустым для использования его имени: - + Audio Аудио @@ -199,7 +199,7 @@ can produce IP leak Друг добавлен - + Toxygen is Tox client written on Python. Version: Toxygen - клиент для мессенджера Tox, написанный на Python. Версия: @@ -225,47 +225,47 @@ Version: Отправить файл - + Send message Отправить сообщение - + Start audio call with friend Начать аудиозвонок с другом - + Plugins Плагины - + List of plugins Список плагинов - + Search Поиск - + All Все - + Online Онлайн - + Notes Заметки - + Notes about user Заметки о пользователе @@ -325,20 +325,35 @@ Version: Удалить сообщение - + Lock Заблокировать - + Cannot lock app Невозможно заблокировать приложение - + Error. Profile password is not set. Ошибка. Пароль профиля не установлен. + + + Name + Имя + + + + Status message + Статус + + + + Public key + Публичный ключ + MenuWindow @@ -391,12 +406,12 @@ Version: NetworkSettings - + Network settings Настройки сети - + Restart TOX core Перезапустить ядро TOX @@ -417,42 +432,42 @@ Version: PluginsForm - + Plugins Плагины - + Open selected plugin Открыть выбранный плагин - + No GUI found for this plugin GUI для данного плагина не найден - + No description available Описание недоступно - + Disable plugin Отключить плагин - + Enable plugin Включить плагин - + No plugins found Плагины не найдены - + Error Ошибка @@ -460,32 +475,32 @@ Version: ProfileSettingsForm - + Export profile Экспорт профиля - + Profile settings Настройки профиля - + Name: Имя: - + Status: Статус: - + TOX ID: TOX ID: - + Copy TOX ID Копировать TOX ID @@ -495,163 +510,188 @@ Version: Язык: - + New avatar Новый аватар - + Reset avatar Сбросить аватар - + New NoSpam Новый NoSpam - + Profile password Пароль профиля - + Password (at least 8 symbols) Пароль (минимум 8 символов) - + Confirm password Подтверждение пароля - + Set password Изменить пароль - + Passwords do not match Пароли не совпадают - + Leaving blank will reset current password Пустое поле сбросит текущий пароль - + There is no way to recover lost passwords Восстановление забытых паролей не поддерживается - + Password must be at least 8 symbols Пароль должен быть длиной не менее 8 символов - + Choose avatar Выбрать аватар - + Online Онлайн - + Away Нет на месте - + Busy Занят - + Mark as not default profile Отключить автозагрузку профиля - + Mark as default profile Сделать профилем по умолчанию + + + Copy public key + Копировать публичный ключ + WelcomeScreen - + Don't show again Не показывать снова - + Tip of the day Подсказка дня - + Press Esc if you want hide app to tray. Нажатие Esc сворачивает приложение в трей. Right click on screenshot button hides app to tray during screenshot - Правый клик на кнопке скриншота сворачивает приложение в трей на время скриншота + Правый клик на кнопке скриншота сворачивает приложение в трей на время скриншота - + You can use Tox over Tor. For more info read <a href="https://wiki.tox.chat/users/tox_over_tor_tot">this post</a> Вы можете использовать Tox через Tor. Дополнительная информация <a href="https://wiki.tox.chat/users/tox_over_tor_tot">тут</a> Use Settings -> Interface to customize interface - Используйте Настройки -> Интерфейс для настройки интерфейса + Используйте Настройки -> Интерфейс для настройки интерфейса - + Set profile password via Profile -> Settings. Password allows Toxygen encrypt your history and settings. Установите пароль профиля: Профиль -> Настройки. Пароль позволяет шифровать историю переписки и настройки. - + Since v0.1.3 Toxygen supports plugins. <a href="https://github.com/xveduk/toxygen/blob/master/docs/plugins.md">Read more</a> С версии 0.1.3 Toxygen поддерживает плагины. <a href="https://github.com/xveduk/toxygen/blob/master/docs/plugins.md">Узнать больше.</a> - + New in Toxygen v0.2.2:<br>Users can lock application using profile password.<br>Compact contact list support<br>Bug fixes<br>Tox DNS improvements С версии 0.1.3 Toxygen поддерживает плагины. <a href="https://github.com/xveduk/toxygen/blob/master/docs/plugins.md">Узнать больше.</a> Toxygen supports faux offline messages and file transfers. Send message or file to offline friend and he will get it later - Toxygen поддерживает псевдооффлайн сообщения и файл трансферы + Toxygen поддерживает псевдооффлайн сообщения и файл трансферы Set new NoSpam to avoid spam friend requests: Profile -> Settings -> Set new NoSpam - Установите новый NoSpam, чтобы избежать спам запросов в друзья: Профиль->Настройки->Новый NoSpam + Установите новый NoSpam, чтобы избежать спам запросов в друзья: Профиль->Настройки->Новый NoSpam + + + + Right click on screenshot button hides app to tray during screenshot. + Правый клик на кнопке скриншота сворачивает приложение в трей на время скриншота. + + + + Use Settings -> Interface to customize interface. + Используйте Настройки -> Интерфейс для настройки интерфейса. + + + + Toxygen supports faux offline messages and file transfers. Send message or file to offline friend and he will get it later. + Toxygen поддерживает псевдооффлайн сообщения и файл трансферы. + + + + Set new NoSpam to avoid spam friend requests: Profile -> Settings -> Set new NoSpam. + Установите новый NoSpam, чтобы избежать спам запросов в друзья: Профиль->Настройки->Новый NoSpam. audioSettingsForm - + Audio settings Настройки аудио - + Input device: Устройство ввода: - + Output device: Устройство вывода: @@ -692,57 +732,57 @@ Version: interfaceForm - + Interface settings Настройки интерфейса - + Theme: Тема: - + Language: Язык: - + Smileys Смайлики - + Smiley pack: Набор смайликов: - + Mirror mode Зеркальный режим - + Messages font size: Размер шрифта сообщений: - + Restart app to apply settings Для применения настроек необходимо перезапустить приложение - + Restart required Требуется перезапуск - + Select unread messages notification color Цвет уведомления о сообщении - + Compact contact list Компактный список контактов @@ -808,22 +848,22 @@ Version: notificationsForm - + Notification settings Настройки уведомлений - + Enable notifications Включить уведомления - + Enable call's sound Включить звук звонка - + Enable sound notifications Включить звуковые уведомления @@ -832,72 +872,72 @@ Version: 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? История переписки будет очищена! Продолжить? - + Blocked users: Заблокированные пользователи: - + Unblock Разблокировать - + Block user Заблокировать пользователя - + Add to friend list Добавить в список друзей - + Do you want to add this user to friend list? Добавить этого пользователя в список друзей? @@ -907,12 +947,12 @@ Version: Блокировать по TOX ID: - + Block by public key: Блокировать по публичному ключу: - + Save unsent messages only Сохранять только неотправленные сообщения