diff --git a/src/mainscreen.py b/src/mainscreen.py index 1df35b5..f3d3095 100644 --- a/src/mainscreen.py +++ b/src/mainscreen.py @@ -168,7 +168,7 @@ class MainWindow(QtGui.QMainWindow): self.online_contacts.setObjectName("online_contacts") self.online_contacts.clicked.connect(self.filtering) self.contact_name = QtGui.QLineEdit(Form) - self.contact_name.setGeometry(QtCore.QRect(0, 24, 270, 25)) + self.contact_name.setGeometry(QtCore.QRect(0, 23, 270, 26)) self.contact_name.setObjectName("contact_name") self.contact_name.textChanged.connect(self.filtering) QtCore.QMetaObject.connectSlotsByName(Form) @@ -340,7 +340,8 @@ class MainWindow(QtGui.QMainWindow): import util msgBox = QtGui.QMessageBox() msgBox.setWindowTitle(QtGui.QApplication.translate("MainWindow", "About", None, QtGui.QApplication.UnicodeUTF8)) - msgBox.setText(QtGui.QApplication.translate("MainWindow", 'Toxygen is Tox client written on Python 2.7. Version: ', None, QtGui.QApplication.UnicodeUTF8) + util.program_version) + text = (QtGui.QApplication.translate("MainWindow", 'Toxygen is Tox client written on Python.\nVersion: ', None, QtGui.QApplication.UnicodeUTF8)) + msgBox.setText(text + util.program_version + '\nGitHub: github.com/xveduk/toxygen') msgBox.exec_() def network_settings(self): diff --git a/src/menu.py b/src/menu.py index 2140bf0..02c6c16 100644 --- a/src/menu.py +++ b/src/menu.py @@ -38,12 +38,17 @@ class AddContact(CenteredWidget): self.message_edit = QtGui.QTextEdit(self) self.message_edit.setGeometry(QtCore.QRect(50, 110, 471, 151)) self.message_edit.setObjectName("textEdit") - self.label_2 = QtGui.QLabel(self) - self.label_2.setGeometry(QtCore.QRect(60, 70, 101, 31)) - self.label_2.setFont(font) - self.label_2.setObjectName("label_2") + self.message = QtGui.QLabel(self) + self.message.setGeometry(QtCore.QRect(60, 70, 101, 31)) + self.message.setFont(font) + self.message.setObjectName("label_2") self.retranslateUi() self.message_edit.setText('Hello! Add me to your contact list please') + font = QtGui.QFont() + font.setPointSize(12) + font.setBold(True) + self.label.setFont(font) + self.message.setFont(font) QtCore.QMetaObject.connectSlotsByName(self) def add_friend(self): @@ -59,7 +64,7 @@ class AddContact(CenteredWidget): self.setWindowTitle(QtGui.QApplication.translate('AddContact', "Add contact", None, QtGui.QApplication.UnicodeUTF8)) self.sendRequestButton.setText(QtGui.QApplication.translate("Form", "Send request", None, QtGui.QApplication.UnicodeUTF8)) self.label.setText(QtGui.QApplication.translate('AddContact', "TOX ID:", None, QtGui.QApplication.UnicodeUTF8)) - self.label_2.setText(QtGui.QApplication.translate('AddContact', "Message:", None, QtGui.QApplication.UnicodeUTF8)) + self.message.setText(QtGui.QApplication.translate('AddContact', "Message:", None, QtGui.QApplication.UnicodeUTF8)) class ProfileSettings(CenteredWidget): @@ -82,7 +87,7 @@ class ProfileSettings(CenteredWidget): self.status.setObjectName("status") self.status.setText(profile.status_message) self.label = QtGui.QLabel(self) - self.label.setGeometry(QtCore.QRect(40, 30, 91, 21)) + self.label.setGeometry(QtCore.QRect(40, 30, 91, 25)) font = QtGui.QFont() font.setPointSize(18) font.setWeight(75) @@ -90,11 +95,11 @@ class ProfileSettings(CenteredWidget): self.label.setFont(font) self.label.setObjectName("label") self.label_2 = QtGui.QLabel(self) - self.label_2.setGeometry(QtCore.QRect(40, 100, 100, 21)) + self.label_2.setGeometry(QtCore.QRect(40, 100, 100, 25)) self.label_2.setFont(font) self.label_2.setObjectName("label_2") self.label_3 = QtGui.QLabel(self) - self.label_3.setGeometry(QtCore.QRect(40, 180, 100, 21)) + self.label_3.setGeometry(QtCore.QRect(40, 180, 100, 25)) self.label_3.setFont(font) self.label_3.setObjectName("label_3") self.tox_id = QtGui.QLabel(self) @@ -139,6 +144,10 @@ class ProfileSettings(CenteredWidget): clipboard = QtGui.QApplication.clipboard() profile = Profile.get_instance() clipboard.setText(profile.tox_id) + pixmap = QtGui.QPixmap(curr_directory() + '/images/accept.png') + icon = QtGui.QIcon(pixmap) + self.copyId.setIcon(icon) + self.copyId.setIconSize(QtCore.QSize(10, 10)) def new_no_spam(self): self.tox_id.setText(Profile.get_instance().new_nospam()) @@ -148,7 +157,6 @@ class ProfileSettings(CenteredWidget): def set_avatar(self): name = QtGui.QFileDialog.getOpenFileName(self, 'Open file', None, 'Image Files (*.png)') - print name if name[0]: with open(name[0], 'rb') as f: data = f.read() diff --git a/src/profile.py b/src/profile.py index 2283c56..f9a0290 100644 --- a/src/profile.py +++ b/src/profile.py @@ -805,6 +805,11 @@ class Profile(Contact, Singleton): raise Exception('TOX DNS lookup failed') if len(tox_id) == TOX_PUBLIC_KEY_SIZE * 2: # public key self.add_friend(tox_id) + msgBox = QtGui.QMessageBox() + msgBox.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Friend added", None, QtGui.QApplication.UnicodeUTF8)) + text = (QtGui.QApplication.translate("MainWindow", 'Friend added without sending friend request', None, QtGui.QApplication.UnicodeUTF8)) + msgBox.setText(text) + msgBox.exec_() else: result = self._tox.friend_add(tox_id, message.encode('utf-8')) tox_id = tox_id[:TOX_PUBLIC_KEY_SIZE * 2] diff --git a/src/translations/en_GB.qm b/src/translations/en_GB.qm index 66a5e10..f671d88 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 ff56d4b..736dbca 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,32 +22,32 @@ Form - + Send request Send request - + IPv6 IPv6 - + UDP UDP - + Proxy Proxy - + IP: IP: - + Port: Port: @@ -57,7 +57,7 @@ Online contacts - + HTTP HTTP @@ -75,7 +75,7 @@ - + About @@ -110,58 +110,53 @@ - + User {} wants to add you to contact list. Message: {} - + Friend request - - Toxygen is Tox client written on Python 2.7. Version: - - - - + Choose file 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: @@ -175,16 +170,33 @@ Find contact Find contact + + + Friend added + Friend added + + + + Toxygen is Tox client written on Python. +Version: + Toxygen is Tox client written on Python. +Version: + + + + Friend added without sending friend request + Friend added without sending friend request + NetworkSettings - + Network settings Network settings - + Restart TOX core Restart Tox core @@ -192,60 +204,65 @@ ProfileSettingsForm - + Export profile - + Profile settings - + Name: - + Status: - + TOX ID: - + Copy TOX ID - + New avatar - + Reset avatar + + + New NoSpam + New NoSpam + audioSettingsForm - + Audio settings Audio settings - + Input device: Input device: - + Output device: Output device: @@ -253,12 +270,12 @@ incoming_call - + Incoming video call Incoming video call - + Incoming audio call Incoming audio call @@ -266,17 +283,17 @@ interfaceForm - + Interface settings - + Theme: - + Language: @@ -324,7 +341,7 @@ - + Looks like other instance of Toxygen uses this profile! Continue? @@ -332,22 +349,22 @@ notificationsForm - + Notification settings - + Enable notifications - + Enable call's sound - + Enable sound notifications @@ -355,77 +372,77 @@ 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? - + Block by TOX ID: Block by TOX ID: @@ -433,12 +450,12 @@ tray - + Open Toxygen - + Exit diff --git a/src/translations/fr_FR.ts b/src/translations/fr_FR.ts index ead4d23..20f3798 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,32 +21,32 @@ Form - + Send request Envoyer une demande - + IPv6 IPv6 - + UDP UDP - + Proxy Proxy - + IP: IP : - + Port: Port : @@ -56,7 +56,7 @@ Contacts connectés - + HTTP @@ -74,7 +74,7 @@ Paramêtres - + About À Propos @@ -109,58 +109,58 @@ À 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 : + 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: @@ -174,16 +174,32 @@ Find contact + + + Friend added + + + + + Toxygen is Tox client written on Python. +Version: + + + + + Friend added without sending friend request + + NetworkSettings - + Network settings Paramêtres réseaux - + Restart TOX core @@ -191,60 +207,65 @@ 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 + + audioSettingsForm - + Audio settings - + Input device: - + Output device: @@ -252,12 +273,12 @@ incoming_call - + Incoming video call - + Incoming audio call @@ -265,17 +286,17 @@ interfaceForm - + Interface settings Paramêtres de l'interface - + Theme: Thème : - + Language: Langue : @@ -323,7 +344,7 @@ toxygen - + Looks like other instance of Toxygen uses this profile! Continue? Il semble qu'une autre instance de Toxygen utilise ce profil ! Continuer ? @@ -331,22 +352,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 @@ -354,77 +375,77 @@ 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? - + Blocked users: - + Unblock - + Block user - + Add to friend list - + Do you want to add this user to friend list? - + Block by TOX ID: @@ -432,12 +453,12 @@ tray - + Open Toxygen Ouvrir Toxygen - + Exit Quitter diff --git a/src/translations/ru_RU.qm b/src/translations/ru_RU.qm index 1328cce..2e9dd40 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 9a6be14..02156aa 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,32 +22,32 @@ Form - + Send request Отправить запрос - + IPv6 IPv6 - + UDP UDP - + Proxy Прокси - + IP: IP: - + Port: Порт: @@ -57,7 +57,7 @@ Контакты в сети - + HTTP HTTP @@ -75,7 +75,7 @@ Настройки - + About О программе @@ -110,59 +110,54 @@ О программе - + 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: Введите новый псевдоним для друга {} или оставьте пустым для использования его имени: @@ -176,16 +171,32 @@ Find contact Найти контакт + + + Friend added + Друг добавлен + + + + Toxygen is Tox client written on Python. +Version: + Toxygen - клиент для мессенджера Tox, написанный на Python. Версия: + + + + Friend added without sending friend request + Друг добавлен без отправки запроса на добавление в друзья + NetworkSettings - + Network settings Настройки сети - + Restart TOX core Перезапустить ядро TOX @@ -193,32 +204,32 @@ ProfileSettingsForm - + Export profile Экспорт профиля - + Profile settings Настройки профиля - + Name: Имя: - + Status: Статус: - + TOX ID: TOX ID: - + Copy TOX ID Копировать TOX ID @@ -228,30 +239,35 @@ Язык: - + New avatar Новый аватар - + Reset avatar Сбросить аватар + + + New NoSpam + Новый NoSpam + audioSettingsForm - + Audio settings Настройки аудио - + Input device: Устройство ввода: - + Output device: Устройство вывода: @@ -259,12 +275,12 @@ incoming_call - + Incoming video call Входящий видеозвонок - + Incoming audio call Входящий аудиозвонок @@ -272,17 +288,17 @@ interfaceForm - + Interface settings Настройки интерфейса - + Theme: Тема: - + Language: Язык: @@ -330,7 +346,7 @@ toxygen - + Looks like other instance of Toxygen uses this profile! Continue? Похоже, что этот профиль используется другим экземпляром Toxygen! Продолжить? @@ -338,22 +354,22 @@ notificationsForm - + Notification settings Настройки уведомлений - + Enable notifications Включить уведомления - + Enable call's sound Включить звук звонка - + Enable sound notifications Включить звуковые уведомления @@ -362,77 +378,77 @@ 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? Добавить этого пользователя в список друзей? - + Block by TOX ID: Блокировать по TOX ID: @@ -440,12 +456,12 @@ tray - + Open Toxygen Открыть Toxygen - + Exit Выход