contact blocking, friend requests fix, translations update

This commit is contained in:
ingvar1995 2016-04-25 15:48:56 +03:00
parent 9b02089bff
commit f8eb1462e1
11 changed files with 245 additions and 97 deletions

View file

@ -130,9 +130,12 @@ def friend_request(tox, public_key, message, message_size, user_data):
""" """
Called when user get new friend request Called when user get new friend request
""" """
print 'Friend request'
profile = Profile.get_instance() profile = Profile.get_instance()
tox_id = bin_to_string(public_key, TOX_PUBLIC_KEY_SIZE) key = ''.join(chr(x) for x in public_key[:TOX_PUBLIC_KEY_SIZE])
invoke_in_main_thread(profile.process_friend_request, tox_id, message.decode('utf-8')) tox_id = bin_to_string(key, TOX_PUBLIC_KEY_SIZE)
if tox_id not in Settings.get_instance()['blocked']:
invoke_in_main_thread(profile.process_friend_request, tox_id, message.decode('utf-8'))
# ----------------------------------------------------------------------------------------------------------------- # -----------------------------------------------------------------------------------------------------------------
# Callbacks - file transfers # Callbacks - file transfers

View file

@ -67,7 +67,7 @@ class AV(object):
rate=self._audio_rate, rate=self._audio_rate,
channels=self._audio_channels, channels=self._audio_channels,
input=True, input=True,
input_device_index=settings.Settings().get_instance().audio['input'], input_device_index=settings.Settings.get_instance().audio['input'],
frames_per_buffer=self._audio_sample_count * 10) frames_per_buffer=self._audio_sample_count * 10)
self._audio_thread = threading.Thread(target=self.send_audio) self._audio_thread = threading.Thread(target=self.send_audio)
@ -100,7 +100,7 @@ class AV(object):
self._out_stream = self._audio.open(format=pyaudio.paInt16, self._out_stream = self._audio.open(format=pyaudio.paInt16,
channels=channels_count, channels=channels_count,
rate=rate, rate=rate,
output_device_index=settings.Settings().get_instance().audio['output'], output_device_index=settings.Settings.get_instance().audio['output'],
output=True) output=True)
self._out_stream.write(samples) self._out_stream.write(samples)

View file

@ -255,9 +255,9 @@ class PrivacySettings(CenteredWidget):
def initUI(self): def initUI(self):
self.setObjectName("privacySettings") self.setObjectName("privacySettings")
self.resize(350, 400) self.resize(350, 550)
self.setMinimumSize(QtCore.QSize(350, 400)) self.setMinimumSize(QtCore.QSize(350, 550))
self.setMaximumSize(QtCore.QSize(350, 400)) self.setMaximumSize(QtCore.QSize(350, 550))
self.saveHistory = QtGui.QCheckBox(self) self.saveHistory = QtGui.QCheckBox(self)
self.saveHistory.setGeometry(QtCore.QRect(40, 20, 291, 22)) self.saveHistory.setGeometry(QtCore.QRect(40, 20, 291, 22))
self.saveHistory.setObjectName("saveHistory") self.saveHistory.setObjectName("saveHistory")
@ -275,10 +275,9 @@ class PrivacySettings(CenteredWidget):
self.auto_path = QtGui.QLabel(self) self.auto_path = QtGui.QLabel(self)
self.auto_path.setGeometry(QtCore.QRect(40, 190, 350, 30)) self.auto_path.setGeometry(QtCore.QRect(40, 190, 350, 30))
self.path = QtGui.QPlainTextEdit(self) self.path = QtGui.QPlainTextEdit(self)
self.path.setGeometry(QtCore.QRect(10, 240, 330, 30)) self.path.setGeometry(QtCore.QRect(10, 225, 330, 45))
self.change_path = QtGui.QPushButton(self) self.change_path = QtGui.QPushButton(self)
self.change_path.setGeometry(QtCore.QRect(125, 280, 100, 30)) self.change_path.setGeometry(QtCore.QRect(10, 280, 330, 30))
self.retranslateUi()
settings = Settings.get_instance() settings = Settings.get_instance()
self.typingNotifications.setChecked(settings['typing_notifications']) self.typingNotifications.setChecked(settings['typing_notifications'])
self.fileautoaccept.setChecked(settings['allow_auto_accept']) self.fileautoaccept.setChecked(settings['allow_auto_accept'])
@ -286,6 +285,22 @@ class PrivacySettings(CenteredWidget):
self.inlines.setChecked(settings['allow_inline']) self.inlines.setChecked(settings['allow_inline'])
self.path.setPlainText(settings['auto_accept_path'] or curr_directory()) self.path.setPlainText(settings['auto_accept_path'] or curr_directory())
self.change_path.clicked.connect(self.new_path) self.change_path.clicked.connect(self.new_path)
self.block_user_label = QtGui.QLabel(self)
self.block_user_label.setGeometry(QtCore.QRect(10, 320, 330, 30))
self.block_id = QtGui.QPlainTextEdit(self)
self.block_id.setGeometry(QtCore.QRect(10, 350, 330, 30))
self.block = QtGui.QPushButton(self)
self.block.setGeometry(QtCore.QRect(10, 390, 330, 30))
self.block.clicked.connect(lambda: Profile.get_instance().block_user(self.block_id.toPlainText()) or self.close())
self.blocked_users_label = QtGui.QLabel(self)
self.blocked_users_label.setGeometry(QtCore.QRect(10, 430, 330, 30))
self.comboBox = QtGui.QComboBox(self)
self.comboBox.setGeometry(QtCore.QRect(10, 460, 330, 30))
self.comboBox.addItems(settings['blocked'])
self.unblock = QtGui.QPushButton(self)
self.unblock.setGeometry(QtCore.QRect(10, 500, 330, 30))
self.unblock.clicked.connect(lambda: self.unblock_user())
self.retranslateUi()
QtCore.QMetaObject.connectSlotsByName(self) QtCore.QMetaObject.connectSlotsByName(self)
def retranslateUi(self): def retranslateUi(self):
@ -296,6 +311,19 @@ class PrivacySettings(CenteredWidget):
self.auto_path.setText(QtGui.QApplication.translate("privacySettings", "Auto accept default path:", None, QtGui.QApplication.UnicodeUTF8)) self.auto_path.setText(QtGui.QApplication.translate("privacySettings", "Auto accept default path:", None, QtGui.QApplication.UnicodeUTF8))
self.change_path.setText(QtGui.QApplication.translate("privacySettings", "Change", None, QtGui.QApplication.UnicodeUTF8)) self.change_path.setText(QtGui.QApplication.translate("privacySettings", "Change", None, QtGui.QApplication.UnicodeUTF8))
self.inlines.setText(QtGui.QApplication.translate("privacySettings", "Allow inlines", None, QtGui.QApplication.UnicodeUTF8)) self.inlines.setText(QtGui.QApplication.translate("privacySettings", "Allow inlines", None, QtGui.QApplication.UnicodeUTF8))
self.block_user_label.setText(QtGui.QApplication.translate("privacySettings", "Block by TOX ID:", None, QtGui.QApplication.UnicodeUTF8))
self.blocked_users_label.setText(QtGui.QApplication.translate("privacySettings", "Blocked users:", None, QtGui.QApplication.UnicodeUTF8))
self.unblock.setText(QtGui.QApplication.translate("privacySettings", "Unblock", None, QtGui.QApplication.UnicodeUTF8))
self.block.setText(QtGui.QApplication.translate("privacySettings", "Block user", None, QtGui.QApplication.UnicodeUTF8))
def unblock_user(self):
if not self.comboBox.count():
return
title = QtGui.QApplication.translate("privacySettings", "Add to friend list", None, QtGui.QApplication.UnicodeUTF8)
info = QtGui.QApplication.translate("privacySettings", "Do you want to add this user to friend list?", None, QtGui.QApplication.UnicodeUTF8)
reply = QtGui.QMessageBox.question(None, title, info, QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
Profile.get_instance().unblock_user(self.comboBox.currentText(), reply == QtGui.QMessageBox.Yes)
self.close()
def closeEvent(self, event): def closeEvent(self, event):
settings = Settings.get_instance() settings = Settings.get_instance()

View file

@ -144,7 +144,8 @@ class Friend(Contact):
def __del__(self): def __del__(self):
self.set_visibility(False) self.set_visibility(False)
del self._widget del self._widget
del self._message_getter if hasattr(self, '_message_getter'):
del self._message_getter
# ----------------------------------------------------------------------------------------------------------------- # -----------------------------------------------------------------------------------------------------------------
# History support # History support
@ -626,7 +627,7 @@ class Profile(Contact, Singleton):
self._messages.setItemWidget(elem, item) self._messages.setItemWidget(elem, item)
# ----------------------------------------------------------------------------------------------------------------- # -----------------------------------------------------------------------------------------------------------------
# Work with friends (remove, set alias, get public key) # Work with friends (remove, block, set alias, get public key)
# ----------------------------------------------------------------------------------------------------------------- # -----------------------------------------------------------------------------------------------------------------
def set_alias(self, num): def set_alias(self, num):
@ -686,6 +687,40 @@ class Profile(Contact, Singleton):
else: else:
self.set_active(0) self.set_active(0)
def add_friend(self, tox_id):
num = self._tox.friend_add_norequest(tox_id) # num - friend number
item = self.create_friend_item()
try:
if not self._history.friend_exists_in_db(tox_id):
self._history.add_friend_to_db(tox_id)
message_getter = self._history.messages_getter(tox_id)
except Exception as ex: # something is wrong
log('Accept friend request failed! ' + str(ex))
message_getter = None
friend = Friend(message_getter, num, tox_id, '', item, tox_id)
self._friends.append(friend)
def block_user(self, tox_id):
tox_id = tox_id[:TOX_PUBLIC_KEY_SIZE * 2]
if tox_id == self.tox_id[:TOX_PUBLIC_KEY_SIZE * 2]:
return
settings = Settings.get_instance()
if tox_id not in settings['blocked']:
settings['blocked'].append(tox_id)
settings.save()
try:
num = self._tox.friend_by_public_key(tox_id)
self.delete_friend(num)
except: # not in friend list
pass
def unblock_user(self, tox_id, add_to_friend_list):
s = Settings.get_instance()
s['blocked'].remove(tox_id)
s.save()
if add_to_friend_list:
self.add_friend(tox_id)
# ----------------------------------------------------------------------------------------------------------------- # -----------------------------------------------------------------------------------------------------------------
# Friend requests # Friend requests
# ----------------------------------------------------------------------------------------------------------------- # -----------------------------------------------------------------------------------------------------------------
@ -728,16 +763,7 @@ class Profile(Contact, Singleton):
fr_req = QtGui.QApplication.translate('MainWindow', 'Friend request', None, QtGui.QApplication.UnicodeUTF8) fr_req = QtGui.QApplication.translate('MainWindow', 'Friend request', None, QtGui.QApplication.UnicodeUTF8)
reply = QtGui.QMessageBox.question(None, fr_req, info, QtGui.QMessageBox.Yes, QtGui.QMessageBox.No) reply = QtGui.QMessageBox.question(None, fr_req, info, QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
if reply == QtGui.QMessageBox.Yes: # accepted if reply == QtGui.QMessageBox.Yes: # accepted
num = self._tox.friend_add_norequest(tox_id) # num - friend number self.add_friend(tox_id)
item = self.create_friend_item()
try:
if not self._history.friend_exists_in_db(tox_id):
self._history.add_friend_to_db(tox_id)
message_getter = self._history.messages_getter(tox_id)
except Exception as ex: # something is wrong
log('Accept friend request failed! ' + str(ex))
friend = Friend(message_getter, num, tox_id, '', item, tox_id)
self._friends.append(friend)
except Exception as ex: # something is wrong except Exception as ex: # something is wrong
log('Accept friend request failed! ' + str(ex)) log('Accept friend request failed! ' + str(ex))

View file

@ -8,7 +8,7 @@ import pyaudio
class Settings(Singleton, dict): class Settings(Singleton, dict):
def __init__(self, name=''): def __init__(self, name):
self.path = ProfileHelper.get_path() + str(name) + '.json' self.path = ProfileHelper.get_path() + str(name) + '.json'
self.name = name self.name = name
if os.path.isfile(self.path): if os.path.isfile(self.path):
@ -79,6 +79,7 @@ class Settings(Singleton, dict):
default = Settings.get_default_settings() default = Settings.get_default_settings()
for key in default: for key in default:
if key not in self: if key not in self:
print key
self[key] = default[key] self[key] = default[key]
self.save() self.save()

View file

@ -984,13 +984,13 @@ class Tox(object):
This event is triggered when a friend request is received. This event is triggered when a friend request is received.
:param callback: Python function. Should take pointer (c_void_p) to Tox object, :param callback: Python function. Should take pointer (c_void_p) to Tox object,
The Public Key (c_char_p) of the user who sent the friend request, The Public Key (c_uint8 array) of the user who sent the friend request,
The message (c_char_p) they sent along with the request, The message (c_char_p) they sent along with the request,
The size (c_size_t) of the message byte array, The size (c_size_t) of the message byte array,
pointer (c_void_p) to user_data pointer (c_void_p) to user_data
:param user_data: pointer (c_void_p) to user data :param user_data: pointer (c_void_p) to user data
""" """
c_callback = CFUNCTYPE(None, c_void_p, c_char_p, c_char_p, c_size_t, c_void_p) c_callback = CFUNCTYPE(None, c_void_p, POINTER(c_uint8), c_char_p, c_size_t, c_void_p)
self.friend_request_cb = c_callback(callback) self.friend_request_cb = c_callback(callback)
Tox.libtoxcore.tox_callback_friend_request(self._tox_pointer, self.friend_request_cb, c_void_p(user_data)) Tox.libtoxcore.tox_callback_friend_request(self._tox_pointer, self.friend_request_cb, c_void_p(user_data))

Binary file not shown.

View file

@ -105,13 +105,13 @@
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="profile.py" line="724"/> <location filename="profile.py" line="762"/>
<source>User {} wants to add you to contact list. Message: <source>User {} wants to add you to contact list. Message:
{}</source> {}</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="profile.py" line="726"/> <location filename="profile.py" line="764"/>
<source>Friend request</source> <source>Friend request</source>
<translation></translation> <translation></translation>
</message> </message>
@ -156,7 +156,7 @@
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="profile.py" line="635"/> <location filename="profile.py" line="639"/>
<source>Enter new alias for friend {} or leave empty to use friend&apos;s name:</source> <source>Enter new alias for friend {} or leave empty to use friend&apos;s name:</source>
<translation>Enter new alias for friend {} or leave empty to use friend&apos;s name:</translation> <translation>Enter new alias for friend {} or leave empty to use friend&apos;s name:</translation>
</message> </message>
@ -225,17 +225,17 @@
<context> <context>
<name>audioSettingsForm</name> <name>audioSettingsForm</name>
<message> <message>
<location filename="menu.py" line="476"/> <location filename="menu.py" line="504"/>
<source>Audio settings</source> <source>Audio settings</source>
<translation>Audio settings</translation> <translation>Audio settings</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="477"/> <location filename="menu.py" line="505"/>
<source>Input device:</source> <source>Input device:</source>
<translation>Input device:</translation> <translation>Input device:</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="478"/> <location filename="menu.py" line="506"/>
<source>Output device:</source> <source>Output device:</source>
<translation>Output device:</translation> <translation>Output device:</translation>
</message> </message>
@ -243,12 +243,12 @@
<context> <context>
<name>incoming_call</name> <name>incoming_call</name>
<message> <message>
<location filename="profile.py" line="1001"/> <location filename="profile.py" line="1041"/>
<source>Incoming video call</source> <source>Incoming video call</source>
<translation>Incoming video call</translation> <translation>Incoming video call</translation>
</message> </message>
<message> <message>
<location filename="profile.py" line="1003"/> <location filename="profile.py" line="1043"/>
<source>Incoming audio call</source> <source>Incoming audio call</source>
<translation>Incoming audio call</translation> <translation>Incoming audio call</translation>
</message> </message>
@ -256,17 +256,17 @@
<context> <context>
<name>interfaceForm</name> <name>interfaceForm</name>
<message> <message>
<location filename="menu.py" line="414"/> <location filename="menu.py" line="442"/>
<source>Interface settings</source> <source>Interface settings</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="415"/> <location filename="menu.py" line="443"/>
<source>Theme:</source> <source>Theme:</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="416"/> <location filename="menu.py" line="444"/>
<source>Language:</source> <source>Language:</source>
<translation></translation> <translation></translation>
</message> </message>
@ -322,22 +322,22 @@
<context> <context>
<name>notificationsForm</name> <name>notificationsForm</name>
<message> <message>
<location filename="menu.py" line="355"/> <location filename="menu.py" line="383"/>
<source>Notification settings</source> <source>Notification settings</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="356"/> <location filename="menu.py" line="384"/>
<source>Enable notifications</source> <source>Enable notifications</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="357"/> <location filename="menu.py" line="385"/>
<source>Enable call&apos;s sound</source> <source>Enable call&apos;s sound</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="358"/> <location filename="menu.py" line="386"/>
<source>Enable sound notifications</source> <source>Enable sound notifications</source>
<translation></translation> <translation></translation>
</message> </message>
@ -345,50 +345,80 @@
<context> <context>
<name>privacySettings</name> <name>privacySettings</name>
<message> <message>
<location filename="menu.py" line="292"/> <location filename="menu.py" line="307"/>
<source>Privacy settings</source> <source>Privacy settings</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="293"/> <location filename="menu.py" line="308"/>
<source>Save chat history</source> <source>Save chat history</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="294"/> <location filename="menu.py" line="309"/>
<source>Allow file auto accept</source> <source>Allow file auto accept</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="295"/> <location filename="menu.py" line="310"/>
<source>Send typing notifications</source> <source>Send typing notifications</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="296"/> <location filename="menu.py" line="311"/>
<source>Auto accept default path:</source> <source>Auto accept default path:</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="297"/> <location filename="menu.py" line="312"/>
<source>Change</source> <source>Change</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="298"/> <location filename="menu.py" line="313"/>
<source>Allow inlines</source> <source>Allow inlines</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="308"/> <location filename="menu.py" line="336"/>
<source>Chat history</source> <source>Chat history</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="311"/> <location filename="menu.py" line="339"/>
<source>History will be cleaned! Continue?</source> <source>History will be cleaned! Continue?</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="menu.py" line="315"/>
<source>Blocked users:</source>
<translation>Blocked users:</translation>
</message>
<message>
<location filename="menu.py" line="316"/>
<source>Unblock</source>
<translation>Unblock</translation>
</message>
<message>
<location filename="menu.py" line="317"/>
<source>Block user</source>
<translation>Block user</translation>
</message>
<message>
<location filename="menu.py" line="323"/>
<source>Add to friend list</source>
<translation>Add to friend list</translation>
</message>
<message>
<location filename="menu.py" line="324"/>
<source>Do you want to add this user to friend list?</source>
<translation>Do you want to add this user to friend list?</translation>
</message>
<message>
<location filename="menu.py" line="314"/>
<source>Block by TOX ID:</source>
<translation>Block by TOX ID:</translation>
</message>
</context> </context>
<context> <context>
<name>tray</name> <name>tray</name>

View file

@ -104,13 +104,13 @@
<translation>À propos du programme</translation> <translation>À propos du programme</translation>
</message> </message>
<message> <message>
<location filename="profile.py" line="724"/> <location filename="profile.py" line="762"/>
<source>User {} wants to add you to contact list. Message: <source>User {} wants to add you to contact list. Message:
{}</source> {}</source>
<translation>L&apos;Utilisateur {} veut vout rajouter à sa liste de contacts. Message : {}</translation> <translation>L&apos;Utilisateur {} veut vout rajouter à sa liste de contacts. Message : {}</translation>
</message> </message>
<message> <message>
<location filename="profile.py" line="726"/> <location filename="profile.py" line="764"/>
<source>Friend request</source> <source>Friend request</source>
<translation>Demande d&apos;amis</translation> <translation>Demande d&apos;amis</translation>
</message> </message>
@ -155,7 +155,7 @@
<translation>Retirer un ami</translation> <translation>Retirer un ami</translation>
</message> </message>
<message> <message>
<location filename="profile.py" line="635"/> <location filename="profile.py" line="639"/>
<source>Enter new alias for friend {} or leave empty to use friend&apos;s name:</source> <source>Enter new alias for friend {} or leave empty to use friend&apos;s name:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -224,17 +224,17 @@
<context> <context>
<name>audioSettingsForm</name> <name>audioSettingsForm</name>
<message> <message>
<location filename="menu.py" line="476"/> <location filename="menu.py" line="504"/>
<source>Audio settings</source> <source>Audio settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="477"/> <location filename="menu.py" line="505"/>
<source>Input device:</source> <source>Input device:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="478"/> <location filename="menu.py" line="506"/>
<source>Output device:</source> <source>Output device:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -242,12 +242,12 @@
<context> <context>
<name>incoming_call</name> <name>incoming_call</name>
<message> <message>
<location filename="profile.py" line="1001"/> <location filename="profile.py" line="1041"/>
<source>Incoming video call</source> <source>Incoming video call</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="profile.py" line="1003"/> <location filename="profile.py" line="1043"/>
<source>Incoming audio call</source> <source>Incoming audio call</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -255,17 +255,17 @@
<context> <context>
<name>interfaceForm</name> <name>interfaceForm</name>
<message> <message>
<location filename="menu.py" line="414"/> <location filename="menu.py" line="442"/>
<source>Interface settings</source> <source>Interface settings</source>
<translation>Paramêtres de l&apos;interface</translation> <translation>Paramêtres de l&apos;interface</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="415"/> <location filename="menu.py" line="443"/>
<source>Theme:</source> <source>Theme:</source>
<translation>Thème :</translation> <translation>Thème :</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="416"/> <location filename="menu.py" line="444"/>
<source>Language:</source> <source>Language:</source>
<translation>Langue :</translation> <translation>Langue :</translation>
</message> </message>
@ -321,22 +321,22 @@
<context> <context>
<name>notificationsForm</name> <name>notificationsForm</name>
<message> <message>
<location filename="menu.py" line="355"/> <location filename="menu.py" line="383"/>
<source>Notification settings</source> <source>Notification settings</source>
<translation>Paramêtres de notification</translation> <translation>Paramêtres de notification</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="356"/> <location filename="menu.py" line="384"/>
<source>Enable notifications</source> <source>Enable notifications</source>
<translation>Activer les notifications</translation> <translation>Activer les notifications</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="357"/> <location filename="menu.py" line="385"/>
<source>Enable call&apos;s sound</source> <source>Enable call&apos;s sound</source>
<translation>Activer les sons d&apos;appel</translation> <translation>Activer les sons d&apos;appel</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="358"/> <location filename="menu.py" line="386"/>
<source>Enable sound notifications</source> <source>Enable sound notifications</source>
<translation>Activer les sons de notifications</translation> <translation>Activer les sons de notifications</translation>
</message> </message>
@ -344,50 +344,80 @@
<context> <context>
<name>privacySettings</name> <name>privacySettings</name>
<message> <message>
<location filename="menu.py" line="292"/> <location filename="menu.py" line="307"/>
<source>Privacy settings</source> <source>Privacy settings</source>
<translation>Paramêtres de confidentialité</translation> <translation>Paramêtres de confidentialité</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="293"/> <location filename="menu.py" line="308"/>
<source>Save chat history</source> <source>Save chat history</source>
<translation>Sauvegarder l&apos;historique du chat</translation> <translation>Sauvegarder l&apos;historique du chat</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="294"/> <location filename="menu.py" line="309"/>
<source>Allow file auto accept</source> <source>Allow file auto accept</source>
<translation>Autoriser les fichier automatiquement</translation> <translation>Autoriser les fichier automatiquement</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="295"/> <location filename="menu.py" line="310"/>
<source>Send typing notifications</source> <source>Send typing notifications</source>
<translation>Notifier la frappe</translation> <translation>Notifier la frappe</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="296"/> <location filename="menu.py" line="311"/>
<source>Auto accept default path:</source> <source>Auto accept default path:</source>
<translation>Chemin d&apos;accès des fichiers acceptés automatiquement :</translation> <translation>Chemin d&apos;accès des fichiers acceptés automatiquement :</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="297"/> <location filename="menu.py" line="312"/>
<source>Change</source> <source>Change</source>
<translation>Modifier</translation> <translation>Modifier</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="298"/> <location filename="menu.py" line="313"/>
<source>Allow inlines</source> <source>Allow inlines</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="308"/> <location filename="menu.py" line="336"/>
<source>Chat history</source> <source>Chat history</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="311"/> <location filename="menu.py" line="339"/>
<source>History will be cleaned! Continue?</source> <source>History will be cleaned! Continue?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="menu.py" line="315"/>
<source>Blocked users:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="menu.py" line="316"/>
<source>Unblock</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="menu.py" line="317"/>
<source>Block user</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="menu.py" line="323"/>
<source>Add to friend list</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="menu.py" line="324"/>
<source>Do you want to add this user to friend list?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="menu.py" line="314"/>
<source>Block by TOX ID:</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>tray</name> <name>tray</name>

Binary file not shown.

View file

@ -105,14 +105,14 @@
<translation>О программе</translation> <translation>О программе</translation>
</message> </message>
<message> <message>
<location filename="profile.py" line="724"/> <location filename="profile.py" line="762"/>
<source>User {} wants to add you to contact list. Message: <source>User {} wants to add you to contact list. Message:
{}</source> {}</source>
<translation>Пользователь {} хочет добавить Вас в список контактов. Сообщение: <translation>Пользователь {} хочет добавить Вас в список контактов. Сообщение:
{}</translation> {}</translation>
</message> </message>
<message> <message>
<location filename="profile.py" line="726"/> <location filename="profile.py" line="764"/>
<source>Friend request</source> <source>Friend request</source>
<translation>Запрос на добавление в друзья</translation> <translation>Запрос на добавление в друзья</translation>
</message> </message>
@ -157,7 +157,7 @@
<translation>Удалить друга</translation> <translation>Удалить друга</translation>
</message> </message>
<message> <message>
<location filename="profile.py" line="635"/> <location filename="profile.py" line="639"/>
<source>Enter new alias for friend {} or leave empty to use friend&apos;s name:</source> <source>Enter new alias for friend {} or leave empty to use friend&apos;s name:</source>
<translation>Введите новый псевдоним для друга {} или оставьте пустым для использования его имени:</translation> <translation>Введите новый псевдоним для друга {} или оставьте пустым для использования его имени:</translation>
</message> </message>
@ -231,17 +231,17 @@
<context> <context>
<name>audioSettingsForm</name> <name>audioSettingsForm</name>
<message> <message>
<location filename="menu.py" line="476"/> <location filename="menu.py" line="504"/>
<source>Audio settings</source> <source>Audio settings</source>
<translation>Настройки аудио</translation> <translation>Настройки аудио</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="477"/> <location filename="menu.py" line="505"/>
<source>Input device:</source> <source>Input device:</source>
<translation>Устройство ввода:</translation> <translation>Устройство ввода:</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="478"/> <location filename="menu.py" line="506"/>
<source>Output device:</source> <source>Output device:</source>
<translation>Устройство вывода:</translation> <translation>Устройство вывода:</translation>
</message> </message>
@ -249,12 +249,12 @@
<context> <context>
<name>incoming_call</name> <name>incoming_call</name>
<message> <message>
<location filename="profile.py" line="1001"/> <location filename="profile.py" line="1041"/>
<source>Incoming video call</source> <source>Incoming video call</source>
<translation>Входящий видеозвонок</translation> <translation>Входящий видеозвонок</translation>
</message> </message>
<message> <message>
<location filename="profile.py" line="1003"/> <location filename="profile.py" line="1043"/>
<source>Incoming audio call</source> <source>Incoming audio call</source>
<translation>Входящий аудиозвонок</translation> <translation>Входящий аудиозвонок</translation>
</message> </message>
@ -262,17 +262,17 @@
<context> <context>
<name>interfaceForm</name> <name>interfaceForm</name>
<message> <message>
<location filename="menu.py" line="414"/> <location filename="menu.py" line="442"/>
<source>Interface settings</source> <source>Interface settings</source>
<translation>Настройки интерфейса</translation> <translation>Настройки интерфейса</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="415"/> <location filename="menu.py" line="443"/>
<source>Theme:</source> <source>Theme:</source>
<translation>Тема:</translation> <translation>Тема:</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="416"/> <location filename="menu.py" line="444"/>
<source>Language:</source> <source>Language:</source>
<translation>Язык:</translation> <translation>Язык:</translation>
</message> </message>
@ -328,22 +328,22 @@
<context> <context>
<name>notificationsForm</name> <name>notificationsForm</name>
<message> <message>
<location filename="menu.py" line="355"/> <location filename="menu.py" line="383"/>
<source>Notification settings</source> <source>Notification settings</source>
<translation>Настройки уведомлений</translation> <translation>Настройки уведомлений</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="356"/> <location filename="menu.py" line="384"/>
<source>Enable notifications</source> <source>Enable notifications</source>
<translation>Включить уведомления</translation> <translation>Включить уведомления</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="357"/> <location filename="menu.py" line="385"/>
<source>Enable call&apos;s sound</source> <source>Enable call&apos;s sound</source>
<translation>Включить звук звонка</translation> <translation>Включить звук звонка</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="358"/> <location filename="menu.py" line="386"/>
<source>Enable sound notifications</source> <source>Enable sound notifications</source>
<translation>Включить звуковые уведомления <translation>Включить звуковые уведомления
</translation> </translation>
@ -352,50 +352,80 @@
<context> <context>
<name>privacySettings</name> <name>privacySettings</name>
<message> <message>
<location filename="menu.py" line="292"/> <location filename="menu.py" line="307"/>
<source>Privacy settings</source> <source>Privacy settings</source>
<translation>Настройки приватности</translation> <translation>Настройки приватности</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="293"/> <location filename="menu.py" line="308"/>
<source>Save chat history</source> <source>Save chat history</source>
<translation>Сохранять историю переписки</translation> <translation>Сохранять историю переписки</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="294"/> <location filename="menu.py" line="309"/>
<source>Allow file auto accept</source> <source>Allow file auto accept</source>
<translation>Разрешить автополучение файлов</translation> <translation>Разрешить автополучение файлов</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="295"/> <location filename="menu.py" line="310"/>
<source>Send typing notifications</source> <source>Send typing notifications</source>
<translation>Посылать уведомления о наборе текста</translation> <translation>Посылать уведомления о наборе текста</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="296"/> <location filename="menu.py" line="311"/>
<source>Auto accept default path:</source> <source>Auto accept default path:</source>
<translation>Путь автоприема файлов:</translation> <translation>Путь автоприема файлов:</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="297"/> <location filename="menu.py" line="312"/>
<source>Change</source> <source>Change</source>
<translation>Изменить</translation> <translation>Изменить</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="298"/> <location filename="menu.py" line="313"/>
<source>Allow inlines</source> <source>Allow inlines</source>
<translation>Разрешать инлайны</translation> <translation>Разрешать инлайны</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="308"/> <location filename="menu.py" line="336"/>
<source>Chat history</source> <source>Chat history</source>
<translation>История чата</translation> <translation>История чата</translation>
</message> </message>
<message> <message>
<location filename="menu.py" line="311"/> <location filename="menu.py" line="339"/>
<source>History will be cleaned! Continue?</source> <source>History will be cleaned! Continue?</source>
<translation>История переписки будет очищена! Продолжить?</translation> <translation>История переписки будет очищена! Продолжить?</translation>
</message> </message>
<message>
<location filename="menu.py" line="315"/>
<source>Blocked users:</source>
<translation>Заблокированные пользователи:</translation>
</message>
<message>
<location filename="menu.py" line="316"/>
<source>Unblock</source>
<translation>Разблокировать</translation>
</message>
<message>
<location filename="menu.py" line="317"/>
<source>Block user</source>
<translation>Заблокировать пользователя</translation>
</message>
<message>
<location filename="menu.py" line="323"/>
<source>Add to friend list</source>
<translation>Добавить в список друзей</translation>
</message>
<message>
<location filename="menu.py" line="324"/>
<source>Do you want to add this user to friend list?</source>
<translation>Добавить этого пользователя в список друзей?</translation>
</message>
<message>
<location filename="menu.py" line="314"/>
<source>Block by TOX ID:</source>
<translation>Блокировать по TOX ID:</translation>
</message>
</context> </context>
<context> <context>
<name>tray</name> <name>tray</name>