Compare commits
38 Commits
Author | SHA1 | Date | |
---|---|---|---|
ac07cb529f | |||
4f77e2c105 | |||
47ce9252b7 | |||
9153836ead | |||
19fb905554 | |||
3ef581bc5d | |||
f897c7ce8d | |||
ba390eda91 | |||
5fea3e918d | |||
7cc404ce52 | |||
8a502b4082 | |||
b83ea6be18 | |||
85554eacd1 | |||
8bbefff6c7 | |||
019165aeac | |||
0cfb8efefa | |||
b227ed627a | |||
f41b5e5c97 | |||
bc9ec04171 | |||
05e4184c5d | |||
3194099f59 | |||
1a9db79ca2 | |||
21cc5837cf | |||
150942446d | |||
508db0acea | |||
de7f3359b8 | |||
8b56184510 | |||
1d33d298c3 | |||
704344fae2 | |||
3511031aff | |||
481e48f495 | |||
889d3d8f9c | |||
9b4965d591 | |||
5bdbb28e31 | |||
6cafd14883 | |||
9d939e7439 | |||
9e7e9b9012 | |||
2c4301e4f0 |
@ -2,6 +2,7 @@ language: python
|
|||||||
python:
|
python:
|
||||||
- "3.4"
|
- "3.4"
|
||||||
before_install:
|
before_install:
|
||||||
|
- sudo apt-get update
|
||||||
- sudo apt-get install -y checkinstall build-essential
|
- sudo apt-get install -y checkinstall build-essential
|
||||||
- sudo apt-get install portaudio19-dev
|
- sudo apt-get install portaudio19-dev
|
||||||
- sudo apt-get install libconfig-dev libvpx-dev check -qq
|
- sudo apt-get install libconfig-dev libvpx-dev check -qq
|
||||||
|
12
README.md
12
README.md
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
Toxygen is powerful cross-platform [Tox](https://tox.chat/) client written in pure Python3.
|
Toxygen is powerful cross-platform [Tox](https://tox.chat/) client written in pure Python3.
|
||||||
|
|
||||||
[](https://github.com/toxygen-project/toxygen/releases/latest)
|
[](https://github.com/toxygen-project/toxygen/releases/latest)
|
||||||
[](https://github.com/toxygen-project/toxygen/stargazers)
|
[](https://github.com/toxygen-project/toxygen/stargazers)
|
||||||
[](https://github.com/toxygen-project/toxygen/issues)
|
[](https://github.com/toxygen-project/toxygen/issues)
|
||||||
[](https://raw.githubusercontent.com/toxygen-project/toxygen/master/LICENSE.md)
|
[](https://raw.githubusercontent.com/toxygen-project/toxygen/master/LICENSE.md)
|
||||||
[](https://travis-ci.org/toxygen-project/toxygen)
|
[](https://travis-ci.org/toxygen-project/toxygen)
|
||||||
|
|
||||||
### [Install](/docs/install.md) - [Contribute](/docs/contributing.md) - [Plugins](/docs/plugins.md) - [Compile](/docs/compile.md) - [Contact](/docs/contact.md)
|
### [Install](/docs/install.md) - [Contribute](/docs/contributing.md) - [Plugins](/docs/plugins.md) - [Compile](/docs/compile.md) - [Contact](/docs/contact.md) - [Updater](https://github.com/toxygen-project/toxygen_updater)
|
||||||
|
|
||||||
### Supported OS:
|
### Supported OS:
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ Toxygen is powerful cross-platform [Tox](https://tox.chat/) client written in pu
|
|||||||
|
|
||||||
- [x] 1v1 messages
|
- [x] 1v1 messages
|
||||||
- [x] File transfers
|
- [x] File transfers
|
||||||
- [x] Audio
|
- [x] Audio calls
|
||||||
- [x] Plugins support
|
- [x] Plugins support
|
||||||
- [x] Chat history
|
- [x] Chat history
|
||||||
- [x] Emoticons
|
- [x] Emoticons
|
||||||
@ -42,7 +42,7 @@ Toxygen is powerful cross-platform [Tox](https://tox.chat/) client written in pu
|
|||||||
- [x] Changing nospam
|
- [x] Changing nospam
|
||||||
- [x] File resuming
|
- [x] File resuming
|
||||||
- [x] Read receipts
|
- [x] Read receipts
|
||||||
- [ ] Video
|
- [ ] Video calls
|
||||||
- [ ] Desktop sharing
|
- [ ] Desktop sharing
|
||||||
- [ ] Group chats
|
- [ ] Group chats
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ You can compile Toxygen using [PyInstaller](http://www.pyinstaller.org/)
|
|||||||
Install PyInstaller:
|
Install PyInstaller:
|
||||||
``pip3 install pyinstaller``
|
``pip3 install pyinstaller``
|
||||||
|
|
||||||
|
Compile Toxygen:
|
||||||
``pyinstaller --windowed --icon images/icon.ico main.py``
|
``pyinstaller --windowed --icon images/icon.ico main.py``
|
||||||
|
|
||||||
Don't forget to copy /images/, /sounds/, /translations/, /styles/, /smileys/, /stickers/, /plugins/ (and /libs/libtox.dll, /libs/libsodium.a on Windows) to /dist/main/
|
Don't forget to copy /images/, /sounds/, /translations/, /styles/, /smileys/, /stickers/, /plugins/ (and /libs/libtox.dll, /libs/libsodium.a on Windows) to /dist/main/
|
||||||
|
@ -4,15 +4,15 @@ Help us find all bugs in Toxygen! Please provide following info:
|
|||||||
|
|
||||||
- OS
|
- OS
|
||||||
- Toxygen version
|
- Toxygen version
|
||||||
- Toxygen executable info - .py or precompiled binary
|
- Toxygen executable info - .py or precompiled binary, how was it installed in system
|
||||||
- Steps to reproduce the bug
|
- Steps to reproduce the bug
|
||||||
|
|
||||||
Want to see new feature in Toxygen? [Ask for it!](https://github.com/xveduk/toxygen/issues)
|
Want to see new feature in Toxygen? [Ask for it!](https://github.com/toxygen-project/toxygen/issues)
|
||||||
|
|
||||||
# Pull requests
|
# Pull requests
|
||||||
|
|
||||||
Developer? Feel free to open pull request. Our dev team is small so we glad to get help.
|
Developer? Feel free to open pull request. Our dev team is small so we glad to get help.
|
||||||
Don't know what to do? Improve UI, fix [issues](https://github.com/xveduk/toxygen/issues) or implement features from our TODO list.
|
Don't know what to do? Improve UI, fix [issues](https://github.com/toxygen-project/toxygen/issues) or implement features from our TODO list.
|
||||||
You can find our TODO's in code, issues list and [here](/README.md). Also you can implement [plugins](/docs/plugins.md) for Toxygen.
|
You can find our TODO's in code, issues list and [here](/README.md). Also you can implement [plugins](/docs/plugins.md) for Toxygen.
|
||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# How to install Toxygen
|
# How to install Toxygen
|
||||||
|
|
||||||
## Use precompiled binary:
|
## Use precompiled binary:
|
||||||
[Check our releases page](https://github.com/xveduk/toxygen/releases)
|
[Check our releases page](https://github.com/toxygen-project/toxygen/releases)
|
||||||
|
|
||||||
## Using pip3
|
## Using pip3
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ All plugin's data should be stored in following structure:
|
|||||||
```
|
```
|
||||||
|
|
||||||
Plugin MUST override:
|
Plugin MUST override:
|
||||||
- __init__ with params: tox (Tox instance), profile (Profile instance), settings (Settings instance), encrypt_save (ToxEncryptSave instance). Call super().__init__ with params plugin_full_name, plugin_short_name, tox, profile, settings, encrypt_save.
|
- __init__ with params: tox (Tox instance), profile (Profile instance), settings (Settings instance), encrypt_save (ToxES instance). Call super().__init__ with params plugin_full_name, plugin_short_name, tox, profile, settings, encrypt_save.
|
||||||
|
|
||||||
Plugin can override following methods:
|
Plugin can override following methods:
|
||||||
- get_description - this method should return plugin description.
|
- get_description - this method should return plugin description.
|
||||||
@ -53,5 +53,5 @@ Plugin's methods MUST NOT raise exceptions.
|
|||||||
|
|
||||||
# Examples
|
# Examples
|
||||||
|
|
||||||
You can find examples in [official repo](https://github.com/ingvar1995/toxygen_plugins)
|
You can find examples in [official repo](https://github.com/toxygen-project/toxygen_plugins)
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@ Check [Plugin API](/docs/plugin_api.md) for more info
|
|||||||
|
|
||||||
Toxygen comes without preinstalled plugins.
|
Toxygen comes without preinstalled plugins.
|
||||||
|
|
||||||
1. Put plugin and directory with its data into /src/plugins/ or import it via GUI (In menu: Plugins -> Import plugin)
|
1. Put plugin and directory with its data into /src/plugins/ or import it via GUI (In menu: Plugins => Import plugin)
|
||||||
2. Restart Toxygen
|
2. Restart Toxygen or choose Plugins => Reload plugins in menu.
|
||||||
|
|
||||||
## Note: /src/plugins/ should contain plugin_super_class.py and __init__.py
|
## Note: /src/plugins/ should contain plugin_super_class.py and __init__.py
|
||||||
|
|
||||||
@ -19,4 +19,4 @@ Toxygen comes without preinstalled plugins.
|
|||||||
|
|
||||||
WARNING: It is unsecure to install plugin not from this list!
|
WARNING: It is unsecure to install plugin not from this list!
|
||||||
|
|
||||||
[Main repo](https://github.com/ingvar1995/toxygen_plugins)
|
[Main repo](https://github.com/toxygen-project/toxygen_plugins)
|
@ -10,4 +10,4 @@ Animated smileys (.gif) are supported too.
|
|||||||
|
|
||||||
Sticker is inline image. If you want to create your own smiley pack, create directory in src/stickers/ and place your stickers there.
|
Sticker is inline image. If you want to create your own smiley pack, create directory in src/stickers/ and place your stickers there.
|
||||||
|
|
||||||
Users can import plugins and stickers packs using menu: Settings -> Interface
|
Users can import smileys and stickers using menu: Settings -> Interface
|
||||||
|
108
tests/tests.py
108
tests/tests.py
@ -1,7 +1,10 @@
|
|||||||
from toxygen.profile import *
|
from toxygen.profile import *
|
||||||
from toxygen.tox_dns import tox_dns
|
from toxygen.tox_dns import tox_dns
|
||||||
import toxygen.toxencryptsave as encr
|
from toxygen.history import History
|
||||||
import toxygen.messages as m
|
from toxygen.smileys import SmileyLoader
|
||||||
|
from toxygen.messages import *
|
||||||
|
import toxygen.toxes as encr
|
||||||
|
import toxygen.util as util
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
|
||||||
@ -53,52 +56,73 @@ class TestEncryption:
|
|||||||
def test_encr_decr(self):
|
def test_encr_decr(self):
|
||||||
tox = tox_factory()
|
tox = tox_factory()
|
||||||
data = tox.get_savedata()
|
data = tox.get_savedata()
|
||||||
lib = encr.ToxEncryptSave()
|
lib = encr.ToxES()
|
||||||
for password in ('easypassword', 'njvnjfnvaGGV6', 'toxygen'):
|
for password in ('easypassword', 'njvnFjfn7vaGGV6', 'toxygen'):
|
||||||
lib.set_password(password)
|
lib.set_password(password)
|
||||||
copy_data = data[:]
|
copy_data = data[:]
|
||||||
new_data = lib.pass_encrypt(data)
|
new_data = lib.pass_encrypt(data)
|
||||||
|
assert lib.is_data_encrypted(new_data)
|
||||||
new_data = lib.pass_decrypt(new_data)
|
new_data = lib.pass_decrypt(new_data)
|
||||||
assert copy_data == new_data
|
assert copy_data == new_data
|
||||||
|
|
||||||
|
|
||||||
class TestFriend:
|
class TestSmileys:
|
||||||
|
|
||||||
def create_singletons(self):
|
def test_loading(self):
|
||||||
|
settings = {'smiley_pack': 'default', 'smileys': True}
|
||||||
|
sm = SmileyLoader(settings)
|
||||||
|
assert sm.get_smileys_path() is not None
|
||||||
|
l = sm.get_packs_list()
|
||||||
|
assert len(l) == 4
|
||||||
|
|
||||||
|
|
||||||
|
def create_singletons():
|
||||||
|
folder = util.curr_directory() + '/abc'
|
||||||
Settings._instance = Settings.get_default_settings()
|
Settings._instance = Settings.get_default_settings()
|
||||||
ProfileHelper('abc', 'test')
|
if not os.path.exists(folder):
|
||||||
|
os.makedirs(folder)
|
||||||
|
ProfileHelper(folder, 'test')
|
||||||
|
|
||||||
def create_friend(self, name, status_message, number, tox_id):
|
|
||||||
|
def create_friend(name, status_message, number, tox_id):
|
||||||
friend = Friend(None, number, name, status_message, None, tox_id)
|
friend = Friend(None, number, name, status_message, None, tox_id)
|
||||||
return friend
|
return friend
|
||||||
|
|
||||||
def test_friend_creation(self):
|
|
||||||
self.create_singletons()
|
def create_random_friend():
|
||||||
name, status_message, number = 'Friend', 'I am friend!', 0
|
name, status_message, number = 'Friend', 'I am friend!', 0
|
||||||
tox_id = '76518406F6A9F2217E8DC487CC783C25CC16A15EB36FF32E335A235342C48A39218F515C39A6'
|
tox_id = '76518406F6A9F2217E8DC487CC783C25CC16A15EB36FF32E335A235342C48A39218F515C39A6'
|
||||||
friend = self.create_friend(name, status_message, number, tox_id)
|
friend = create_friend(name, status_message, number, tox_id)
|
||||||
|
return friend
|
||||||
|
|
||||||
|
|
||||||
|
class TestFriend:
|
||||||
|
|
||||||
|
def test_friend_creation(self):
|
||||||
|
create_singletons()
|
||||||
|
name, status_message, number = 'Friend', 'I am friend!', 0
|
||||||
|
tox_id = '76518406F6A9F2217E8DC487CC783C25CC16A15EB36FF32E335A235342C48A39218F515C39A6'
|
||||||
|
friend = create_friend(name, status_message, number, tox_id)
|
||||||
assert friend.name == name
|
assert friend.name == name
|
||||||
assert friend.tox_id == tox_id
|
assert friend.tox_id == tox_id
|
||||||
assert friend.status_message == status_message
|
assert friend.status_message == status_message
|
||||||
assert friend.number == number
|
assert friend.number == number
|
||||||
|
|
||||||
def test_friend_corr(self):
|
def test_friend_corr(self):
|
||||||
self.create_singletons()
|
create_singletons()
|
||||||
name, status_message, number = 'Friend', 'I am friend!', 0
|
friend = create_random_friend()
|
||||||
tox_id = '76518406F6A9F2217E8DC487CC783C25CC16A15EB36FF32E335A235342C48A39218F515C39A6'
|
|
||||||
friend = self.create_friend(name, status_message, number, tox_id)
|
|
||||||
t = time.time()
|
t = time.time()
|
||||||
friend.append_message(m.InfoMessage('Info message', t))
|
friend.append_message(InfoMessage('Info message', t))
|
||||||
friend.append_message(m.TextMessage('Hello! It is test!', MESSAGE_OWNER['ME'], t + 0.001, 0))
|
friend.append_message(TextMessage('Hello! It is test!', MESSAGE_OWNER['ME'], t + 0.001, 0))
|
||||||
friend.append_message(m.TextMessage('Hello!', MESSAGE_OWNER['FRIEND'], t + 0.002, 0))
|
friend.append_message(TextMessage('Hello!', MESSAGE_OWNER['FRIEND'], t + 0.002, 0))
|
||||||
assert friend.get_last_message_text() == 'Hello! It is test!'
|
assert friend.get_last_message_text() == 'Hello! It is test!'
|
||||||
assert len(friend.get_corr()) == 3
|
assert len(friend.get_corr()) == 3
|
||||||
assert len(friend.get_corr_for_saving()) == 2
|
assert len(friend.get_corr_for_saving()) == 2
|
||||||
friend.append_message(m.TextMessage('Not sent', MESSAGE_OWNER['NOT_SENT'], t + 0.002, 0))
|
friend.append_message(TextMessage('Not sent', MESSAGE_OWNER['NOT_SENT'], t + 0.002, 0))
|
||||||
arr = friend.get_unsent_messages_for_saving()
|
arr = friend.get_unsent_messages_for_saving()
|
||||||
assert len(arr) == 1
|
assert len(arr) == 1
|
||||||
assert arr[0][0] == 'Not sent'
|
assert arr[0][0] == 'Not sent'
|
||||||
tm = m.TransferMessage(MESSAGE_OWNER['FRIEND'],
|
tm = TransferMessage(MESSAGE_OWNER['FRIEND'],
|
||||||
time.time(),
|
time.time(),
|
||||||
TOX_FILE_TRANSFER_STATE['RUNNING'],
|
TOX_FILE_TRANSFER_STATE['RUNNING'],
|
||||||
100, 'file_name', friend.number, 0)
|
100, 'file_name', friend.number, 0)
|
||||||
@ -106,8 +130,48 @@ class TestFriend:
|
|||||||
friend.clear_corr()
|
friend.clear_corr()
|
||||||
assert len(friend.get_corr()) == 1
|
assert len(friend.get_corr()) == 1
|
||||||
assert len(friend.get_corr_for_saving()) == 0
|
assert len(friend.get_corr_for_saving()) == 0
|
||||||
friend.append_message(m.TextMessage('Hello! It is test!', MESSAGE_OWNER['ME'], t, 0))
|
friend.append_message(TextMessage('Hello! It is test!', MESSAGE_OWNER['ME'], t, 0))
|
||||||
assert len(friend.get_corr()) == 2
|
assert len(friend.get_corr()) == 2
|
||||||
assert len(friend.get_corr_for_saving()) == 1
|
assert len(friend.get_corr_for_saving()) == 1
|
||||||
|
|
||||||
# TODO: more friend tests and history test
|
def test_history_search(self):
|
||||||
|
create_singletons()
|
||||||
|
friend = create_random_friend()
|
||||||
|
message = 'Hello! It is test!'
|
||||||
|
friend.append_message(TextMessage(message, MESSAGE_OWNER['ME'], time.time(), 0))
|
||||||
|
last_message = friend.get_last_message_text()
|
||||||
|
assert last_message == message
|
||||||
|
result = friend.search_string('e[m|s]')
|
||||||
|
assert result is not None
|
||||||
|
result = friend.search_string('tox')
|
||||||
|
assert result is None
|
||||||
|
|
||||||
|
|
||||||
|
class TestHistory:
|
||||||
|
|
||||||
|
def test_history(self):
|
||||||
|
create_singletons()
|
||||||
|
db_name = 'my_name'
|
||||||
|
name, status_message, number = 'Friend', 'I am friend!', 0
|
||||||
|
tox_id = '76518406F6A9F2217E8DC487CC783C25CC16A15EB36FF32E335A235342C48A39218F515C39A6'
|
||||||
|
friend = create_friend(name, status_message, number, tox_id)
|
||||||
|
history = History(db_name)
|
||||||
|
history.add_friend_to_db(friend.tox_id)
|
||||||
|
assert history.friend_exists_in_db(friend.tox_id)
|
||||||
|
text_message = 'Test!'
|
||||||
|
t = time.time()
|
||||||
|
friend.append_message(TextMessage(text_message, MESSAGE_OWNER['ME'], t, 0))
|
||||||
|
messages = friend.get_corr_for_saving()
|
||||||
|
history.save_messages_to_db(friend.tox_id, messages)
|
||||||
|
getter = history.messages_getter(friend.tox_id)
|
||||||
|
messages = getter.get_all()
|
||||||
|
assert len(messages) == 1
|
||||||
|
assert messages[0][0] == text_message
|
||||||
|
assert messages[0][1] == MESSAGE_OWNER['ME']
|
||||||
|
assert messages[0][-1] == 0
|
||||||
|
history.delete_message(friend.tox_id, t)
|
||||||
|
getter = history.messages_getter(friend.tox_id)
|
||||||
|
messages = getter.get_all()
|
||||||
|
assert len(messages) == 0
|
||||||
|
history.delete_friend_from_db(friend.tox_id)
|
||||||
|
assert not history.friend_exists_in_db(friend.tox_id)
|
||||||
|
@ -63,6 +63,7 @@ class IncomingCallWidget(widgets.CenteredWidget):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
QtCore.QThread.__init__(self)
|
QtCore.QThread.__init__(self)
|
||||||
|
self.a = None
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
class AudioFile:
|
class AudioFile:
|
||||||
|
@ -84,11 +84,10 @@ class BaseContact:
|
|||||||
"""
|
"""
|
||||||
Tries to load avatar of contact or uses default avatar
|
Tries to load avatar of contact or uses default avatar
|
||||||
"""
|
"""
|
||||||
avatar_path = '{}.png'.format(self._tox_id[:TOX_PUBLIC_KEY_SIZE * 2])
|
prefix = ProfileHelper.get_path() + 'avatars/'
|
||||||
os.chdir(ProfileHelper.get_path() + 'avatars/')
|
avatar_path = prefix + '{}.png'.format(self._tox_id[:TOX_PUBLIC_KEY_SIZE * 2])
|
||||||
if not os.path.isfile(avatar_path): # load default image
|
if not os.path.isfile(avatar_path) or not os.path.getsize(avatar_path): # load default image
|
||||||
avatar_path = 'avatar.png'
|
avatar_path = curr_directory() + '/images/avatar.png'
|
||||||
os.chdir(curr_directory() + '/images/')
|
|
||||||
width = self._widget.avatar_label.width()
|
width = self._widget.avatar_label.width()
|
||||||
pixmap = QtGui.QPixmap(avatar_path)
|
pixmap = QtGui.QPixmap(avatar_path)
|
||||||
self._widget.avatar_label.setPixmap(pixmap.scaled(width, width, QtCore.Qt.KeepAspectRatio,
|
self._widget.avatar_label.setPixmap(pixmap.scaled(width, width, QtCore.Qt.KeepAspectRatio,
|
||||||
@ -110,6 +109,10 @@ class BaseContact:
|
|||||||
def get_pixmap(self):
|
def get_pixmap(self):
|
||||||
return self._widget.avatar_label.pixmap()
|
return self._widget.avatar_label.pixmap()
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------------------------------------------
|
||||||
|
# Widgets
|
||||||
|
# -----------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
def init_widget(self):
|
def init_widget(self):
|
||||||
if self._widget is not None:
|
if self._widget is not None:
|
||||||
self._widget.name.setText(self._name)
|
self._widget.name.setText(self._name)
|
||||||
|
@ -141,4 +141,3 @@ class AV:
|
|||||||
|
|
||||||
if state & TOXAV_FRIEND_CALL_STATE['ACCEPTING_A']:
|
if state & TOXAV_FRIEND_CALL_STATE['ACCEPTING_A']:
|
||||||
self._calls[friend_number] |= 1
|
self._calls[friend_number] |= 1
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ import basecontact
|
|||||||
import util
|
import util
|
||||||
from messages import *
|
from messages import *
|
||||||
import file_transfers as ft
|
import file_transfers as ft
|
||||||
|
import re
|
||||||
|
|
||||||
|
|
||||||
class Contact(basecontact.BaseContact):
|
class Contact(basecontact.BaseContact):
|
||||||
@ -29,8 +30,8 @@ class Contact(basecontact.BaseContact):
|
|||||||
self._corr = []
|
self._corr = []
|
||||||
self._unsaved_messages = 0
|
self._unsaved_messages = 0
|
||||||
self._history_loaded = self._new_actions = False
|
self._history_loaded = self._new_actions = False
|
||||||
self._receipts = 0
|
self._curr_text = self._search_string = ''
|
||||||
self._curr_text = ''
|
self._search_index = 0
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
self.set_visibility(False)
|
self.set_visibility(False)
|
||||||
@ -48,6 +49,8 @@ class Contact(basecontact.BaseContact):
|
|||||||
"""
|
"""
|
||||||
if (first_time and self._history_loaded) or (not hasattr(self, '_message_getter')):
|
if (first_time and self._history_loaded) or (not hasattr(self, '_message_getter')):
|
||||||
return
|
return
|
||||||
|
if self._message_getter is None:
|
||||||
|
return
|
||||||
data = list(self._message_getter.get(PAGE_SIZE))
|
data = list(self._message_getter.get(PAGE_SIZE))
|
||||||
if data is not None and len(data):
|
if data is not None and len(data):
|
||||||
data.reverse()
|
data.reverse()
|
||||||
@ -94,6 +97,10 @@ class Contact(basecontact.BaseContact):
|
|||||||
else:
|
else:
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------------------------------------------
|
||||||
|
# Unsent messages
|
||||||
|
# -----------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
def get_unsent_messages(self):
|
def get_unsent_messages(self):
|
||||||
"""
|
"""
|
||||||
:return list of unsent messages
|
:return list of unsent messages
|
||||||
@ -108,25 +115,6 @@ class Contact(basecontact.BaseContact):
|
|||||||
messages = filter(lambda x: x.get_type() <= 1 and x.get_owner() == MESSAGE_OWNER['NOT_SENT'], self._corr)
|
messages = filter(lambda x: x.get_type() <= 1 and x.get_owner() == MESSAGE_OWNER['NOT_SENT'], self._corr)
|
||||||
return list(map(lambda x: x.get_data(), messages))
|
return list(map(lambda x: x.get_data(), messages))
|
||||||
|
|
||||||
def delete_message(self, time):
|
|
||||||
elem = list(filter(lambda x: type(x) is TextMessage and x.get_data()[2] == time, self._corr))[0]
|
|
||||||
tmp = list(filter(lambda x: x.get_type() <= 1, self._corr))
|
|
||||||
if elem in tmp[-self._unsaved_messages:] and self._unsaved_messages:
|
|
||||||
self._unsaved_messages -= 1
|
|
||||||
self._corr.remove(elem)
|
|
||||||
self._message_getter.delete_one()
|
|
||||||
|
|
||||||
def delete_old_messages(self):
|
|
||||||
"""
|
|
||||||
Delete old messages (reduces RAM if messages saving is not enabled)
|
|
||||||
"""
|
|
||||||
old = filter(lambda x: x.get_type() == 2 and (x.get_status() >= 2 or x.get_status() is None),
|
|
||||||
self._corr[:-SAVE_MESSAGES])
|
|
||||||
old = list(old)
|
|
||||||
l = max(len(self._corr) - SAVE_MESSAGES, 0) - len(old)
|
|
||||||
self._unsaved_messages -= l
|
|
||||||
self._corr = old + self._corr[-SAVE_MESSAGES:]
|
|
||||||
|
|
||||||
def mark_as_sent(self):
|
def mark_as_sent(self):
|
||||||
try:
|
try:
|
||||||
message = list(filter(lambda x: x.get_owner() == MESSAGE_OWNER['NOT_SENT'], self._corr))[0]
|
message = list(filter(lambda x: x.get_owner() == MESSAGE_OWNER['NOT_SENT'], self._corr))[0]
|
||||||
@ -134,12 +122,41 @@ class Contact(basecontact.BaseContact):
|
|||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
util.log('Mark as sent ex: ' + str(ex))
|
util.log('Mark as sent ex: ' + str(ex))
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------------------------------------------
|
||||||
|
# Message deletion
|
||||||
|
# -----------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
def delete_message(self, time):
|
||||||
|
elem = list(filter(lambda x: type(x) is TextMessage and x.get_data()[2] == time, self._corr))[0]
|
||||||
|
tmp = list(filter(lambda x: x.get_type() <= 1, self._corr))
|
||||||
|
if elem in tmp[-self._unsaved_messages:] and self._unsaved_messages:
|
||||||
|
self._unsaved_messages -= 1
|
||||||
|
self._corr.remove(elem)
|
||||||
|
self._message_getter.delete_one()
|
||||||
|
self._search_index = 0
|
||||||
|
|
||||||
|
def delete_old_messages(self):
|
||||||
|
"""
|
||||||
|
Delete old messages (reduces RAM usage if messages saving is not enabled)
|
||||||
|
"""
|
||||||
|
def save_message(x):
|
||||||
|
if x.get_type() == 2 and (x.get_status() >= 2 or x.get_status() is None):
|
||||||
|
return True
|
||||||
|
return x.get_owner() == MESSAGE_OWNER['NOT_SENT']
|
||||||
|
|
||||||
|
old = filter(save_message, self._corr[:-SAVE_MESSAGES])
|
||||||
|
self._corr = list(old) + self._corr[-SAVE_MESSAGES:]
|
||||||
|
text_messages = filter(lambda x: x.get_type() <= 1, self._corr)
|
||||||
|
self._unsaved_messages = min(self._unsaved_messages, len(list(text_messages)))
|
||||||
|
self._search_index = 0
|
||||||
|
|
||||||
def clear_corr(self, save_unsent=False):
|
def clear_corr(self, save_unsent=False):
|
||||||
"""
|
"""
|
||||||
Clear messages list
|
Clear messages list
|
||||||
"""
|
"""
|
||||||
if hasattr(self, '_message_getter'):
|
if hasattr(self, '_message_getter'):
|
||||||
del self._message_getter
|
del self._message_getter
|
||||||
|
self._search_index = 0
|
||||||
# don't delete data about active file transfer
|
# don't delete data about active file transfer
|
||||||
if not save_unsent:
|
if not save_unsent:
|
||||||
self._corr = list(filter(lambda x: x.get_type() == 2 and
|
self._corr = list(filter(lambda x: x.get_type() == 2 and
|
||||||
@ -151,6 +168,45 @@ class Contact(basecontact.BaseContact):
|
|||||||
self._corr))
|
self._corr))
|
||||||
self._unsaved_messages = len(self.get_unsent_messages())
|
self._unsaved_messages = len(self.get_unsent_messages())
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------------------------------------------
|
||||||
|
# Chat history search
|
||||||
|
# -----------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
def search_string(self, search_string):
|
||||||
|
self._search_string, self._search_index = search_string, 0
|
||||||
|
return self.search_prev()
|
||||||
|
|
||||||
|
def search_prev(self):
|
||||||
|
while True:
|
||||||
|
l = len(self._corr)
|
||||||
|
for i in range(self._search_index - 1, -l - 1, -1):
|
||||||
|
if self._corr[i].get_type() > 1:
|
||||||
|
continue
|
||||||
|
message = self._corr[i].get_data()[0]
|
||||||
|
if re.search(self._search_string, message, re.IGNORECASE) is not None:
|
||||||
|
self._search_index = i
|
||||||
|
return i
|
||||||
|
self._search_index = -l
|
||||||
|
self.load_corr(False)
|
||||||
|
if len(self._corr) == l:
|
||||||
|
return None # not found
|
||||||
|
|
||||||
|
def search_next(self):
|
||||||
|
if not self._search_index:
|
||||||
|
return None
|
||||||
|
for i in range(self._search_index + 1, 0):
|
||||||
|
if self._corr[i].get_type() > 1:
|
||||||
|
continue
|
||||||
|
message = self._corr[i].get_data()[0]
|
||||||
|
if re.search(self._search_string, message, re.IGNORECASE) is not None:
|
||||||
|
self._search_index = i
|
||||||
|
return i
|
||||||
|
return None # not found
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------------------------------------------
|
||||||
|
# Current text - text from message area
|
||||||
|
# -----------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
def get_curr_text(self):
|
def get_curr_text(self):
|
||||||
return self._curr_text
|
return self._curr_text
|
||||||
|
|
||||||
|
@ -32,6 +32,10 @@ SHOW_PROGRESS_BAR = (0, 1, 4)
|
|||||||
ALLOWED_FILES = ('toxygen_inline.png', 'utox-inline.png', 'sticker.png')
|
ALLOWED_FILES = ('toxygen_inline.png', 'utox-inline.png', 'sticker.png')
|
||||||
|
|
||||||
|
|
||||||
|
def is_inline(file_name):
|
||||||
|
return file_name in ALLOWED_FILES or file_name.startswith('qTox_Screenshot_')
|
||||||
|
|
||||||
|
|
||||||
class StateSignal(QtCore.QObject):
|
class StateSignal(QtCore.QObject):
|
||||||
|
|
||||||
signal = QtCore.Signal(int, float, int) # state, progress, time in sec
|
signal = QtCore.Signal(int, float, int) # state, progress, time in sec
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import contact
|
import contact
|
||||||
from messages import *
|
from messages import *
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
class Friend(contact.Contact):
|
class Friend(contact.Contact):
|
||||||
@ -37,6 +38,15 @@ class Friend(contact.Contact):
|
|||||||
def clear_unsent_files(self):
|
def clear_unsent_files(self):
|
||||||
self._corr = list(filter(lambda x: type(x) is not UnsentFile, self._corr))
|
self._corr = list(filter(lambda x: type(x) is not UnsentFile, self._corr))
|
||||||
|
|
||||||
|
def remove_invalid_unsent_files(self):
|
||||||
|
def is_valid(message):
|
||||||
|
if type(message) is not UnsentFile:
|
||||||
|
return True
|
||||||
|
if message.get_data()[1] is not None:
|
||||||
|
return True
|
||||||
|
return os.path.exists(message.get_data()[0])
|
||||||
|
self._corr = list(filter(is_valid, self._corr))
|
||||||
|
|
||||||
def delete_one_unsent_file(self, time):
|
def delete_one_unsent_file(self, time):
|
||||||
self._corr = list(filter(lambda x: not (type(x) is UnsentFile and x.get_data()[2] == time), self._corr))
|
self._corr = list(filter(lambda x: not (type(x) is UnsentFile and x.get_data()[2] == time), self._corr))
|
||||||
|
|
||||||
|
@ -1,15 +1,18 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
|
||||||
from sqlite3 import connect
|
from sqlite3 import connect
|
||||||
import settings
|
import settings
|
||||||
from os import chdir
|
from os import chdir
|
||||||
import os.path
|
import os.path
|
||||||
from toxencryptsave import ToxEncryptSave
|
from toxes import ToxES
|
||||||
|
|
||||||
|
|
||||||
PAGE_SIZE = 42
|
PAGE_SIZE = 42
|
||||||
|
|
||||||
TIMEOUT = 11
|
TIMEOUT = 11
|
||||||
|
|
||||||
SAVE_MESSAGES = 150
|
SAVE_MESSAGES = 250
|
||||||
|
|
||||||
MESSAGE_OWNER = {
|
MESSAGE_OWNER = {
|
||||||
'ME': 0,
|
'ME': 0,
|
||||||
@ -25,7 +28,7 @@ class History:
|
|||||||
chdir(settings.ProfileHelper.get_path())
|
chdir(settings.ProfileHelper.get_path())
|
||||||
path = settings.ProfileHelper.get_path() + self._name + '.hstr'
|
path = settings.ProfileHelper.get_path() + self._name + '.hstr'
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
decr = ToxEncryptSave.get_instance()
|
decr = ToxES.get_instance()
|
||||||
try:
|
try:
|
||||||
with open(path, 'rb') as fin:
|
with open(path, 'rb') as fin:
|
||||||
data = fin.read()
|
data = fin.read()
|
||||||
@ -43,7 +46,7 @@ class History:
|
|||||||
db.close()
|
db.close()
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
encr = ToxEncryptSave.get_instance()
|
encr = ToxES.get_instance()
|
||||||
if encr.has_password():
|
if encr.has_password():
|
||||||
path = settings.ProfileHelper.get_path() + self._name + '.hstr'
|
path = settings.ProfileHelper.get_path() + self._name + '.hstr'
|
||||||
with open(path, 'rb') as fin:
|
with open(path, 'rb') as fin:
|
||||||
@ -57,7 +60,7 @@ class History:
|
|||||||
new_path = directory + self._name + '.hstr'
|
new_path = directory + self._name + '.hstr'
|
||||||
with open(path, 'rb') as fin:
|
with open(path, 'rb') as fin:
|
||||||
data = fin.read()
|
data = fin.read()
|
||||||
encr = ToxEncryptSave.get_instance()
|
encr = ToxES.get_instance()
|
||||||
if encr.has_password():
|
if encr.has_password():
|
||||||
data = encr.pass_encrypt(data)
|
data = encr.pass_encrypt(data)
|
||||||
with open(new_path, 'wb') as fout:
|
with open(new_path, 'wb') as fout:
|
||||||
@ -133,14 +136,15 @@ class History:
|
|||||||
db.rollback()
|
db.rollback()
|
||||||
finally:
|
finally:
|
||||||
db.close()
|
db.close()
|
||||||
pass
|
|
||||||
|
|
||||||
def delete_message(self, tox_id, time):
|
def delete_message(self, tox_id, time):
|
||||||
|
start, end = str(time - 0.01), str(time + 0.01)
|
||||||
chdir(settings.ProfileHelper.get_path())
|
chdir(settings.ProfileHelper.get_path())
|
||||||
db = connect(self._name + '.hstr', timeout=TIMEOUT)
|
db = connect(self._name + '.hstr', timeout=TIMEOUT)
|
||||||
try:
|
try:
|
||||||
cursor = db.cursor()
|
cursor = db.cursor()
|
||||||
cursor.execute('DELETE FROM id' + tox_id + ' WHERE unix_time = ' + str(time) + ';')
|
cursor.execute('DELETE FROM id' + tox_id + ' WHERE unix_time < ' + end + ' AND unix_time > ' +
|
||||||
|
start + ';')
|
||||||
db.commit()
|
db.commit()
|
||||||
except:
|
except:
|
||||||
print('Database is locked!')
|
print('Database is locked!')
|
||||||
|
@ -11,6 +11,7 @@ from widgets import DataLabel, create_menu
|
|||||||
import html as h
|
import html as h
|
||||||
import smileys
|
import smileys
|
||||||
import settings
|
import settings
|
||||||
|
import re
|
||||||
|
|
||||||
|
|
||||||
class MessageEdit(QtGui.QTextBrowser):
|
class MessageEdit(QtGui.QTextBrowser):
|
||||||
@ -189,6 +190,31 @@ class MessageItem(QtGui.QWidget):
|
|||||||
self.message.setFixedHeight(self.height())
|
self.message.setFixedHeight(self.height())
|
||||||
self.name.setPixmap(pixmap.scaled(30, 30, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation))
|
self.name.setPixmap(pixmap.scaled(30, 30, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation))
|
||||||
|
|
||||||
|
def select_text(self, text):
|
||||||
|
tmp = self.message.toHtml()
|
||||||
|
text = h.escape(text)
|
||||||
|
strings = re.findall(text, tmp, flags=re.IGNORECASE)
|
||||||
|
for s in strings:
|
||||||
|
tmp = self.replace_all(tmp, s)
|
||||||
|
self.message.setHtml(tmp)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def replace_all(text, substring):
|
||||||
|
i, l = 0, len(substring)
|
||||||
|
while i < len(text) - l + 1:
|
||||||
|
index = text[i:].find(substring)
|
||||||
|
if index == -1:
|
||||||
|
break
|
||||||
|
i += index
|
||||||
|
lgt, rgt = text[i:].find('<'), text[i:].find('>')
|
||||||
|
if rgt < lgt:
|
||||||
|
i += rgt + 1
|
||||||
|
continue
|
||||||
|
sub = '<font color="red"><b>{}</b></font>'.format(substring)
|
||||||
|
text = text[:i] + sub + text[i + l:]
|
||||||
|
i += len(sub)
|
||||||
|
return text
|
||||||
|
|
||||||
|
|
||||||
class ContactItem(QtGui.QWidget):
|
class ContactItem(QtGui.QWidget):
|
||||||
"""
|
"""
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
from loginscreen import LoginScreen
|
from loginscreen import LoginScreen
|
||||||
import profile
|
import profile
|
||||||
@ -12,7 +14,7 @@ from callbacks import init_callbacks, stop, start
|
|||||||
from util import curr_directory, program_version, remove, is_64_bit
|
from util import curr_directory, program_version, remove, is_64_bit
|
||||||
import styles.style
|
import styles.style
|
||||||
import platform
|
import platform
|
||||||
import toxencryptsave
|
import toxes
|
||||||
from passwordscreen import PasswordScreen, UnlockAppScreen, SetProfilePasswordScreen
|
from passwordscreen import PasswordScreen, UnlockAppScreen, SetProfilePasswordScreen
|
||||||
from plugin_support import PluginLoader
|
from plugin_support import PluginLoader
|
||||||
import updater
|
import updater
|
||||||
@ -37,7 +39,7 @@ class Toxygen:
|
|||||||
Show password screen
|
Show password screen
|
||||||
"""
|
"""
|
||||||
tmp = [data]
|
tmp = [data]
|
||||||
p = PasswordScreen(toxencryptsave.ToxEncryptSave.get_instance(), tmp)
|
p = PasswordScreen(toxes.ToxES.get_instance(), tmp)
|
||||||
p.show()
|
p.show()
|
||||||
self.app.connect(self.app, QtCore.SIGNAL("lastWindowClosed()"), self.app, QtCore.SLOT("quit()"))
|
self.app.connect(self.app, QtCore.SIGNAL("lastWindowClosed()"), self.app, QtCore.SLOT("quit()"))
|
||||||
self.app.exec_()
|
self.app.exec_()
|
||||||
@ -62,7 +64,7 @@ class Toxygen:
|
|||||||
dark_style = fl.read()
|
dark_style = fl.read()
|
||||||
app.setStyleSheet(dark_style)
|
app.setStyleSheet(dark_style)
|
||||||
|
|
||||||
encrypt_save = toxencryptsave.ToxEncryptSave()
|
encrypt_save = toxes.ToxES()
|
||||||
|
|
||||||
if self.path is not None:
|
if self.path is not None:
|
||||||
path = os.path.dirname(self.path) + '/'
|
path = os.path.dirname(self.path) + '/'
|
||||||
@ -199,6 +201,7 @@ class Toxygen:
|
|||||||
class Menu(QtGui.QMenu):
|
class Menu(QtGui.QMenu):
|
||||||
|
|
||||||
def newStatus(self, status):
|
def newStatus(self, status):
|
||||||
|
if not Settings.get_instance().locked:
|
||||||
profile.Profile.get_instance().set_status(status)
|
profile.Profile.get_instance().set_status(status)
|
||||||
self.aboutToShow()
|
self.aboutToShow()
|
||||||
self.hide()
|
self.hide()
|
||||||
@ -237,18 +240,23 @@ class Toxygen:
|
|||||||
exit = m.addAction(QtGui.QApplication.translate('tray', 'Exit', None, QtGui.QApplication.UnicodeUTF8))
|
exit = m.addAction(QtGui.QApplication.translate('tray', 'Exit', None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
|
||||||
def show_window():
|
def show_window():
|
||||||
|
s = Settings.get_instance()
|
||||||
|
|
||||||
def show():
|
def show():
|
||||||
if not self.ms.isActiveWindow():
|
if not self.ms.isActiveWindow():
|
||||||
self.ms.setWindowState(self.ms.windowState() & ~QtCore.Qt.WindowMinimized | QtCore.Qt.WindowActive)
|
self.ms.setWindowState(self.ms.windowState() & ~QtCore.Qt.WindowMinimized | QtCore.Qt.WindowActive)
|
||||||
self.ms.activateWindow()
|
self.ms.activateWindow()
|
||||||
self.ms.show()
|
self.ms.show()
|
||||||
if not Settings.get_instance().locked:
|
if not s.locked:
|
||||||
show()
|
show()
|
||||||
else:
|
else:
|
||||||
def correct_pass():
|
def correct_pass():
|
||||||
show()
|
show()
|
||||||
Settings.get_instance().locked = False
|
s.locked = False
|
||||||
self.p = UnlockAppScreen(toxencryptsave.ToxEncryptSave.get_instance(), correct_pass)
|
s.unlockScreen = False
|
||||||
|
if not s.unlockScreen:
|
||||||
|
s.unlockScreen = True
|
||||||
|
self.p = UnlockAppScreen(toxes.ToxES.get_instance(), correct_pass)
|
||||||
self.p.show()
|
self.p.show()
|
||||||
|
|
||||||
def tray_activated(reason):
|
def tray_activated(reason):
|
||||||
@ -256,6 +264,7 @@ class Toxygen:
|
|||||||
show_window()
|
show_window()
|
||||||
|
|
||||||
def close_app():
|
def close_app():
|
||||||
|
if not Settings.get_instance().locked:
|
||||||
settings.closing = True
|
settings.closing = True
|
||||||
self.ms.close()
|
self.ms.close()
|
||||||
|
|
||||||
@ -475,6 +484,10 @@ def configure():
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def reset():
|
||||||
|
Settings.reset_auto_profile()
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
if len(sys.argv) == 1:
|
if len(sys.argv) == 1:
|
||||||
toxygen = Toxygen()
|
toxygen = Toxygen()
|
||||||
@ -484,7 +497,7 @@ def main():
|
|||||||
print('Toxygen v' + program_version)
|
print('Toxygen v' + program_version)
|
||||||
return
|
return
|
||||||
elif arg == '--help':
|
elif arg == '--help':
|
||||||
print('Usage:\ntoxygen path_to_profile\ntoxygen tox_id\ntoxygen --version')
|
print('Usage:\ntoxygen path_to_profile\ntoxygen tox_id\ntoxygen --version\ntoxygen --reset')
|
||||||
return
|
return
|
||||||
elif arg == '--configure':
|
elif arg == '--configure':
|
||||||
configure()
|
configure()
|
||||||
@ -492,6 +505,9 @@ def main():
|
|||||||
elif arg == '--clean':
|
elif arg == '--clean':
|
||||||
clean()
|
clean()
|
||||||
return
|
return
|
||||||
|
elif arg == '--reset':
|
||||||
|
reset()
|
||||||
|
return
|
||||||
else:
|
else:
|
||||||
toxygen = Toxygen(arg)
|
toxygen = Toxygen(arg)
|
||||||
toxygen.main()
|
toxygen.main()
|
||||||
|
@ -5,6 +5,8 @@ from widgets import MultilineEdit, LineEdit, ComboBox
|
|||||||
import plugin_support
|
import plugin_support
|
||||||
from mainscreen_widgets import *
|
from mainscreen_widgets import *
|
||||||
import settings
|
import settings
|
||||||
|
import platform
|
||||||
|
import toxes
|
||||||
|
|
||||||
|
|
||||||
class MainWindow(QtGui.QMainWindow, Singleton):
|
class MainWindow(QtGui.QMainWindow, Singleton):
|
||||||
@ -63,6 +65,7 @@ class MainWindow(QtGui.QMainWindow, Singleton):
|
|||||||
self.audioSettings = QtGui.QAction(Form)
|
self.audioSettings = QtGui.QAction(Form)
|
||||||
self.pluginData = QtGui.QAction(Form)
|
self.pluginData = QtGui.QAction(Form)
|
||||||
self.importPlugin = QtGui.QAction(Form)
|
self.importPlugin = QtGui.QAction(Form)
|
||||||
|
self.reloadPlugins = QtGui.QAction(Form)
|
||||||
self.lockApp = QtGui.QAction(Form)
|
self.lockApp = QtGui.QAction(Form)
|
||||||
self.menuProfile.addAction(self.actionAdd_friend)
|
self.menuProfile.addAction(self.actionAdd_friend)
|
||||||
self.menuProfile.addAction(self.actionSettings)
|
self.menuProfile.addAction(self.actionSettings)
|
||||||
@ -75,6 +78,7 @@ class MainWindow(QtGui.QMainWindow, Singleton):
|
|||||||
self.menuSettings.addAction(self.updateSettings)
|
self.menuSettings.addAction(self.updateSettings)
|
||||||
self.menuPlugins.addAction(self.pluginData)
|
self.menuPlugins.addAction(self.pluginData)
|
||||||
self.menuPlugins.addAction(self.importPlugin)
|
self.menuPlugins.addAction(self.importPlugin)
|
||||||
|
self.menuPlugins.addAction(self.reloadPlugins)
|
||||||
self.menuAbout.addAction(self.actionAbout_program)
|
self.menuAbout.addAction(self.actionAbout_program)
|
||||||
|
|
||||||
self.profile_button.setMenu(self.menuProfile)
|
self.profile_button.setMenu(self.menuProfile)
|
||||||
@ -94,6 +98,7 @@ class MainWindow(QtGui.QMainWindow, Singleton):
|
|||||||
self.pluginData.triggered.connect(self.plugins_menu)
|
self.pluginData.triggered.connect(self.plugins_menu)
|
||||||
self.lockApp.triggered.connect(self.lock_app)
|
self.lockApp.triggered.connect(self.lock_app)
|
||||||
self.importPlugin.triggered.connect(self.import_plugin)
|
self.importPlugin.triggered.connect(self.import_plugin)
|
||||||
|
self.reloadPlugins.triggered.connect(self.reload_plugins)
|
||||||
|
|
||||||
Form.setLayout(box)
|
Form.setLayout(box)
|
||||||
QtCore.QMetaObject.connectSlotsByName(Form)
|
QtCore.QMetaObject.connectSlotsByName(Form)
|
||||||
@ -138,6 +143,7 @@ class MainWindow(QtGui.QMainWindow, Singleton):
|
|||||||
d = {0: 0, 1: 1, 2: 2, 3: 4, 1 | 4: 4, 2 | 4: 5}
|
d = {0: 0, 1: 1, 2: 2, 3: 4, 1 | 4: 4, 2 | 4: 5}
|
||||||
self.online_contacts.setCurrentIndex(d[ind])
|
self.online_contacts.setCurrentIndex(d[ind])
|
||||||
self.importPlugin.setText(QtGui.QApplication.translate("MainWindow", "Import plugin", None, QtGui.QApplication.UnicodeUTF8))
|
self.importPlugin.setText(QtGui.QApplication.translate("MainWindow", "Import plugin", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.reloadPlugins.setText(QtGui.QApplication.translate("MainWindow", "Reload plugins", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
|
||||||
def setup_right_bottom(self, Form):
|
def setup_right_bottom(self, Form):
|
||||||
Form.resize(650, 60)
|
Form.resize(650, 60)
|
||||||
@ -374,6 +380,10 @@ class MainWindow(QtGui.QMainWindow, Singleton):
|
|||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
def resizeEvent(self, *args, **kwargs):
|
def resizeEvent(self, *args, **kwargs):
|
||||||
|
if platform.system() == 'Windows':
|
||||||
|
self.messages.setGeometry(0, 0, self.width() - 270, self.height() - 155)
|
||||||
|
self.friends_list.setGeometry(0, 0, 270, self.height() - 125)
|
||||||
|
else:
|
||||||
self.messages.setGeometry(0, 0, self.width() - 270, self.height() - 159)
|
self.messages.setGeometry(0, 0, self.width() - 270, self.height() - 159)
|
||||||
self.friends_list.setGeometry(0, 0, 270, self.height() - 129)
|
self.friends_list.setGeometry(0, 0, 270, self.height() - 129)
|
||||||
|
|
||||||
@ -401,6 +411,8 @@ class MainWindow(QtGui.QMainWindow, Singleton):
|
|||||||
clipboard.setText(s)
|
clipboard.setText(s)
|
||||||
elif event.key() == QtCore.Qt.Key_Z and event.modifiers() & QtCore.Qt.ControlModifier and self.messages.selectedIndexes():
|
elif event.key() == QtCore.Qt.Key_Z and event.modifiers() & QtCore.Qt.ControlModifier and self.messages.selectedIndexes():
|
||||||
self.messages.clearSelection()
|
self.messages.clearSelection()
|
||||||
|
elif event.key() == QtCore.Qt.Key_F and event.modifiers() & QtCore.Qt.ControlModifier:
|
||||||
|
self.show_search_field()
|
||||||
else:
|
else:
|
||||||
super(MainWindow, self).keyPressEvent(event)
|
super(MainWindow, self).keyPressEvent(event)
|
||||||
|
|
||||||
@ -452,6 +464,11 @@ class MainWindow(QtGui.QMainWindow, Singleton):
|
|||||||
self.update_s = UpdateSettings()
|
self.update_s = UpdateSettings()
|
||||||
self.update_s.show()
|
self.update_s.show()
|
||||||
|
|
||||||
|
def reload_plugins(self):
|
||||||
|
plugin_loader = plugin_support.PluginLoader.get_instance()
|
||||||
|
if plugin_loader is not None:
|
||||||
|
plugin_loader.reload()
|
||||||
|
|
||||||
def import_plugin(self):
|
def import_plugin(self):
|
||||||
import util
|
import util
|
||||||
directory = QtGui.QFileDialog.getExistingDirectory(self,
|
directory = QtGui.QFileDialog.getExistingDirectory(self,
|
||||||
@ -473,7 +490,7 @@ class MainWindow(QtGui.QMainWindow, Singleton):
|
|||||||
msgBox.exec_()
|
msgBox.exec_()
|
||||||
|
|
||||||
def lock_app(self):
|
def lock_app(self):
|
||||||
if toxencryptsave.ToxEncryptSave.get_instance().has_password():
|
if toxes.ToxES.get_instance().has_password():
|
||||||
Settings.get_instance().locked = True
|
Settings.get_instance().locked = True
|
||||||
self.hide()
|
self.hide()
|
||||||
else:
|
else:
|
||||||
@ -588,14 +605,18 @@ class MainWindow(QtGui.QMainWindow, Singleton):
|
|||||||
|
|
||||||
auto_accept_item = self.listMenu.addAction(auto)
|
auto_accept_item = self.listMenu.addAction(auto)
|
||||||
remove_item = self.listMenu.addAction(QtGui.QApplication.translate("MainWindow", 'Remove friend', None, QtGui.QApplication.UnicodeUTF8))
|
remove_item = self.listMenu.addAction(QtGui.QApplication.translate("MainWindow", 'Remove friend', None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
block_item = self.listMenu.addAction(QtGui.QApplication.translate("MainWindow", 'Block friend', None, QtGui.QApplication.UnicodeUTF8))
|
||||||
notes_item = self.listMenu.addAction(QtGui.QApplication.translate("MainWindow", 'Notes', None, QtGui.QApplication.UnicodeUTF8))
|
notes_item = self.listMenu.addAction(QtGui.QApplication.translate("MainWindow", 'Notes', None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
|
||||||
submenu = plugin_support.PluginLoader.get_instance().get_menu(self.listMenu, num)
|
plugins_loader = plugin_support.PluginLoader.get_instance()
|
||||||
|
if plugins_loader is not None:
|
||||||
|
submenu = plugins_loader.get_menu(self.listMenu, num)
|
||||||
if len(submenu):
|
if len(submenu):
|
||||||
plug = self.listMenu.addMenu(QtGui.QApplication.translate("MainWindow", 'Plugins', None, QtGui.QApplication.UnicodeUTF8))
|
plug = self.listMenu.addMenu(QtGui.QApplication.translate("MainWindow", 'Plugins', None, QtGui.QApplication.UnicodeUTF8))
|
||||||
plug.addActions(submenu)
|
plug.addActions(submenu)
|
||||||
self.connect(set_alias_item, QtCore.SIGNAL("triggered()"), lambda: self.set_alias(num))
|
self.connect(set_alias_item, QtCore.SIGNAL("triggered()"), lambda: self.set_alias(num))
|
||||||
self.connect(remove_item, QtCore.SIGNAL("triggered()"), lambda: self.remove_friend(num))
|
self.connect(remove_item, QtCore.SIGNAL("triggered()"), lambda: self.remove_friend(num))
|
||||||
|
self.connect(block_item, QtCore.SIGNAL("triggered()"), lambda: self.block_friend(num))
|
||||||
self.connect(copy_key_item, QtCore.SIGNAL("triggered()"), lambda: self.copy_friend_key(num))
|
self.connect(copy_key_item, QtCore.SIGNAL("triggered()"), lambda: self.copy_friend_key(num))
|
||||||
self.connect(clear_history_item, QtCore.SIGNAL("triggered()"), lambda: self.clear_history(num))
|
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(auto_accept_item, QtCore.SIGNAL("triggered()"), lambda: self.auto_accept(num, not allowed))
|
||||||
@ -644,6 +665,10 @@ class MainWindow(QtGui.QMainWindow, Singleton):
|
|||||||
def remove_friend(self, num):
|
def remove_friend(self, num):
|
||||||
self.profile.delete_friend(num)
|
self.profile.delete_friend(num)
|
||||||
|
|
||||||
|
def block_friend(self, num):
|
||||||
|
friend = self.profile.get_friend(num)
|
||||||
|
self.profile.block_user(friend.tox_id)
|
||||||
|
|
||||||
def copy_friend_key(self, num):
|
def copy_friend_key(self, num):
|
||||||
tox_id = self.profile.friend_public_key(num)
|
tox_id = self.profile.friend_public_key(num)
|
||||||
clipboard = QtGui.QApplication.clipboard()
|
clipboard = QtGui.QApplication.clipboard()
|
||||||
@ -685,7 +710,22 @@ class MainWindow(QtGui.QMainWindow, Singleton):
|
|||||||
else:
|
else:
|
||||||
super(MainWindow, self).mouseReleaseEvent(event)
|
super(MainWindow, self).mouseReleaseEvent(event)
|
||||||
|
|
||||||
|
def show(self):
|
||||||
|
super().show()
|
||||||
|
self.profile.update()
|
||||||
|
|
||||||
def filtering(self):
|
def filtering(self):
|
||||||
ind = self.online_contacts.currentIndex()
|
ind = self.online_contacts.currentIndex()
|
||||||
d = {0: 0, 1: 1, 2: 2, 3: 4, 4: 1 | 4, 5: 2 | 4}
|
d = {0: 0, 1: 1, 2: 2, 3: 4, 4: 1 | 4, 5: 2 | 4}
|
||||||
self.profile.filtration_and_sorting(d[ind], self.contact_name.text())
|
self.profile.filtration_and_sorting(d[ind], self.contact_name.text())
|
||||||
|
|
||||||
|
def show_search_field(self):
|
||||||
|
if hasattr(self, 'search_field') and self.search_field.isVisible():
|
||||||
|
return
|
||||||
|
if self.profile.get_curr_friend() is None:
|
||||||
|
return
|
||||||
|
self.search_field = SearchScreen(self.messages, self.messages.width(), self.messages.parent())
|
||||||
|
x, y = self.messages.x(), self.messages.y() + self.messages.height() - 40
|
||||||
|
self.search_field.setGeometry(x, y, self.messages.width(), 40)
|
||||||
|
self.messages.setGeometry(x, self.messages.y(), self.messages.width(), self.messages.height() - 40)
|
||||||
|
self.search_field.show()
|
||||||
|
@ -2,7 +2,7 @@ try:
|
|||||||
from PySide import QtCore, QtGui
|
from PySide import QtCore, QtGui
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
from widgets import RubberBand, create_menu, QRightClickButton, CenteredWidget
|
from widgets import RubberBand, create_menu, QRightClickButton, CenteredWidget, LineEdit
|
||||||
from profile import Profile
|
from profile import Profile
|
||||||
import smileys
|
import smileys
|
||||||
import util
|
import util
|
||||||
@ -363,11 +363,7 @@ class WelcomeScreen(CenteredWidget):
|
|||||||
text = QtGui.QApplication.translate('WelcomeScreen',
|
text = QtGui.QApplication.translate('WelcomeScreen',
|
||||||
'Since v0.1.3 Toxygen supports plugins. <a href="https://github.com/xveduk/toxygen/blob/master/docs/plugins.md">Read more</a>',
|
'Since v0.1.3 Toxygen supports plugins. <a href="https://github.com/xveduk/toxygen/blob/master/docs/plugins.md">Read more</a>',
|
||||||
None, QtGui.QApplication.UnicodeUTF8)
|
None, QtGui.QApplication.UnicodeUTF8)
|
||||||
elif num == 6:
|
elif num in (6, 7):
|
||||||
text = QtGui.QApplication.translate('WelcomeScreen',
|
|
||||||
'New in Toxygen v0.2.6:<br>Updater<br>Better contact sorting<br>Plugins improvements',
|
|
||||||
None, QtGui.QApplication.UnicodeUTF8)
|
|
||||||
elif num == 7:
|
|
||||||
text = QtGui.QApplication.translate('WelcomeScreen',
|
text = QtGui.QApplication.translate('WelcomeScreen',
|
||||||
'Toxygen supports faux offline messages and file transfers. Send message or file to offline friend and he will get it later.',
|
'Toxygen supports faux offline messages and file transfers. Send message or file to offline friend and he will get it later.',
|
||||||
None, QtGui.QApplication.UnicodeUTF8)
|
None, QtGui.QApplication.UnicodeUTF8)
|
||||||
@ -404,3 +400,130 @@ class MainMenuButton(QtGui.QPushButton):
|
|||||||
metrics = QtGui.QFontMetrics(self.font())
|
metrics = QtGui.QFontMetrics(self.font())
|
||||||
self.setFixedWidth(metrics.size(QtCore.Qt.TextSingleLine, text).width() + 20)
|
self.setFixedWidth(metrics.size(QtCore.Qt.TextSingleLine, text).width() + 20)
|
||||||
super().setText(text)
|
super().setText(text)
|
||||||
|
|
||||||
|
|
||||||
|
class ClickableLabel(QtGui.QLabel):
|
||||||
|
|
||||||
|
def __init__(self, *args):
|
||||||
|
super().__init__(*args)
|
||||||
|
|
||||||
|
def mouseReleaseEvent(self, ev):
|
||||||
|
self.emit(QtCore.SIGNAL('clicked()'))
|
||||||
|
|
||||||
|
|
||||||
|
class SearchScreen(QtGui.QWidget):
|
||||||
|
|
||||||
|
def __init__(self, messages, width, *args):
|
||||||
|
super().__init__(*args)
|
||||||
|
self.setMaximumSize(width, 40)
|
||||||
|
self.setMinimumSize(width, 40)
|
||||||
|
self._messages = messages
|
||||||
|
|
||||||
|
self.search_text = LineEdit(self)
|
||||||
|
self.search_text.setGeometry(0, 0, width - 160, 40)
|
||||||
|
|
||||||
|
self.search_button = ClickableLabel(self)
|
||||||
|
self.search_button.setGeometry(width - 160, 0, 40, 40)
|
||||||
|
pixmap = QtGui.QPixmap()
|
||||||
|
pixmap.load(util.curr_directory() + '/images/search.png')
|
||||||
|
self.search_button.setScaledContents(False)
|
||||||
|
self.search_button.setAlignment(QtCore.Qt.AlignCenter)
|
||||||
|
self.search_button.setPixmap(pixmap)
|
||||||
|
self.connect(self.search_button, QtCore.SIGNAL('clicked()'), self.search)
|
||||||
|
|
||||||
|
font = QtGui.QFont()
|
||||||
|
font.setPointSize(32)
|
||||||
|
font.setBold(True)
|
||||||
|
|
||||||
|
self.prev_button = QtGui.QPushButton(self)
|
||||||
|
self.prev_button.setGeometry(width - 120, 0, 40, 40)
|
||||||
|
self.prev_button.clicked.connect(self.prev)
|
||||||
|
self.prev_button.setText('\u25B2')
|
||||||
|
|
||||||
|
self.next_button = QtGui.QPushButton(self)
|
||||||
|
self.next_button.setGeometry(width - 80, 0, 40, 40)
|
||||||
|
self.next_button.clicked.connect(self.next)
|
||||||
|
self.next_button.setText('\u25BC')
|
||||||
|
|
||||||
|
self.close_button = QtGui.QPushButton(self)
|
||||||
|
self.close_button.setGeometry(width - 40, 0, 40, 40)
|
||||||
|
self.close_button.clicked.connect(self.close)
|
||||||
|
self.close_button.setText('×')
|
||||||
|
self.close_button.setFont(font)
|
||||||
|
|
||||||
|
font.setPointSize(18)
|
||||||
|
self.next_button.setFont(font)
|
||||||
|
self.prev_button.setFont(font)
|
||||||
|
|
||||||
|
self.retranslateUi()
|
||||||
|
|
||||||
|
def retranslateUi(self):
|
||||||
|
self.search_text.setPlaceholderText(QtGui.QApplication.translate("MainWindow", "Search", None,
|
||||||
|
QtGui.QApplication.UnicodeUTF8))
|
||||||
|
|
||||||
|
def show(self):
|
||||||
|
super().show()
|
||||||
|
self.search_text.setFocus()
|
||||||
|
|
||||||
|
def search(self):
|
||||||
|
Profile.get_instance().update()
|
||||||
|
text = self.search_text.text()
|
||||||
|
friend = Profile.get_instance().get_curr_friend()
|
||||||
|
if text and friend and util.is_re_valid(text):
|
||||||
|
index = friend.search_string(text)
|
||||||
|
self.load_messages(index)
|
||||||
|
|
||||||
|
def prev(self):
|
||||||
|
friend = Profile.get_instance().get_curr_friend()
|
||||||
|
if friend is not None:
|
||||||
|
index = friend.search_prev()
|
||||||
|
self.load_messages(index)
|
||||||
|
|
||||||
|
def next(self):
|
||||||
|
friend = Profile.get_instance().get_curr_friend()
|
||||||
|
text = self.search_text.text()
|
||||||
|
if friend is not None:
|
||||||
|
index = friend.search_next()
|
||||||
|
if index is not None:
|
||||||
|
count = self._messages.count()
|
||||||
|
index += count
|
||||||
|
item = self._messages.item(index)
|
||||||
|
self._messages.scrollToItem(item)
|
||||||
|
self._messages.itemWidget(item).select_text(text)
|
||||||
|
else:
|
||||||
|
self.not_found(text)
|
||||||
|
|
||||||
|
def load_messages(self, index):
|
||||||
|
text = self.search_text.text()
|
||||||
|
if index is not None:
|
||||||
|
profile = Profile.get_instance()
|
||||||
|
count = self._messages.count()
|
||||||
|
while count + index < 0:
|
||||||
|
profile.load_history()
|
||||||
|
count = self._messages.count()
|
||||||
|
index += count
|
||||||
|
item = self._messages.item(index)
|
||||||
|
self._messages.scrollToItem(item)
|
||||||
|
self._messages.itemWidget(item).select_text(text)
|
||||||
|
else:
|
||||||
|
self.not_found(text)
|
||||||
|
|
||||||
|
def closeEvent(self, *args):
|
||||||
|
Profile.get_instance().update()
|
||||||
|
self._messages.setGeometry(0, 0, self._messages.width(), self._messages.height() + 40)
|
||||||
|
super().closeEvent(*args)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def not_found(text):
|
||||||
|
mbox = QtGui.QMessageBox()
|
||||||
|
mbox_text = QtGui.QApplication.translate("MainWindow",
|
||||||
|
'Text "{}" was not found',
|
||||||
|
None,
|
||||||
|
QtGui.QApplication.UnicodeUTF8)
|
||||||
|
|
||||||
|
mbox.setText(mbox_text.format(text))
|
||||||
|
mbox.setWindowTitle(QtGui.QApplication.translate("MainWindow",
|
||||||
|
'Not found',
|
||||||
|
None,
|
||||||
|
QtGui.QApplication.UnicodeUTF8))
|
||||||
|
mbox.exec_()
|
||||||
|
@ -7,7 +7,7 @@ from profile import Profile
|
|||||||
from util import curr_directory, copy
|
from util import curr_directory, copy
|
||||||
from widgets import CenteredWidget, DataLabel, LineEdit
|
from widgets import CenteredWidget, DataLabel, LineEdit
|
||||||
import pyaudio
|
import pyaudio
|
||||||
import toxencryptsave
|
import toxes
|
||||||
import plugin_support
|
import plugin_support
|
||||||
import updater
|
import updater
|
||||||
|
|
||||||
@ -215,7 +215,7 @@ class ProfileSettings(CenteredWidget):
|
|||||||
def new_password(self):
|
def new_password(self):
|
||||||
if self.password.text() == self.confirm_password.text():
|
if self.password.text() == self.confirm_password.text():
|
||||||
if not len(self.password.text()) or len(self.password.text()) >= 8:
|
if not len(self.password.text()) or len(self.password.text()) >= 8:
|
||||||
e = toxencryptsave.ToxEncryptSave.get_instance()
|
e = toxes.ToxES.get_instance()
|
||||||
e.set_password(self.password.text())
|
e.set_password(self.password.text())
|
||||||
self.close()
|
self.close()
|
||||||
else:
|
else:
|
||||||
|
@ -4,7 +4,7 @@ import os
|
|||||||
import importlib
|
import importlib
|
||||||
import inspect
|
import inspect
|
||||||
import plugins.plugin_super_class as pl
|
import plugins.plugin_super_class as pl
|
||||||
import toxencryptsave
|
import toxes
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ class PluginLoader(util.Singleton):
|
|||||||
self._settings = settings
|
self._settings = settings
|
||||||
self._plugins = {} # dict. key - plugin unique short name, value - tuple (plugin instance, is active)
|
self._plugins = {} # dict. key - plugin unique short name, value - tuple (plugin instance, is active)
|
||||||
self._tox = tox
|
self._tox = tox
|
||||||
self._encr = toxencryptsave.ToxEncryptSave.get_instance()
|
self._encr = toxes.ToxES.get_instance()
|
||||||
|
|
||||||
def set_tox(self, tox):
|
def set_tox(self, tox):
|
||||||
"""
|
"""
|
||||||
@ -51,7 +51,8 @@ class PluginLoader(util.Singleton):
|
|||||||
continue
|
continue
|
||||||
for elem in dir(module):
|
for elem in dir(module):
|
||||||
obj = getattr(module, elem)
|
obj = getattr(module, elem)
|
||||||
if inspect.isclass(obj) and hasattr(obj, 'is_plugin') and obj.is_plugin: # looking for plugin class in module
|
# looking for plugin class in module
|
||||||
|
if inspect.isclass(obj) and hasattr(obj, 'is_plugin') and obj.is_plugin:
|
||||||
print('Plugin', elem)
|
print('Plugin', elem)
|
||||||
try: # create instance of plugin class
|
try: # create instance of plugin class
|
||||||
inst = obj(self._tox, self._profile, self._settings, self._encr)
|
inst = obj(self._tox, self._profile, self._settings, self._encr)
|
||||||
@ -165,3 +166,8 @@ class PluginLoader(util.Singleton):
|
|||||||
if self._plugins[key][1]:
|
if self._plugins[key][1]:
|
||||||
self._plugins[key][0].close()
|
self._plugins[key][0].close()
|
||||||
del self._plugins[key]
|
del self._plugins[key]
|
||||||
|
|
||||||
|
def reload(self):
|
||||||
|
print('Reloading plugins')
|
||||||
|
self.stop()
|
||||||
|
self.load()
|
||||||
|
@ -31,7 +31,7 @@ def log(name, data):
|
|||||||
|
|
||||||
class PluginSuperClass:
|
class PluginSuperClass:
|
||||||
"""
|
"""
|
||||||
Superclass for all plugins. Plugin is python module with at least one class derived from PluginSuperClass.
|
Superclass for all plugins. Plugin is Python3 module with at least one class derived from PluginSuperClass.
|
||||||
"""
|
"""
|
||||||
is_plugin = True
|
is_plugin = True
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ class PluginSuperClass:
|
|||||||
:param tox: tox instance
|
:param tox: tox instance
|
||||||
:param profile: profile instance
|
:param profile: profile instance
|
||||||
:param settings: profile settings
|
:param settings: profile settings
|
||||||
:param encrypt_save: LibToxEncryptSave instance.
|
:param encrypt_save: ToxES instance.
|
||||||
"""
|
"""
|
||||||
self._settings = settings
|
self._settings = settings
|
||||||
self._profile = profile
|
self._profile = profile
|
||||||
@ -169,7 +169,7 @@ class PluginSuperClass:
|
|||||||
def load_settings(self):
|
def load_settings(self):
|
||||||
"""
|
"""
|
||||||
This method loads settings of plugin and returns raw data
|
This method loads settings of plugin and returns raw data
|
||||||
If file doesn't this method raises exception
|
If file doesn't exist this method raises exception
|
||||||
"""
|
"""
|
||||||
with open(path_to_data(self._short_name) + 'settings.json', 'rb') as fl:
|
with open(path_to_data(self._short_name) + 'settings.json', 'rb') as fl:
|
||||||
data = fl.read()
|
data = fl.read()
|
||||||
|
@ -41,6 +41,7 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
self._call = calls.AV(tox.AV) # object with data about calls
|
self._call = calls.AV(tox.AV) # object with data about calls
|
||||||
self._incoming_calls = set()
|
self._incoming_calls = set()
|
||||||
self._load_history = True
|
self._load_history = True
|
||||||
|
self._waiting_for_reconnection = False
|
||||||
self._factory = items_factory.ItemsFactory(self._screen.friends_list, self._messages)
|
self._factory = items_factory.ItemsFactory(self._screen.friends_list, self._messages)
|
||||||
settings = Settings.get_instance()
|
settings = Settings.get_instance()
|
||||||
self._sorting = settings['sorting']
|
self._sorting = settings['sorting']
|
||||||
@ -86,8 +87,9 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
super(Profile, self).set_status(status)
|
super(Profile, self).set_status(status)
|
||||||
if status is not None:
|
if status is not None:
|
||||||
self._tox.self_set_status(status)
|
self._tox.self_set_status(status)
|
||||||
else:
|
elif not self._waiting_for_reconnection:
|
||||||
QtCore.QTimer.singleShot(45000, self.reconnect)
|
self._waiting_for_reconnection = True
|
||||||
|
QtCore.QTimer.singleShot(50000, self.reconnect)
|
||||||
|
|
||||||
def set_name(self, value):
|
def set_name(self, value):
|
||||||
if self.name == value:
|
if self.name == value:
|
||||||
@ -127,6 +129,7 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
"""
|
"""
|
||||||
filter_str = filter_str.lower()
|
filter_str = filter_str.lower()
|
||||||
settings = Settings.get_instance()
|
settings = Settings.get_instance()
|
||||||
|
number = self.get_active_number()
|
||||||
if sorting > 1:
|
if sorting > 1:
|
||||||
if sorting & 2:
|
if sorting & 2:
|
||||||
self._contacts = sorted(self._contacts, key=lambda x: int(x.status is not None), reverse=True)
|
self._contacts = sorted(self._contacts, key=lambda x: int(x.status is not None), reverse=True)
|
||||||
@ -162,6 +165,7 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
self._sorting, self._filter_string = sorting, filter_str
|
self._sorting, self._filter_string = sorting, filter_str
|
||||||
settings['sorting'] = self._sorting
|
settings['sorting'] = self._sorting
|
||||||
settings.save()
|
settings.save()
|
||||||
|
self.set_active_by_number(number)
|
||||||
|
|
||||||
def update_filtration(self):
|
def update_filtration(self):
|
||||||
"""
|
"""
|
||||||
@ -181,6 +185,9 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
return None
|
return None
|
||||||
return self._contacts[num]
|
return self._contacts[num]
|
||||||
|
|
||||||
|
def get_curr_friend(self):
|
||||||
|
return self._contacts[self._active_friend] if self._active_friend + 1 else None
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------------------------------------------
|
||||||
# Work with active friend
|
# Work with active friend
|
||||||
# -----------------------------------------------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------------------------------------------
|
||||||
@ -209,10 +216,11 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
if value is not None:
|
if value is not None:
|
||||||
if self._active_friend + 1 and self._active_friend != value:
|
if self._active_friend + 1 and self._active_friend != value:
|
||||||
try:
|
try:
|
||||||
self._contacts[self._active_friend].curr_text = self._screen.messageEdit.toPlainText()
|
self.get_curr_friend().curr_text = self._screen.messageEdit.toPlainText()
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
friend = self._contacts[value]
|
friend = self._contacts[value]
|
||||||
|
friend.remove_invalid_unsent_files()
|
||||||
if self._active_friend != value:
|
if self._active_friend != value:
|
||||||
self._screen.messageEdit.setPlainText(friend.curr_text)
|
self._screen.messageEdit.setPlainText(friend.curr_text)
|
||||||
self._active_friend = value
|
self._active_friend = value
|
||||||
@ -259,7 +267,7 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
else:
|
else:
|
||||||
self._screen.call_finished()
|
self._screen.call_finished()
|
||||||
else:
|
else:
|
||||||
friend = self._contacts[self._active_friend]
|
friend = self.get_curr_friend()
|
||||||
|
|
||||||
self._screen.account_name.setText(friend.name)
|
self._screen.account_name.setText(friend.name)
|
||||||
self._screen.account_status.setText(friend.status_message)
|
self._screen.account_status.setText(friend.status_message)
|
||||||
@ -270,28 +278,33 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
pixmap = QtGui.QPixmap(avatar_path)
|
pixmap = QtGui.QPixmap(avatar_path)
|
||||||
self._screen.account_avatar.setPixmap(pixmap.scaled(64, 64, QtCore.Qt.KeepAspectRatio,
|
self._screen.account_avatar.setPixmap(pixmap.scaled(64, 64, QtCore.Qt.KeepAspectRatio,
|
||||||
QtCore.Qt.SmoothTransformation))
|
QtCore.Qt.SmoothTransformation))
|
||||||
self.update_filtration()
|
|
||||||
except Exception as ex: # no friend found. ignore
|
except Exception as ex: # no friend found. ignore
|
||||||
log('Friend value: ' + str(value))
|
log('Friend value: ' + str(value))
|
||||||
log('Error in set active: ' + str(ex))
|
log('Error in set active: ' + str(ex))
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
def set_active_by_number(self, number):
|
||||||
|
for i in range(len(self._contacts)):
|
||||||
|
if self._contacts[i].number == number:
|
||||||
|
self._active_friend = i
|
||||||
|
break
|
||||||
|
|
||||||
active_friend = property(get_active, set_active)
|
active_friend = property(get_active, set_active)
|
||||||
|
|
||||||
def get_last_message(self):
|
def get_last_message(self):
|
||||||
if self._active_friend + 1:
|
if self._active_friend + 1:
|
||||||
return self._contacts[self._active_friend].get_last_message_text()
|
return self.get_curr_friend().get_last_message_text()
|
||||||
else:
|
else:
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
def get_active_number(self):
|
def get_active_number(self):
|
||||||
return self._contacts[self._active_friend].number if self._active_friend + 1 else -1
|
return self.get_curr_friend().number if self._active_friend + 1 else -1
|
||||||
|
|
||||||
def get_active_name(self):
|
def get_active_name(self):
|
||||||
return self._contacts[self._active_friend].name if self._active_friend + 1 else ''
|
return self.get_curr_friend().name if self._active_friend + 1 else ''
|
||||||
|
|
||||||
def is_active_online(self):
|
def is_active_online(self):
|
||||||
return self._active_friend + 1 and self._contacts[self._active_friend].status is not None
|
return self._active_friend + 1 and self.get_curr_friend().status is not None
|
||||||
|
|
||||||
def new_name(self, number, name):
|
def new_name(self, number, name):
|
||||||
friend = self.get_friend_by_number(number)
|
friend = self.get_friend_by_number(number)
|
||||||
@ -318,6 +331,7 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
|
|
||||||
def send_files(self, friend_number):
|
def send_files(self, friend_number):
|
||||||
friend = self.get_friend_by_number(friend_number)
|
friend = self.get_friend_by_number(friend_number)
|
||||||
|
friend.remove_invalid_unsent_files()
|
||||||
files = friend.get_unsent_files()
|
files = friend.get_unsent_files()
|
||||||
try:
|
try:
|
||||||
for fl in files:
|
for fl in files:
|
||||||
@ -366,7 +380,7 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
"""
|
"""
|
||||||
if Settings.get_instance()['typing_notifications'] and self._active_friend + 1:
|
if Settings.get_instance()['typing_notifications'] and self._active_friend + 1:
|
||||||
try:
|
try:
|
||||||
friend = self._contacts[self._active_friend]
|
friend = self.get_curr_friend()
|
||||||
if friend.status is not None:
|
if friend.status is not None:
|
||||||
self._tox.self_set_typing(friend.number, typing)
|
self._tox.self_set_typing(friend.number, typing)
|
||||||
except:
|
except:
|
||||||
@ -399,25 +413,25 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
for message in messages:
|
for message in messages:
|
||||||
self.split_and_send(friend_number, message.get_data()[-1], message.get_data()[0].encode('utf-8'))
|
self.split_and_send(friend_number, message.get_data()[-1], message.get_data()[0].encode('utf-8'))
|
||||||
friend.inc_receipts()
|
friend.inc_receipts()
|
||||||
except:
|
except Exception as ex:
|
||||||
pass
|
log('Sending pending messages failed with ' + str(ex))
|
||||||
|
|
||||||
def split_and_send(self, number, message_type, message):
|
def split_and_send(self, number, message_type, message):
|
||||||
"""
|
"""
|
||||||
Message splitting
|
Message splitting. Message length cannot be > TOX_MAX_MESSAGE_LENGTH
|
||||||
:param number: friend's number
|
:param number: friend's number
|
||||||
:param message_type: type of message
|
:param message_type: type of message
|
||||||
:param message: message text
|
:param message: message text
|
||||||
"""
|
"""
|
||||||
while len(message) > TOX_MAX_MESSAGE_LENGTH:
|
while len(message) > TOX_MAX_MESSAGE_LENGTH:
|
||||||
size = TOX_MAX_MESSAGE_LENGTH * 4 / 5
|
size = TOX_MAX_MESSAGE_LENGTH * 4 // 5
|
||||||
last_part = message[size:TOX_MAX_MESSAGE_LENGTH]
|
last_part = message[size:TOX_MAX_MESSAGE_LENGTH]
|
||||||
if ' ' in last_part:
|
if b' ' in last_part:
|
||||||
index = last_part.index(' ')
|
index = last_part.index(b' ')
|
||||||
elif ',' in last_part:
|
elif b',' in last_part:
|
||||||
index = last_part.index(',')
|
index = last_part.index(b',')
|
||||||
elif '.' in last_part:
|
elif b'.' in last_part:
|
||||||
index = last_part.index('.')
|
index = last_part.index(b'.')
|
||||||
else:
|
else:
|
||||||
index = TOX_MAX_MESSAGE_LENGTH - size - 1
|
index = TOX_MAX_MESSAGE_LENGTH - size - 1
|
||||||
index += size + 1
|
index += size + 1
|
||||||
@ -436,7 +450,7 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
t = time.time()
|
t = time.time()
|
||||||
self.create_message_item(message, t, MESSAGE_OWNER['FRIEND'], message_type)
|
self.create_message_item(message, t, MESSAGE_OWNER['FRIEND'], message_type)
|
||||||
self._messages.scrollToBottom()
|
self._messages.scrollToBottom()
|
||||||
self._contacts[self._active_friend].append_message(
|
self.get_curr_friend().append_message(
|
||||||
TextMessage(message, MESSAGE_OWNER['FRIEND'], t, message_type))
|
TextMessage(message, MESSAGE_OWNER['FRIEND'], t, message_type))
|
||||||
else:
|
else:
|
||||||
friend = self.get_friend_by_number(friend_num)
|
friend = self.get_friend_by_number(friend_num)
|
||||||
@ -475,7 +489,7 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
friend.append_message(TextMessage(text, MESSAGE_OWNER['NOT_SENT'], t, message_type))
|
friend.append_message(TextMessage(text, MESSAGE_OWNER['NOT_SENT'], t, message_type))
|
||||||
|
|
||||||
def delete_message(self, time):
|
def delete_message(self, time):
|
||||||
friend = self._contacts[self._active_friend]
|
friend = self.get_curr_friend()
|
||||||
friend.delete_message(time)
|
friend.delete_message(time)
|
||||||
self._history.delete_message(friend.tox_id, time)
|
self._history.delete_message(friend.tox_id, time)
|
||||||
self.update()
|
self.update()
|
||||||
@ -529,7 +543,7 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
if not self._load_history:
|
if not self._load_history:
|
||||||
return
|
return
|
||||||
self._load_history = False
|
self._load_history = False
|
||||||
friend = self._contacts[self._active_friend]
|
friend = self.get_curr_friend()
|
||||||
friend.load_corr(False)
|
friend.load_corr(False)
|
||||||
data = friend.get_corr()
|
data = friend.get_corr()
|
||||||
if not data:
|
if not data:
|
||||||
@ -617,7 +631,7 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
pixmap = None
|
pixmap = None
|
||||||
if self._show_avatars:
|
if self._show_avatars:
|
||||||
if owner == MESSAGE_OWNER['FRIEND']:
|
if owner == MESSAGE_OWNER['FRIEND']:
|
||||||
pixmap = self._contacts[self._active_friend].get_pixmap()
|
pixmap = self.get_curr_friend().get_pixmap()
|
||||||
else:
|
else:
|
||||||
pixmap = self.get_pixmap()
|
pixmap = self.get_pixmap()
|
||||||
return self._factory.message_item(text, time, name, owner != MESSAGE_OWNER['NOT_SENT'],
|
return self._factory.message_item(text, time, name, owner != MESSAGE_OWNER['NOT_SENT'],
|
||||||
@ -845,9 +859,11 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
self.update_filtration()
|
self.update_filtration()
|
||||||
|
|
||||||
def reconnect(self):
|
def reconnect(self):
|
||||||
|
self._waiting_for_reconnection = False
|
||||||
if self.status is None or all(list(map(lambda x: x.status is None, self._contacts))) and len(self._contacts):
|
if self.status is None or all(list(map(lambda x: x.status is None, self._contacts))) and len(self._contacts):
|
||||||
|
self._waiting_for_reconnection = True
|
||||||
self.reset(self._screen.reset)
|
self.reset(self._screen.reset)
|
||||||
QtCore.QTimer.singleShot(45000, self.reconnect)
|
QtCore.QTimer.singleShot(50000, self.reconnect)
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
for friend in self._contacts:
|
for friend in self._contacts:
|
||||||
@ -876,7 +892,7 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
settings = Settings.get_instance()
|
settings = Settings.get_instance()
|
||||||
friend = self.get_friend_by_number(friend_number)
|
friend = self.get_friend_by_number(friend_number)
|
||||||
auto = settings['allow_auto_accept'] and friend.tox_id in settings['auto_accept_from_friends']
|
auto = settings['allow_auto_accept'] and friend.tox_id in settings['auto_accept_from_friends']
|
||||||
inline = (file_name in ALLOWED_FILES) and settings['allow_inline']
|
inline = is_inline(file_name) and settings['allow_inline']
|
||||||
file_id = self._tox.file_get_file_id(friend_number, file_number)
|
file_id = self._tox.file_get_file_id(friend_number, file_number)
|
||||||
accepted = True
|
accepted = True
|
||||||
if file_id in self._paused_file_transfers:
|
if file_id in self._paused_file_transfers:
|
||||||
@ -961,7 +977,7 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
0, -1)
|
0, -1)
|
||||||
|
|
||||||
def cancel_not_started_transfer(self, time):
|
def cancel_not_started_transfer(self, time):
|
||||||
self._contacts[self._active_friend].delete_one_unsent_file(time)
|
self.get_curr_friend().delete_one_unsent_file(time)
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
def pause_transfer(self, friend_number, file_number, by_friend=False):
|
def pause_transfer(self, friend_number, file_number, by_friend=False):
|
||||||
@ -1144,7 +1160,6 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
if not os.path.isfile(avatar_path): # reset image
|
if not os.path.isfile(avatar_path): # reset image
|
||||||
avatar_path = None
|
avatar_path = None
|
||||||
sa = SendAvatar(avatar_path, self._tox, friend_number)
|
sa = SendAvatar(avatar_path, self._tox, friend_number)
|
||||||
sa.set_transfer_finished_handler(self.transfer_finished)
|
|
||||||
self._file_transfers[(friend_number, sa.get_file_number())] = sa
|
self._file_transfers[(friend_number, sa.get_file_number())] = sa
|
||||||
|
|
||||||
def incoming_avatar(self, friend_number, file_number, size):
|
def incoming_avatar(self, friend_number, file_number, size):
|
||||||
@ -1157,6 +1172,7 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
ra = ReceiveAvatar(self._tox, friend_number, size, file_number)
|
ra = ReceiveAvatar(self._tox, friend_number, size, file_number)
|
||||||
if ra.state != TOX_FILE_TRANSFER_STATE['CANCELLED']:
|
if ra.state != TOX_FILE_TRANSFER_STATE['CANCELLED']:
|
||||||
self._file_transfers[(friend_number, file_number)] = ra
|
self._file_transfers[(friend_number, file_number)] = ra
|
||||||
|
ra.set_transfer_finished_handler(self.transfer_finished)
|
||||||
else:
|
else:
|
||||||
self.get_friend_by_number(friend_number).load_avatar()
|
self.get_friend_by_number(friend_number).load_avatar()
|
||||||
if self.get_active_number() == friend_number:
|
if self.get_active_number() == friend_number:
|
||||||
@ -1195,7 +1211,7 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
else:
|
else:
|
||||||
text = QtGui.QApplication.translate("incoming_call", "Outgoing audio call", None,
|
text = QtGui.QApplication.translate("incoming_call", "Outgoing audio call", None,
|
||||||
QtGui.QApplication.UnicodeUTF8)
|
QtGui.QApplication.UnicodeUTF8)
|
||||||
self._contacts[self._active_friend].append_message(InfoMessage(text, time.time()))
|
self.get_curr_friend().append_message(InfoMessage(text, time.time()))
|
||||||
self.create_message_item(text, time.time(), '', MESSAGE_TYPE['INFO_MESSAGE'])
|
self.create_message_item(text, time.time(), '', MESSAGE_TYPE['INFO_MESSAGE'])
|
||||||
self._messages.scrollToBottom()
|
self._messages.scrollToBottom()
|
||||||
elif num in self._call: # finish or cancel call if you call with active friend
|
elif num in self._call: # finish or cancel call if you call with active friend
|
||||||
|
@ -3,7 +3,7 @@ import json
|
|||||||
import os
|
import os
|
||||||
from util import Singleton, curr_directory, log, copy, append_slash
|
from util import Singleton, curr_directory, log, copy, append_slash
|
||||||
import pyaudio
|
import pyaudio
|
||||||
from toxencryptsave import ToxEncryptSave
|
from toxes import ToxES
|
||||||
import smileys
|
import smileys
|
||||||
|
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ class Settings(dict, Singleton):
|
|||||||
if os.path.isfile(self.path):
|
if os.path.isfile(self.path):
|
||||||
with open(self.path, 'rb') as fl:
|
with open(self.path, 'rb') as fl:
|
||||||
data = fl.read()
|
data = fl.read()
|
||||||
inst = ToxEncryptSave.get_instance()
|
inst = ToxES.get_instance()
|
||||||
try:
|
try:
|
||||||
if inst.is_data_encrypted(data):
|
if inst.is_data_encrypted(data):
|
||||||
data = inst.pass_decrypt(data)
|
data = inst.pass_decrypt(data)
|
||||||
@ -35,6 +35,7 @@ class Settings(dict, Singleton):
|
|||||||
smileys.SmileyLoader(self)
|
smileys.SmileyLoader(self)
|
||||||
self.locked = False
|
self.locked = False
|
||||||
self.closing = False
|
self.closing = False
|
||||||
|
self.unlockScreen = False
|
||||||
p = pyaudio.PyAudio()
|
p = pyaudio.PyAudio()
|
||||||
input_devices = output_devices = 0
|
input_devices = output_devices = 0
|
||||||
for i in range(p.get_device_count()):
|
for i in range(p.get_device_count()):
|
||||||
@ -49,7 +50,7 @@ class Settings(dict, Singleton):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_auto_profile():
|
def get_auto_profile():
|
||||||
p = Settings.get_default_path() + 'toxygen.json'
|
p = Settings.get_global_settings_path()
|
||||||
if os.path.isfile(p):
|
if os.path.isfile(p):
|
||||||
with open(p) as fl:
|
with open(p) as fl:
|
||||||
data = fl.read()
|
data = fl.read()
|
||||||
@ -60,7 +61,7 @@ class Settings(dict, Singleton):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def set_auto_profile(path, name):
|
def set_auto_profile(path, name):
|
||||||
p = Settings.get_default_path() + 'toxygen.json'
|
p = Settings.get_global_settings_path()
|
||||||
if os.path.isfile(p):
|
if os.path.isfile(p):
|
||||||
with open(p) as fl:
|
with open(p) as fl:
|
||||||
data = fl.read()
|
data = fl.read()
|
||||||
@ -74,7 +75,7 @@ class Settings(dict, Singleton):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def reset_auto_profile():
|
def reset_auto_profile():
|
||||||
p = Settings.get_default_path() + 'toxygen.json'
|
p = Settings.get_global_settings_path()
|
||||||
if os.path.isfile(p):
|
if os.path.isfile(p):
|
||||||
with open(p) as fl:
|
with open(p) as fl:
|
||||||
data = fl.read()
|
data = fl.read()
|
||||||
@ -89,15 +90,8 @@ class Settings(dict, Singleton):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def is_active_profile(path, name):
|
def is_active_profile(path, name):
|
||||||
path = path + name + '.tox'
|
path = path + name + '.lock'
|
||||||
settings = Settings.get_default_path() + 'toxygen.json'
|
return os.path.isfile(path)
|
||||||
if os.path.isfile(settings):
|
|
||||||
with open(settings) as fl:
|
|
||||||
data = fl.read()
|
|
||||||
data = json.loads(data)
|
|
||||||
if 'active_profile' in data:
|
|
||||||
return path in data['active_profile']
|
|
||||||
return False
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_default_settings():
|
def get_default_settings():
|
||||||
@ -167,7 +161,7 @@ class Settings(dict, Singleton):
|
|||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
text = json.dumps(self)
|
text = json.dumps(self)
|
||||||
inst = ToxEncryptSave.get_instance()
|
inst = ToxES.get_instance()
|
||||||
if inst.has_password():
|
if inst.has_password():
|
||||||
text = bytes(inst.pass_encrypt(bytes(text, 'utf-8')))
|
text = bytes(inst.pass_encrypt(bytes(text, 'utf-8')))
|
||||||
else:
|
else:
|
||||||
@ -176,37 +170,19 @@ class Settings(dict, Singleton):
|
|||||||
fl.write(text)
|
fl.write(text)
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
path = Settings.get_default_path() + 'toxygen.json'
|
profile_path = ProfileHelper.get_path()
|
||||||
|
path = str(profile_path + str(self.name) + '.lock')
|
||||||
if os.path.isfile(path):
|
if os.path.isfile(path):
|
||||||
with open(path) as fl:
|
os.remove(path)
|
||||||
data = fl.read()
|
|
||||||
app_settings = json.loads(data)
|
|
||||||
try:
|
|
||||||
app_settings['active_profile'].remove(str(ProfileHelper.get_path() + self.name + '.tox'))
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
data = json.dumps(app_settings)
|
|
||||||
with open(path, 'w') as fl:
|
|
||||||
fl.write(data)
|
|
||||||
|
|
||||||
def set_active_profile(self):
|
def set_active_profile(self):
|
||||||
"""
|
"""
|
||||||
Mark current profile as active
|
Mark current profile as active
|
||||||
"""
|
"""
|
||||||
path = Settings.get_default_path() + 'toxygen.json'
|
|
||||||
if os.path.isfile(path):
|
|
||||||
with open(path) as fl:
|
|
||||||
data = fl.read()
|
|
||||||
app_settings = json.loads(data)
|
|
||||||
else:
|
|
||||||
app_settings = {}
|
|
||||||
if 'active_profile' not in app_settings:
|
|
||||||
app_settings['active_profile'] = []
|
|
||||||
profile_path = ProfileHelper.get_path()
|
profile_path = ProfileHelper.get_path()
|
||||||
app_settings['active_profile'].append(str(profile_path + str(self.name) + '.tox'))
|
path = str(profile_path + str(self.name) + '.lock')
|
||||||
data = json.dumps(app_settings)
|
|
||||||
with open(path, 'w') as fl:
|
with open(path, 'w') as fl:
|
||||||
fl.write(data)
|
fl.write('active')
|
||||||
|
|
||||||
def export(self, path):
|
def export(self, path):
|
||||||
text = json.dumps(self)
|
text = json.dumps(self)
|
||||||
@ -216,6 +192,10 @@ class Settings(dict, Singleton):
|
|||||||
def update_path(self):
|
def update_path(self):
|
||||||
self.path = ProfileHelper.get_path() + self.name + '.json'
|
self.path = ProfileHelper.get_path() + self.name + '.json'
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def get_global_settings_path():
|
||||||
|
return curr_directory() + '/toxygen.json'
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_default_path():
|
def get_default_path():
|
||||||
if system() == 'Windows':
|
if system() == 'Windows':
|
||||||
@ -252,7 +232,7 @@ class ProfileHelper(Singleton):
|
|||||||
return self._directory
|
return self._directory
|
||||||
|
|
||||||
def save_profile(self, data):
|
def save_profile(self, data):
|
||||||
inst = ToxEncryptSave.get_instance()
|
inst = ToxES.get_instance()
|
||||||
if inst.has_password():
|
if inst.has_password():
|
||||||
data = inst.pass_encrypt(data)
|
data = inst.pass_encrypt(data)
|
||||||
with open(self._path, 'wb') as fl:
|
with open(self._path, 'wb') as fl:
|
||||||
|
@ -1310,3 +1310,15 @@ QListWidget > QLabel
|
|||||||
width: 0px;
|
width: 0px;
|
||||||
height: 0px;
|
height: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ClickableLabel:focus
|
||||||
|
{
|
||||||
|
border-width: 1px;
|
||||||
|
border-color: #4A4949;
|
||||||
|
border-style: solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
ClickableLabel:hover
|
||||||
|
{
|
||||||
|
background-color: #4A4949;
|
||||||
|
}
|
||||||
|
@ -1,64 +1,25 @@
|
|||||||
import libtox
|
import libtox
|
||||||
import util
|
|
||||||
from ctypes import c_size_t, create_string_buffer, byref, c_int, ArgumentError, c_char_p, c_bool
|
from ctypes import c_size_t, create_string_buffer, byref, c_int, ArgumentError, c_char_p, c_bool
|
||||||
|
from toxencryptsave_enums_and_consts import *
|
||||||
|
|
||||||
|
|
||||||
TOX_ERR_ENCRYPTION = {
|
class ToxEncryptSave:
|
||||||
# The function returned successfully.
|
|
||||||
'OK': 0,
|
|
||||||
# Some input data, or maybe the output pointer, was null.
|
|
||||||
'NULL': 1,
|
|
||||||
# The crypto lib was unable to derive a key from the given passphrase, which is usually a lack of memory issue. The
|
|
||||||
# functions accepting keys do not produce this error.
|
|
||||||
'KEY_DERIVATION_FAILED': 2,
|
|
||||||
# The encryption itself failed.
|
|
||||||
'FAILED': 3
|
|
||||||
}
|
|
||||||
|
|
||||||
TOX_ERR_DECRYPTION = {
|
|
||||||
# The function returned successfully.
|
|
||||||
'OK': 0,
|
|
||||||
# Some input data, or maybe the output pointer, was null.
|
|
||||||
'NULL': 1,
|
|
||||||
# The input data was shorter than TOX_PASS_ENCRYPTION_EXTRA_LENGTH bytes
|
|
||||||
'INVALID_LENGTH': 2,
|
|
||||||
# The input data is missing the magic number (i.e. wasn't created by this module, or is corrupted)
|
|
||||||
'BAD_FORMAT': 3,
|
|
||||||
# The crypto lib was unable to derive a key from the given passphrase, which is usually a lack of memory issue. The
|
|
||||||
# functions accepting keys do not produce this error.
|
|
||||||
'KEY_DERIVATION_FAILED': 4,
|
|
||||||
# The encrypted byte array could not be decrypted. Either the data was corrupt or the password/key was incorrect.
|
|
||||||
'FAILED': 5,
|
|
||||||
}
|
|
||||||
|
|
||||||
TOX_PASS_ENCRYPTION_EXTRA_LENGTH = 80
|
|
||||||
|
|
||||||
|
|
||||||
class ToxEncryptSave(util.Singleton):
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
|
||||||
self.libtoxencryptsave = libtox.LibToxEncryptSave()
|
self.libtoxencryptsave = libtox.LibToxEncryptSave()
|
||||||
self._passphrase = None
|
|
||||||
|
|
||||||
def set_password(self, passphrase):
|
|
||||||
self._passphrase = passphrase
|
|
||||||
|
|
||||||
def has_password(self):
|
|
||||||
return bool(self._passphrase)
|
|
||||||
|
|
||||||
def is_password(self, password):
|
|
||||||
return self._passphrase == password
|
|
||||||
|
|
||||||
def is_data_encrypted(self, data):
|
def is_data_encrypted(self, data):
|
||||||
|
"""
|
||||||
|
Checks if given data is encrypted
|
||||||
|
"""
|
||||||
func = self.libtoxencryptsave.tox_is_data_encrypted
|
func = self.libtoxencryptsave.tox_is_data_encrypted
|
||||||
func.restype = c_bool
|
func.restype = c_bool
|
||||||
result = func(c_char_p(bytes(data)))
|
result = func(c_char_p(bytes(data)))
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def pass_encrypt(self, data):
|
def pass_encrypt(self, data, password):
|
||||||
"""
|
"""
|
||||||
Encrypts the given data with the given passphrase.
|
Encrypts the given data with the given password.
|
||||||
|
|
||||||
:return: output array
|
:return: output array
|
||||||
"""
|
"""
|
||||||
@ -66,8 +27,8 @@ class ToxEncryptSave(util.Singleton):
|
|||||||
tox_err_encryption = c_int()
|
tox_err_encryption = c_int()
|
||||||
self.libtoxencryptsave.tox_pass_encrypt(c_char_p(data),
|
self.libtoxencryptsave.tox_pass_encrypt(c_char_p(data),
|
||||||
c_size_t(len(data)),
|
c_size_t(len(data)),
|
||||||
c_char_p(bytes(self._passphrase, 'utf-8')),
|
c_char_p(bytes(password, 'utf-8')),
|
||||||
c_size_t(len(self._passphrase)),
|
c_size_t(len(password)),
|
||||||
out,
|
out,
|
||||||
byref(tox_err_encryption))
|
byref(tox_err_encryption))
|
||||||
tox_err_encryption = tox_err_encryption.value
|
tox_err_encryption = tox_err_encryption.value
|
||||||
@ -81,9 +42,9 @@ class ToxEncryptSave(util.Singleton):
|
|||||||
elif tox_err_encryption == TOX_ERR_ENCRYPTION['FAILED']:
|
elif tox_err_encryption == TOX_ERR_ENCRYPTION['FAILED']:
|
||||||
raise RuntimeError('The encryption itself failed.')
|
raise RuntimeError('The encryption itself failed.')
|
||||||
|
|
||||||
def pass_decrypt(self, data):
|
def pass_decrypt(self, data, password):
|
||||||
"""
|
"""
|
||||||
Decrypts the given data with the given passphrase.
|
Decrypts the given data with the given password.
|
||||||
|
|
||||||
:return: output array
|
:return: output array
|
||||||
"""
|
"""
|
||||||
@ -91,8 +52,8 @@ class ToxEncryptSave(util.Singleton):
|
|||||||
tox_err_decryption = c_int()
|
tox_err_decryption = c_int()
|
||||||
self.libtoxencryptsave.tox_pass_decrypt(c_char_p(bytes(data)),
|
self.libtoxencryptsave.tox_pass_decrypt(c_char_p(bytes(data)),
|
||||||
c_size_t(len(data)),
|
c_size_t(len(data)),
|
||||||
c_char_p(bytes(self._passphrase, 'utf-8')),
|
c_char_p(bytes(password, 'utf-8')),
|
||||||
c_size_t(len(self._passphrase)),
|
c_size_t(len(password)),
|
||||||
out,
|
out,
|
||||||
byref(tox_err_decryption))
|
byref(tox_err_decryption))
|
||||||
tox_err_decryption = tox_err_decryption.value
|
tox_err_decryption = tox_err_decryption.value
|
||||||
|
29
toxygen/toxencryptsave_enums_and_consts.py
Normal file
29
toxygen/toxencryptsave_enums_and_consts.py
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
TOX_ERR_ENCRYPTION = {
|
||||||
|
# The function returned successfully.
|
||||||
|
'OK': 0,
|
||||||
|
# Some input data, or maybe the output pointer, was null.
|
||||||
|
'NULL': 1,
|
||||||
|
# The crypto lib was unable to derive a key from the given passphrase, which is usually a lack of memory issue. The
|
||||||
|
# functions accepting keys do not produce this error.
|
||||||
|
'KEY_DERIVATION_FAILED': 2,
|
||||||
|
# The encryption itself failed.
|
||||||
|
'FAILED': 3
|
||||||
|
}
|
||||||
|
|
||||||
|
TOX_ERR_DECRYPTION = {
|
||||||
|
# The function returned successfully.
|
||||||
|
'OK': 0,
|
||||||
|
# Some input data, or maybe the output pointer, was null.
|
||||||
|
'NULL': 1,
|
||||||
|
# The input data was shorter than TOX_PASS_ENCRYPTION_EXTRA_LENGTH bytes
|
||||||
|
'INVALID_LENGTH': 2,
|
||||||
|
# The input data is missing the magic number (i.e. wasn't created by this module, or is corrupted)
|
||||||
|
'BAD_FORMAT': 3,
|
||||||
|
# The crypto lib was unable to derive a key from the given passphrase, which is usually a lack of memory issue. The
|
||||||
|
# functions accepting keys do not produce this error.
|
||||||
|
'KEY_DERIVATION_FAILED': 4,
|
||||||
|
# The encrypted byte array could not be decrypted. Either the data was corrupt or the password/key was incorrect.
|
||||||
|
'FAILED': 5,
|
||||||
|
}
|
||||||
|
|
||||||
|
TOX_PASS_ENCRYPTION_EXTRA_LENGTH = 80
|
28
toxygen/toxes.py
Normal file
28
toxygen/toxes.py
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import util
|
||||||
|
import toxencryptsave
|
||||||
|
|
||||||
|
|
||||||
|
class ToxES(util.Singleton):
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
super().__init__()
|
||||||
|
self._toxencryptsave = toxencryptsave.ToxEncryptSave()
|
||||||
|
self._passphrase = None
|
||||||
|
|
||||||
|
def set_password(self, passphrase):
|
||||||
|
self._passphrase = passphrase
|
||||||
|
|
||||||
|
def has_password(self):
|
||||||
|
return bool(self._passphrase)
|
||||||
|
|
||||||
|
def is_password(self, password):
|
||||||
|
return self._passphrase == password
|
||||||
|
|
||||||
|
def is_data_encrypted(self, data):
|
||||||
|
return len(data) > 0 and self._toxencryptsave.is_data_encrypted(data)
|
||||||
|
|
||||||
|
def pass_encrypt(self, data):
|
||||||
|
return self._toxencryptsave.pass_encrypt(data, self._passphrase)
|
||||||
|
|
||||||
|
def pass_decrypt(self, data):
|
||||||
|
return self._toxencryptsave.pass_decrypt(data, self._passphrase)
|
@ -84,98 +84,98 @@ can produce IP leak</source>
|
|||||||
<context>
|
<context>
|
||||||
<name>MainWindow</name>
|
<name>MainWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="118"/>
|
<location filename="mainscreen.py" line="123"/>
|
||||||
<source>Profile</source>
|
<source>Profile</source>
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="124"/>
|
<location filename="mainscreen.py" line="129"/>
|
||||||
<source>Settings</source>
|
<source>Settings</source>
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="414"/>
|
<location filename="mainscreen.py" line="426"/>
|
||||||
<source>About</source>
|
<source>About</source>
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="117"/>
|
<location filename="mainscreen.py" line="122"/>
|
||||||
<source>Add contact</source>
|
<source>Add contact</source>
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="119"/>
|
<location filename="mainscreen.py" line="124"/>
|
||||||
<source>Privacy</source>
|
<source>Privacy</source>
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="120"/>
|
<location filename="mainscreen.py" line="125"/>
|
||||||
<source>Interface</source>
|
<source>Interface</source>
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="121"/>
|
<location filename="mainscreen.py" line="126"/>
|
||||||
<source>Notifications</source>
|
<source>Notifications</source>
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="122"/>
|
<location filename="mainscreen.py" line="127"/>
|
||||||
<source>Network</source>
|
<source>Network</source>
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="123"/>
|
<location filename="mainscreen.py" line="128"/>
|
||||||
<source>About program</source>
|
<source>About program</source>
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="816"/>
|
<location filename="profile.py" line="829"/>
|
||||||
<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="818"/>
|
<location filename="profile.py" line="831"/>
|
||||||
<source>Friend request</source>
|
<source>Friend request</source>
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="509"/>
|
<location filename="mainscreen.py" line="528"/>
|
||||||
<source>Choose file</source>
|
<source>Choose file</source>
|
||||||
<translation>Choose file</translation>
|
<translation>Choose file</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="574"/>
|
<location filename="mainscreen.py" line="593"/>
|
||||||
<source>Disallow auto accept</source>
|
<source>Disallow auto accept</source>
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="575"/>
|
<location filename="mainscreen.py" line="594"/>
|
||||||
<source>Allow auto accept</source>
|
<source>Allow auto accept</source>
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="577"/>
|
<location filename="mainscreen.py" line="596"/>
|
||||||
<source>Set alias</source>
|
<source>Set alias</source>
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="580"/>
|
<location filename="mainscreen.py" line="599"/>
|
||||||
<source>Clear history</source>
|
<source>Clear history</source>
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="590"/>
|
<location filename="mainscreen.py" line="609"/>
|
||||||
<source>Remove friend</source>
|
<source>Remove friend</source>
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="655"/>
|
<location filename="profile.py" line="668"/>
|
||||||
<source>Enter new alias for friend {} or leave empty to use friend's name:</source>
|
<source>Enter new alias for friend {} or leave empty to use friend's name:</source>
|
||||||
<translation>Enter new alias for friend {} or leave empty to use friend's name:</translation>
|
<translation>Enter new alias for friend {} or leave empty to use friend's name:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="125"/>
|
<location filename="mainscreen.py" line="130"/>
|
||||||
<source>Audio</source>
|
<source>Audio</source>
|
||||||
<translation>Audio</translation>
|
<translation>Audio</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -185,24 +185,24 @@ can produce IP leak</source>
|
|||||||
<translation type="obsolete">Find contact</translation>
|
<translation type="obsolete">Find contact</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="788"/>
|
<location filename="profile.py" line="801"/>
|
||||||
<source>Friend added</source>
|
<source>Friend added</source>
|
||||||
<translation>Friend added</translation>
|
<translation>Friend added</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="415"/>
|
<location filename="mainscreen.py" line="427"/>
|
||||||
<source>Toxygen is Tox client written on Python.
|
<source>Toxygen is Tox client written on Python.
|
||||||
Version: </source>
|
Version: </source>
|
||||||
<translation>Toxygen is Tox client written on Python.
|
<translation>Toxygen is Tox client written on Python.
|
||||||
Version:</translation>
|
Version:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="789"/>
|
<location filename="profile.py" line="802"/>
|
||||||
<source>Friend added without sending friend request</source>
|
<source>Friend added without sending friend request</source>
|
||||||
<translation>Friend added without sending friend request</translation>
|
<translation>Friend added without sending friend request</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="632"/>
|
<location filename="mainscreen.py" line="655"/>
|
||||||
<source>Choose folder</source>
|
<source>Choose folder</source>
|
||||||
<translation>Choose folder</translation>
|
<translation>Choose folder</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -217,47 +217,47 @@ Version:</translation>
|
|||||||
<translation type="obsolete">Send file</translation>
|
<translation type="obsolete">Send file</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="128"/>
|
<location filename="mainscreen.py" line="133"/>
|
||||||
<source>Send message</source>
|
<source>Send message</source>
|
||||||
<translation>Send message</translation>
|
<translation>Send message</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="129"/>
|
<location filename="mainscreen.py" line="134"/>
|
||||||
<source>Start audio call with friend</source>
|
<source>Start audio call with friend</source>
|
||||||
<translation>Start audio call with friend</translation>
|
<translation>Start audio call with friend</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="595"/>
|
<location filename="mainscreen.py" line="617"/>
|
||||||
<source>Plugins</source>
|
<source>Plugins</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="113"/>
|
<location filename="mainscreen.py" line="118"/>
|
||||||
<source>List of plugins</source>
|
<source>List of plugins</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="127"/>
|
<location filename="mainscreen_widgets.py" line="462"/>
|
||||||
<source>Search</source>
|
<source>Search</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="131"/>
|
<location filename="mainscreen.py" line="136"/>
|
||||||
<source>All</source>
|
<source>All</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="132"/>
|
<location filename="mainscreen.py" line="137"/>
|
||||||
<source>Online</source>
|
<source>Online</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="591"/>
|
<location filename="mainscreen.py" line="611"/>
|
||||||
<source>Notes</source>
|
<source>Notes</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="616"/>
|
<location filename="mainscreen.py" line="639"/>
|
||||||
<source>Notes about user</source>
|
<source>Notes about user</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -307,42 +307,42 @@ Version:</translation>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="303"/>
|
<location filename="profile.py" line="315"/>
|
||||||
<source>User {} is now known as {}</source>
|
<source>User {} is now known as {}</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="list_items.py" line="167"/>
|
<location filename="list_items.py" line="168"/>
|
||||||
<source>Delete message</source>
|
<source>Delete message</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="111"/>
|
<location filename="mainscreen.py" line="116"/>
|
||||||
<source>Lock</source>
|
<source>Lock</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="482"/>
|
<location filename="mainscreen.py" line="501"/>
|
||||||
<source>Cannot lock app</source>
|
<source>Cannot lock app</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="485"/>
|
<location filename="mainscreen.py" line="504"/>
|
||||||
<source>Error. Profile password is not set.</source>
|
<source>Error. Profile password is not set.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="585"/>
|
<location filename="mainscreen.py" line="604"/>
|
||||||
<source>Name</source>
|
<source>Name</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="586"/>
|
<location filename="mainscreen.py" line="605"/>
|
||||||
<source>Status message</source>
|
<source>Status message</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="587"/>
|
<location filename="mainscreen.py" line="606"/>
|
||||||
<source>Public key</source>
|
<source>Public key</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -367,65 +367,85 @@ Version:</translation>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="140"/>
|
<location filename="mainscreen.py" line="145"/>
|
||||||
<source>Import plugin</source>
|
<source>Import plugin</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="460"/>
|
<location filename="mainscreen.py" line="479"/>
|
||||||
<source>Choose folder with plugin</source>
|
<source>Choose folder with plugin</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="469"/>
|
<location filename="mainscreen.py" line="488"/>
|
||||||
<source>Restart Toxygen</source>
|
<source>Restart Toxygen</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="472"/>
|
<location filename="mainscreen.py" line="491"/>
|
||||||
<source>Plugin will be loaded after restart</source>
|
<source>Plugin will be loaded after restart</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="list_items.py" line="48"/>
|
<location filename="list_items.py" line="49"/>
|
||||||
<source>Quote selected text</source>
|
<source>Quote selected text</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="579"/>
|
<location filename="mainscreen.py" line="598"/>
|
||||||
<source>Chat history</source>
|
<source>Chat history</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="581"/>
|
<location filename="mainscreen.py" line="600"/>
|
||||||
<source>Export as text</source>
|
<source>Export as text</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="582"/>
|
<location filename="mainscreen.py" line="601"/>
|
||||||
<source>Export as HTML</source>
|
<source>Export as HTML</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="126"/>
|
<location filename="mainscreen.py" line="131"/>
|
||||||
<source>Updates</source>
|
<source>Updates</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="133"/>
|
<location filename="mainscreen.py" line="138"/>
|
||||||
<source>Online first</source>
|
<source>Online first</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="135"/>
|
<location filename="mainscreen.py" line="140"/>
|
||||||
<source>Online and by name</source>
|
<source>Online and by name</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="136"/>
|
<location filename="mainscreen.py" line="141"/>
|
||||||
<source>Online first and by name</source>
|
<source>Online first and by name</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="mainscreen.py" line="610"/>
|
||||||
|
<source>Block friend</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="mainscreen_widgets.py" line="528"/>
|
||||||
|
<source>Not found</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="mainscreen_widgets.py" line="524"/>
|
||||||
|
<source>Text "{}" was not found</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="mainscreen.py" line="146"/>
|
||||||
|
<source>Reload plugins</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>MenuWindow</name>
|
<name>MenuWindow</name>
|
||||||
@ -758,30 +778,25 @@ Version:</translation>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen_widgets.py" line="374"/>
|
<location filename="mainscreen_widgets.py" line="370"/>
|
||||||
<source>Toxygen supports faux offline messages and file transfers. Send message or file to offline friend and he will get it later.</source>
|
<source>Toxygen supports faux offline messages and file transfers. Send message or file to offline friend and he will get it later.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen_widgets.py" line="386"/>
|
<location filename="mainscreen_widgets.py" line="382"/>
|
||||||
<source>Set new NoSpam to avoid spam friend requests: Profile -> Settings -> Set new NoSpam.</source>
|
<source>Set new NoSpam to avoid spam friend requests: Profile -> Settings -> Set new NoSpam.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen_widgets.py" line="378"/>
|
<location filename="mainscreen_widgets.py" line="374"/>
|
||||||
<source>Delete single message in chat: make right click on spinner or message time and choose "Delete" in menu</source>
|
<source>Delete single message in chat: make right click on spinner or message time and choose "Delete" in menu</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen_widgets.py" line="382"/>
|
<location filename="mainscreen_widgets.py" line="378"/>
|
||||||
<source>Use right click on inline image to save it</source>
|
<source>Use right click on inline image to save it</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<location filename="mainscreen_widgets.py" line="370"/>
|
|
||||||
<source>New in Toxygen v0.2.6:<br>Updater<br>Better contact sorting<br>Plugins improvements</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>audioSettingsForm</name>
|
<name>audioSettingsForm</name>
|
||||||
@ -804,32 +819,32 @@ Version:</translation>
|
|||||||
<context>
|
<context>
|
||||||
<name>incoming_call</name>
|
<name>incoming_call</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="1214"/>
|
<location filename="profile.py" line="1229"/>
|
||||||
<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="1217"/>
|
<location filename="profile.py" line="1232"/>
|
||||||
<source>Incoming audio call</source>
|
<source>Incoming audio call</source>
|
||||||
<translation>Incoming audio call</translation>
|
<translation>Incoming audio call</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="1195"/>
|
<location filename="profile.py" line="1210"/>
|
||||||
<source>Outgoing video call</source>
|
<source>Outgoing video call</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="1198"/>
|
<location filename="profile.py" line="1213"/>
|
||||||
<source>Outgoing audio call</source>
|
<source>Outgoing audio call</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="1248"/>
|
<location filename="profile.py" line="1263"/>
|
||||||
<source>Call declined</source>
|
<source>Call declined</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="1250"/>
|
<location filename="profile.py" line="1265"/>
|
||||||
<source>Call finished</source>
|
<source>Call finished</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -985,7 +1000,7 @@ Version:</translation>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.py" line="288"/>
|
<location filename="main.py" line="290"/>
|
||||||
<source>Update for Toxygen was found. Download and install it?</source>
|
<source>Update for Toxygen was found. Download and install it?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -1122,32 +1137,32 @@ Version:</translation>
|
|||||||
<context>
|
<context>
|
||||||
<name>tray</name>
|
<name>tray</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.py" line="228"/>
|
<location filename="main.py" line="229"/>
|
||||||
<source>Open Toxygen</source>
|
<source>Open Toxygen</source>
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.py" line="237"/>
|
<location filename="main.py" line="238"/>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.py" line="229"/>
|
<location filename="main.py" line="230"/>
|
||||||
<source>Set status</source>
|
<source>Set status</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.py" line="230"/>
|
<location filename="main.py" line="231"/>
|
||||||
<source>Online</source>
|
<source>Online</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.py" line="231"/>
|
<location filename="main.py" line="232"/>
|
||||||
<source>Away</source>
|
<source>Away</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.py" line="232"/>
|
<location filename="main.py" line="233"/>
|
||||||
<source>Busy</source>
|
<source>Busy</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -84,58 +84,58 @@ can produce IP leak</source>
|
|||||||
<context>
|
<context>
|
||||||
<name>MainWindow</name>
|
<name>MainWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="118"/>
|
<location filename="mainscreen.py" line="123"/>
|
||||||
<source>Profile</source>
|
<source>Profile</source>
|
||||||
<translation>Profile</translation>
|
<translation>Profile</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="124"/>
|
<location filename="mainscreen.py" line="129"/>
|
||||||
<source>Settings</source>
|
<source>Settings</source>
|
||||||
<translation>Paramêtres</translation>
|
<translation>Paramêtres</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="414"/>
|
<location filename="mainscreen.py" line="426"/>
|
||||||
<source>About</source>
|
<source>About</source>
|
||||||
<translation>À Propos</translation>
|
<translation>À Propos</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="117"/>
|
<location filename="mainscreen.py" line="122"/>
|
||||||
<source>Add contact</source>
|
<source>Add contact</source>
|
||||||
<translation>Rajouter un contact</translation>
|
<translation>Rajouter un contact</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="119"/>
|
<location filename="mainscreen.py" line="124"/>
|
||||||
<source>Privacy</source>
|
<source>Privacy</source>
|
||||||
<translation>Confidentialité</translation>
|
<translation>Confidentialité</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="120"/>
|
<location filename="mainscreen.py" line="125"/>
|
||||||
<source>Interface</source>
|
<source>Interface</source>
|
||||||
<translation>Interface</translation>
|
<translation>Interface</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="121"/>
|
<location filename="mainscreen.py" line="126"/>
|
||||||
<source>Notifications</source>
|
<source>Notifications</source>
|
||||||
<translation>Notifications</translation>
|
<translation>Notifications</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="122"/>
|
<location filename="mainscreen.py" line="127"/>
|
||||||
<source>Network</source>
|
<source>Network</source>
|
||||||
<translation>Réseau</translation>
|
<translation>Réseau</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="123"/>
|
<location filename="mainscreen.py" line="128"/>
|
||||||
<source>About program</source>
|
<source>About program</source>
|
||||||
<translation>À propos du programme</translation>
|
<translation>À propos du programme</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="816"/>
|
<location filename="profile.py" line="829"/>
|
||||||
<source>User {} wants to add you to contact list. Message:
|
<source>User {} wants to add you to contact list. Message:
|
||||||
{}</source>
|
{}</source>
|
||||||
<translation>L'Utilisateur {} veut vout rajouter à sa liste de contacts. Message : {}</translation>
|
<translation>L'Utilisateur {} veut vout rajouter à sa liste de contacts. Message : {}</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="818"/>
|
<location filename="profile.py" line="831"/>
|
||||||
<source>Friend request</source>
|
<source>Friend request</source>
|
||||||
<translation>Demande d'amis</translation>
|
<translation>Demande d'amis</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -145,27 +145,27 @@ can produce IP leak</source>
|
|||||||
<translation type="obsolete">Toxygen est un client Tox écris en Python 2.7. Version : </translation>
|
<translation type="obsolete">Toxygen est un client Tox écris en Python 2.7. Version : </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="509"/>
|
<location filename="mainscreen.py" line="528"/>
|
||||||
<source>Choose file</source>
|
<source>Choose file</source>
|
||||||
<translation>Choisir un fichier</translation>
|
<translation>Choisir un fichier</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="574"/>
|
<location filename="mainscreen.py" line="593"/>
|
||||||
<source>Disallow auto accept</source>
|
<source>Disallow auto accept</source>
|
||||||
<translation>Désactiver l'auto-réception</translation>
|
<translation>Désactiver l'auto-réception</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="575"/>
|
<location filename="mainscreen.py" line="594"/>
|
||||||
<source>Allow auto accept</source>
|
<source>Allow auto accept</source>
|
||||||
<translation>Activer l'auto-réception</translation>
|
<translation>Activer l'auto-réception</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="577"/>
|
<location filename="mainscreen.py" line="596"/>
|
||||||
<source>Set alias</source>
|
<source>Set alias</source>
|
||||||
<translation>Définir un alias</translation>
|
<translation>Définir un alias</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="580"/>
|
<location filename="mainscreen.py" line="599"/>
|
||||||
<source>Clear history</source>
|
<source>Clear history</source>
|
||||||
<translation>Vider l'historique</translation>
|
<translation>Vider l'historique</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -175,17 +175,17 @@ can produce IP leak</source>
|
|||||||
<translation type="obsolete">Copier la clé publique</translation>
|
<translation type="obsolete">Copier la clé publique</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="590"/>
|
<location filename="mainscreen.py" line="609"/>
|
||||||
<source>Remove friend</source>
|
<source>Remove friend</source>
|
||||||
<translation>Retirer un ami</translation>
|
<translation>Retirer un ami</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="655"/>
|
<location filename="profile.py" line="668"/>
|
||||||
<source>Enter new alias for friend {} or leave empty to use friend's name:</source>
|
<source>Enter new alias for friend {} or leave empty to use friend's name:</source>
|
||||||
<translation>Entrez un nouvel alias pour l'ami {} ou laissez vide pour garder son nom de base :</translation>
|
<translation>Entrez un nouvel alias pour l'ami {} ou laissez vide pour garder son nom de base :</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="125"/>
|
<location filename="mainscreen.py" line="130"/>
|
||||||
<source>Audio</source>
|
<source>Audio</source>
|
||||||
<translation>Audio</translation>
|
<translation>Audio</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -195,24 +195,24 @@ can produce IP leak</source>
|
|||||||
<translation type="obsolete">Trouver le contact</translation>
|
<translation type="obsolete">Trouver le contact</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="788"/>
|
<location filename="profile.py" line="801"/>
|
||||||
<source>Friend added</source>
|
<source>Friend added</source>
|
||||||
<translation>Ami rajouté</translation>
|
<translation>Ami rajouté</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="415"/>
|
<location filename="mainscreen.py" line="427"/>
|
||||||
<source>Toxygen is Tox client written on Python.
|
<source>Toxygen is Tox client written on Python.
|
||||||
Version: </source>
|
Version: </source>
|
||||||
<translation>Toxygen est un client Tox écrit en Python.
|
<translation>Toxygen est un client Tox écrit en Python.
|
||||||
Version :</translation>
|
Version :</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="789"/>
|
<location filename="profile.py" line="802"/>
|
||||||
<source>Friend added without sending friend request</source>
|
<source>Friend added without sending friend request</source>
|
||||||
<translation>Ami rajouté sans avoir envoyé de demande</translation>
|
<translation>Ami rajouté sans avoir envoyé de demande</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="632"/>
|
<location filename="mainscreen.py" line="655"/>
|
||||||
<source>Choose folder</source>
|
<source>Choose folder</source>
|
||||||
<translation>Choisir le dossier</translation>
|
<translation>Choisir le dossier</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -227,47 +227,47 @@ Version :</translation>
|
|||||||
<translation type="obsolete">Envoyer le fichier</translation>
|
<translation type="obsolete">Envoyer le fichier</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="128"/>
|
<location filename="mainscreen.py" line="133"/>
|
||||||
<source>Send message</source>
|
<source>Send message</source>
|
||||||
<translation>Envoyer le message</translation>
|
<translation>Envoyer le message</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="129"/>
|
<location filename="mainscreen.py" line="134"/>
|
||||||
<source>Start audio call with friend</source>
|
<source>Start audio call with friend</source>
|
||||||
<translation>Lancer un appel audio avec un ami</translation>
|
<translation>Lancer un appel audio avec un ami</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="595"/>
|
<location filename="mainscreen.py" line="617"/>
|
||||||
<source>Plugins</source>
|
<source>Plugins</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="113"/>
|
<location filename="mainscreen.py" line="118"/>
|
||||||
<source>List of plugins</source>
|
<source>List of plugins</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="127"/>
|
<location filename="mainscreen_widgets.py" line="462"/>
|
||||||
<source>Search</source>
|
<source>Search</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="131"/>
|
<location filename="mainscreen.py" line="136"/>
|
||||||
<source>All</source>
|
<source>All</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="132"/>
|
<location filename="mainscreen.py" line="137"/>
|
||||||
<source>Online</source>
|
<source>Online</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="591"/>
|
<location filename="mainscreen.py" line="611"/>
|
||||||
<source>Notes</source>
|
<source>Notes</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="616"/>
|
<location filename="mainscreen.py" line="639"/>
|
||||||
<source>Notes about user</source>
|
<source>Notes about user</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -317,42 +317,42 @@ Version :</translation>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="303"/>
|
<location filename="profile.py" line="315"/>
|
||||||
<source>User {} is now known as {}</source>
|
<source>User {} is now known as {}</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="list_items.py" line="167"/>
|
<location filename="list_items.py" line="168"/>
|
||||||
<source>Delete message</source>
|
<source>Delete message</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="111"/>
|
<location filename="mainscreen.py" line="116"/>
|
||||||
<source>Lock</source>
|
<source>Lock</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="482"/>
|
<location filename="mainscreen.py" line="501"/>
|
||||||
<source>Cannot lock app</source>
|
<source>Cannot lock app</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="485"/>
|
<location filename="mainscreen.py" line="504"/>
|
||||||
<source>Error. Profile password is not set.</source>
|
<source>Error. Profile password is not set.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="585"/>
|
<location filename="mainscreen.py" line="604"/>
|
||||||
<source>Name</source>
|
<source>Name</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="586"/>
|
<location filename="mainscreen.py" line="605"/>
|
||||||
<source>Status message</source>
|
<source>Status message</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="587"/>
|
<location filename="mainscreen.py" line="606"/>
|
||||||
<source>Public key</source>
|
<source>Public key</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -377,65 +377,85 @@ Version :</translation>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="140"/>
|
<location filename="mainscreen.py" line="145"/>
|
||||||
<source>Import plugin</source>
|
<source>Import plugin</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="460"/>
|
<location filename="mainscreen.py" line="479"/>
|
||||||
<source>Choose folder with plugin</source>
|
<source>Choose folder with plugin</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="469"/>
|
<location filename="mainscreen.py" line="488"/>
|
||||||
<source>Restart Toxygen</source>
|
<source>Restart Toxygen</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="472"/>
|
<location filename="mainscreen.py" line="491"/>
|
||||||
<source>Plugin will be loaded after restart</source>
|
<source>Plugin will be loaded after restart</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="list_items.py" line="48"/>
|
<location filename="list_items.py" line="49"/>
|
||||||
<source>Quote selected text</source>
|
<source>Quote selected text</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="579"/>
|
<location filename="mainscreen.py" line="598"/>
|
||||||
<source>Chat history</source>
|
<source>Chat history</source>
|
||||||
<translation type="unfinished">Historique de chat</translation>
|
<translation type="unfinished">Historique de chat</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="581"/>
|
<location filename="mainscreen.py" line="600"/>
|
||||||
<source>Export as text</source>
|
<source>Export as text</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="582"/>
|
<location filename="mainscreen.py" line="601"/>
|
||||||
<source>Export as HTML</source>
|
<source>Export as HTML</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="126"/>
|
<location filename="mainscreen.py" line="131"/>
|
||||||
<source>Updates</source>
|
<source>Updates</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="133"/>
|
<location filename="mainscreen.py" line="138"/>
|
||||||
<source>Online first</source>
|
<source>Online first</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="135"/>
|
<location filename="mainscreen.py" line="140"/>
|
||||||
<source>Online and by name</source>
|
<source>Online and by name</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="136"/>
|
<location filename="mainscreen.py" line="141"/>
|
||||||
<source>Online first and by name</source>
|
<source>Online first and by name</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="mainscreen.py" line="610"/>
|
||||||
|
<source>Block friend</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="mainscreen_widgets.py" line="528"/>
|
||||||
|
<source>Not found</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="mainscreen_widgets.py" line="524"/>
|
||||||
|
<source>Text "{}" was not found</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="mainscreen.py" line="146"/>
|
||||||
|
<source>Reload plugins</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>MenuWindow</name>
|
<name>MenuWindow</name>
|
||||||
@ -768,30 +788,25 @@ Version :</translation>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen_widgets.py" line="374"/>
|
<location filename="mainscreen_widgets.py" line="370"/>
|
||||||
<source>Toxygen supports faux offline messages and file transfers. Send message or file to offline friend and he will get it later.</source>
|
<source>Toxygen supports faux offline messages and file transfers. Send message or file to offline friend and he will get it later.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen_widgets.py" line="386"/>
|
<location filename="mainscreen_widgets.py" line="382"/>
|
||||||
<source>Set new NoSpam to avoid spam friend requests: Profile -> Settings -> Set new NoSpam.</source>
|
<source>Set new NoSpam to avoid spam friend requests: Profile -> Settings -> Set new NoSpam.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen_widgets.py" line="378"/>
|
<location filename="mainscreen_widgets.py" line="374"/>
|
||||||
<source>Delete single message in chat: make right click on spinner or message time and choose "Delete" in menu</source>
|
<source>Delete single message in chat: make right click on spinner or message time and choose "Delete" in menu</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen_widgets.py" line="382"/>
|
<location filename="mainscreen_widgets.py" line="378"/>
|
||||||
<source>Use right click on inline image to save it</source>
|
<source>Use right click on inline image to save it</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<location filename="mainscreen_widgets.py" line="370"/>
|
|
||||||
<source>New in Toxygen v0.2.6:<br>Updater<br>Better contact sorting<br>Plugins improvements</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>audioSettingsForm</name>
|
<name>audioSettingsForm</name>
|
||||||
@ -814,32 +829,32 @@ Version :</translation>
|
|||||||
<context>
|
<context>
|
||||||
<name>incoming_call</name>
|
<name>incoming_call</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="1214"/>
|
<location filename="profile.py" line="1229"/>
|
||||||
<source>Incoming video call</source>
|
<source>Incoming video call</source>
|
||||||
<translation>Appel vidéo entrant</translation>
|
<translation>Appel vidéo entrant</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="1217"/>
|
<location filename="profile.py" line="1232"/>
|
||||||
<source>Incoming audio call</source>
|
<source>Incoming audio call</source>
|
||||||
<translation>Appel audio entrant</translation>
|
<translation>Appel audio entrant</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="1195"/>
|
<location filename="profile.py" line="1210"/>
|
||||||
<source>Outgoing video call</source>
|
<source>Outgoing video call</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="1198"/>
|
<location filename="profile.py" line="1213"/>
|
||||||
<source>Outgoing audio call</source>
|
<source>Outgoing audio call</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="1248"/>
|
<location filename="profile.py" line="1263"/>
|
||||||
<source>Call declined</source>
|
<source>Call declined</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="1250"/>
|
<location filename="profile.py" line="1265"/>
|
||||||
<source>Call finished</source>
|
<source>Call finished</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -1000,7 +1015,7 @@ Version :</translation>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.py" line="288"/>
|
<location filename="main.py" line="290"/>
|
||||||
<source>Update for Toxygen was found. Download and install it?</source>
|
<source>Update for Toxygen was found. Download and install it?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -1137,32 +1152,32 @@ Version :</translation>
|
|||||||
<context>
|
<context>
|
||||||
<name>tray</name>
|
<name>tray</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.py" line="228"/>
|
<location filename="main.py" line="229"/>
|
||||||
<source>Open Toxygen</source>
|
<source>Open Toxygen</source>
|
||||||
<translation>Ouvrir Toxygen</translation>
|
<translation>Ouvrir Toxygen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.py" line="237"/>
|
<location filename="main.py" line="238"/>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Quitter</translation>
|
<translation>Quitter</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.py" line="229"/>
|
<location filename="main.py" line="230"/>
|
||||||
<source>Set status</source>
|
<source>Set status</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.py" line="230"/>
|
<location filename="main.py" line="231"/>
|
||||||
<source>Online</source>
|
<source>Online</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.py" line="231"/>
|
<location filename="main.py" line="232"/>
|
||||||
<source>Away</source>
|
<source>Away</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.py" line="232"/>
|
<location filename="main.py" line="233"/>
|
||||||
<source>Busy</source>
|
<source>Busy</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
Binary file not shown.
@ -87,84 +87,84 @@ can produce IP leak</source>
|
|||||||
<context>
|
<context>
|
||||||
<name>MainWindow</name>
|
<name>MainWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="118"/>
|
<location filename="mainscreen.py" line="123"/>
|
||||||
<source>Profile</source>
|
<source>Profile</source>
|
||||||
<translation>Профиль</translation>
|
<translation>Профиль</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="124"/>
|
<location filename="mainscreen.py" line="129"/>
|
||||||
<source>Settings</source>
|
<source>Settings</source>
|
||||||
<translation>Настройки</translation>
|
<translation>Настройки</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="414"/>
|
<location filename="mainscreen.py" line="426"/>
|
||||||
<source>About</source>
|
<source>About</source>
|
||||||
<translation>О программе</translation>
|
<translation>О программе</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="117"/>
|
<location filename="mainscreen.py" line="122"/>
|
||||||
<source>Add contact</source>
|
<source>Add contact</source>
|
||||||
<translation>Добавить контакт</translation>
|
<translation>Добавить контакт</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="119"/>
|
<location filename="mainscreen.py" line="124"/>
|
||||||
<source>Privacy</source>
|
<source>Privacy</source>
|
||||||
<translation>Приватность</translation>
|
<translation>Приватность</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="120"/>
|
<location filename="mainscreen.py" line="125"/>
|
||||||
<source>Interface</source>
|
<source>Interface</source>
|
||||||
<translation>Интерфейс</translation>
|
<translation>Интерфейс</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="121"/>
|
<location filename="mainscreen.py" line="126"/>
|
||||||
<source>Notifications</source>
|
<source>Notifications</source>
|
||||||
<translation>Уведомления</translation>
|
<translation>Уведомления</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="122"/>
|
<location filename="mainscreen.py" line="127"/>
|
||||||
<source>Network</source>
|
<source>Network</source>
|
||||||
<translation>Сеть</translation>
|
<translation>Сеть</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="123"/>
|
<location filename="mainscreen.py" line="128"/>
|
||||||
<source>About program</source>
|
<source>About program</source>
|
||||||
<translation>О программе</translation>
|
<translation>О программе</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="816"/>
|
<location filename="profile.py" line="829"/>
|
||||||
<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="818"/>
|
<location filename="profile.py" line="831"/>
|
||||||
<source>Friend request</source>
|
<source>Friend request</source>
|
||||||
<translation>Запрос на добавление в друзья</translation>
|
<translation>Запрос на добавление в друзья</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="509"/>
|
<location filename="mainscreen.py" line="528"/>
|
||||||
<source>Choose file</source>
|
<source>Choose file</source>
|
||||||
<translation>Выберите файл</translation>
|
<translation>Выберите файл</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="574"/>
|
<location filename="mainscreen.py" line="593"/>
|
||||||
<source>Disallow auto accept</source>
|
<source>Disallow auto accept</source>
|
||||||
<translation>Запретить автоматическое получение файлов</translation>
|
<translation>Запретить автоматическое получение файлов</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="575"/>
|
<location filename="mainscreen.py" line="594"/>
|
||||||
<source>Allow auto accept</source>
|
<source>Allow auto accept</source>
|
||||||
<translation>Разрешить автоматическое получение файлов</translation>
|
<translation>Разрешить автоматическое получение файлов</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="577"/>
|
<location filename="mainscreen.py" line="596"/>
|
||||||
<source>Set alias</source>
|
<source>Set alias</source>
|
||||||
<translation>Изменить псевдоним</translation>
|
<translation>Изменить псевдоним</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="580"/>
|
<location filename="mainscreen.py" line="599"/>
|
||||||
<source>Clear history</source>
|
<source>Clear history</source>
|
||||||
<translation>Очистить историю</translation>
|
<translation>Очистить историю</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -174,17 +174,17 @@ can produce IP leak</source>
|
|||||||
<translation type="obsolete">Копировать публичный ключ</translation>
|
<translation type="obsolete">Копировать публичный ключ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="590"/>
|
<location filename="mainscreen.py" line="609"/>
|
||||||
<source>Remove friend</source>
|
<source>Remove friend</source>
|
||||||
<translation>Удалить друга</translation>
|
<translation>Удалить друга</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="655"/>
|
<location filename="profile.py" line="668"/>
|
||||||
<source>Enter new alias for friend {} or leave empty to use friend's name:</source>
|
<source>Enter new alias for friend {} or leave empty to use friend's name:</source>
|
||||||
<translation>Введите новый псевдоним для друга {} или оставьте пустым для использования его имени:</translation>
|
<translation>Введите новый псевдоним для друга {} или оставьте пустым для использования его имени:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="125"/>
|
<location filename="mainscreen.py" line="130"/>
|
||||||
<source>Audio</source>
|
<source>Audio</source>
|
||||||
<translation>Аудио</translation>
|
<translation>Аудио</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -194,23 +194,23 @@ can produce IP leak</source>
|
|||||||
<translation type="obsolete">Найти контакт</translation>
|
<translation type="obsolete">Найти контакт</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="788"/>
|
<location filename="profile.py" line="801"/>
|
||||||
<source>Friend added</source>
|
<source>Friend added</source>
|
||||||
<translation>Друг добавлен</translation>
|
<translation>Друг добавлен</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="415"/>
|
<location filename="mainscreen.py" line="427"/>
|
||||||
<source>Toxygen is Tox client written on Python.
|
<source>Toxygen is Tox client written on Python.
|
||||||
Version: </source>
|
Version: </source>
|
||||||
<translation>Toxygen - клиент для мессенджера Tox, написанный на Python. Версия: </translation>
|
<translation>Toxygen - клиент для мессенджера Tox, написанный на Python. Версия: </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="789"/>
|
<location filename="profile.py" line="802"/>
|
||||||
<source>Friend added without sending friend request</source>
|
<source>Friend added without sending friend request</source>
|
||||||
<translation>Друг добавлен без отправки запроса на добавление в друзья</translation>
|
<translation>Друг добавлен без отправки запроса на добавление в друзья</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="632"/>
|
<location filename="mainscreen.py" line="655"/>
|
||||||
<source>Choose folder</source>
|
<source>Choose folder</source>
|
||||||
<translation>Выбрать папку</translation>
|
<translation>Выбрать папку</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -225,47 +225,47 @@ Version: </source>
|
|||||||
<translation type="obsolete">Отправить файл</translation>
|
<translation type="obsolete">Отправить файл</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="128"/>
|
<location filename="mainscreen.py" line="133"/>
|
||||||
<source>Send message</source>
|
<source>Send message</source>
|
||||||
<translation>Отправить сообщение</translation>
|
<translation>Отправить сообщение</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="129"/>
|
<location filename="mainscreen.py" line="134"/>
|
||||||
<source>Start audio call with friend</source>
|
<source>Start audio call with friend</source>
|
||||||
<translation>Начать аудиозвонок с другом</translation>
|
<translation>Начать аудиозвонок с другом</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="595"/>
|
<location filename="mainscreen.py" line="617"/>
|
||||||
<source>Plugins</source>
|
<source>Plugins</source>
|
||||||
<translation>Плагины</translation>
|
<translation>Плагины</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="113"/>
|
<location filename="mainscreen.py" line="118"/>
|
||||||
<source>List of plugins</source>
|
<source>List of plugins</source>
|
||||||
<translation>Список плагинов</translation>
|
<translation>Список плагинов</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="127"/>
|
<location filename="mainscreen_widgets.py" line="462"/>
|
||||||
<source>Search</source>
|
<source>Search</source>
|
||||||
<translation>Поиск</translation>
|
<translation>Поиск</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="131"/>
|
<location filename="mainscreen.py" line="136"/>
|
||||||
<source>All</source>
|
<source>All</source>
|
||||||
<translation>Все</translation>
|
<translation>Все</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="132"/>
|
<location filename="mainscreen.py" line="137"/>
|
||||||
<source>Online</source>
|
<source>Online</source>
|
||||||
<translation>Онлайн</translation>
|
<translation>Онлайн</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="591"/>
|
<location filename="mainscreen.py" line="611"/>
|
||||||
<source>Notes</source>
|
<source>Notes</source>
|
||||||
<translation>Заметки</translation>
|
<translation>Заметки</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="616"/>
|
<location filename="mainscreen.py" line="639"/>
|
||||||
<source>Notes about user</source>
|
<source>Notes about user</source>
|
||||||
<translation>Заметки о пользователе</translation>
|
<translation>Заметки о пользователе</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -315,42 +315,42 @@ Version: </source>
|
|||||||
<translation>Сохранить</translation>
|
<translation>Сохранить</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="303"/>
|
<location filename="profile.py" line="315"/>
|
||||||
<source>User {} is now known as {}</source>
|
<source>User {} is now known as {}</source>
|
||||||
<translation>Пользователь {} сейчас известен как {}</translation>
|
<translation>Пользователь {} сейчас известен как {}</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="list_items.py" line="167"/>
|
<location filename="list_items.py" line="168"/>
|
||||||
<source>Delete message</source>
|
<source>Delete message</source>
|
||||||
<translation>Удалить сообщение</translation>
|
<translation>Удалить сообщение</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="111"/>
|
<location filename="mainscreen.py" line="116"/>
|
||||||
<source>Lock</source>
|
<source>Lock</source>
|
||||||
<translation>Заблокировать</translation>
|
<translation>Заблокировать</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="482"/>
|
<location filename="mainscreen.py" line="501"/>
|
||||||
<source>Cannot lock app</source>
|
<source>Cannot lock app</source>
|
||||||
<translation>Невозможно заблокировать приложение</translation>
|
<translation>Невозможно заблокировать приложение</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="485"/>
|
<location filename="mainscreen.py" line="504"/>
|
||||||
<source>Error. Profile password is not set.</source>
|
<source>Error. Profile password is not set.</source>
|
||||||
<translation>Ошибка. Пароль профиля не установлен.</translation>
|
<translation>Ошибка. Пароль профиля не установлен.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="585"/>
|
<location filename="mainscreen.py" line="604"/>
|
||||||
<source>Name</source>
|
<source>Name</source>
|
||||||
<translation>Имя</translation>
|
<translation>Имя</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="586"/>
|
<location filename="mainscreen.py" line="605"/>
|
||||||
<source>Status message</source>
|
<source>Status message</source>
|
||||||
<translation>Статус</translation>
|
<translation>Статус</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="587"/>
|
<location filename="mainscreen.py" line="606"/>
|
||||||
<source>Public key</source>
|
<source>Public key</source>
|
||||||
<translation>Публичный ключ</translation>
|
<translation>Публичный ключ</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -375,65 +375,85 @@ Version: </source>
|
|||||||
<translation>Выберите папку с паком смайлов</translation>
|
<translation>Выберите папку с паком смайлов</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="140"/>
|
<location filename="mainscreen.py" line="145"/>
|
||||||
<source>Import plugin</source>
|
<source>Import plugin</source>
|
||||||
<translation>Импортировать плагин</translation>
|
<translation>Импортировать плагин</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="460"/>
|
<location filename="mainscreen.py" line="479"/>
|
||||||
<source>Choose folder with plugin</source>
|
<source>Choose folder with plugin</source>
|
||||||
<translation>Выберите папку с плагином</translation>
|
<translation>Выберите папку с плагином</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="469"/>
|
<location filename="mainscreen.py" line="488"/>
|
||||||
<source>Restart Toxygen</source>
|
<source>Restart Toxygen</source>
|
||||||
<translation>Перезапустите Toxygen</translation>
|
<translation>Перезапустите Toxygen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="472"/>
|
<location filename="mainscreen.py" line="491"/>
|
||||||
<source>Plugin will be loaded after restart</source>
|
<source>Plugin will be loaded after restart</source>
|
||||||
<translation>Плагин будет загружен после перезапуска</translation>
|
<translation>Плагин будет загружен после перезапуска</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="list_items.py" line="48"/>
|
<location filename="list_items.py" line="49"/>
|
||||||
<source>Quote selected text</source>
|
<source>Quote selected text</source>
|
||||||
<translation>Цитировать выбранный текст</translation>
|
<translation>Цитировать выбранный текст</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="579"/>
|
<location filename="mainscreen.py" line="598"/>
|
||||||
<source>Chat history</source>
|
<source>Chat history</source>
|
||||||
<translation>История чата</translation>
|
<translation>История чата</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="581"/>
|
<location filename="mainscreen.py" line="600"/>
|
||||||
<source>Export as text</source>
|
<source>Export as text</source>
|
||||||
<translation>Экспортировать как текст</translation>
|
<translation>Экспортировать как текст</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="582"/>
|
<location filename="mainscreen.py" line="601"/>
|
||||||
<source>Export as HTML</source>
|
<source>Export as HTML</source>
|
||||||
<translation>Экспортировать как HTML</translation>
|
<translation>Экспортировать как HTML</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="126"/>
|
<location filename="mainscreen.py" line="131"/>
|
||||||
<source>Updates</source>
|
<source>Updates</source>
|
||||||
<translation>Обновления</translation>
|
<translation>Обновления</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="133"/>
|
<location filename="mainscreen.py" line="138"/>
|
||||||
<source>Online first</source>
|
<source>Online first</source>
|
||||||
<translation>Сначала онлайн</translation>
|
<translation>Сначала онлайн</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="135"/>
|
<location filename="mainscreen.py" line="140"/>
|
||||||
<source>Online and by name</source>
|
<source>Online and by name</source>
|
||||||
<translation>Онлайн и по имени</translation>
|
<translation>Онлайн и по имени</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen.py" line="136"/>
|
<location filename="mainscreen.py" line="141"/>
|
||||||
<source>Online first and by name</source>
|
<source>Online first and by name</source>
|
||||||
<translation>Сначала онлайн и по имени</translation>
|
<translation>Сначала онлайн и по имени</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="mainscreen.py" line="610"/>
|
||||||
|
<source>Block friend</source>
|
||||||
|
<translation>Заблокировать друга</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="mainscreen_widgets.py" line="528"/>
|
||||||
|
<source>Not found</source>
|
||||||
|
<translation>Не найдено</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="mainscreen_widgets.py" line="524"/>
|
||||||
|
<source>Text "{}" was not found</source>
|
||||||
|
<translation>Текст "{}" не был найден</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="mainscreen.py" line="146"/>
|
||||||
|
<source>Reload plugins</source>
|
||||||
|
<translation>Перезагрузить плагины</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>MenuWindow</name>
|
<name>MenuWindow</name>
|
||||||
@ -796,12 +816,12 @@ Version: </source>
|
|||||||
<translation>Используйте Настройки -> Интерфейс для настройки интерфейса.</translation>
|
<translation>Используйте Настройки -> Интерфейс для настройки интерфейса.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen_widgets.py" line="374"/>
|
<location filename="mainscreen_widgets.py" line="370"/>
|
||||||
<source>Toxygen supports faux offline messages and file transfers. Send message or file to offline friend and he will get it later.</source>
|
<source>Toxygen supports faux offline messages and file transfers. Send message or file to offline friend and he will get it later.</source>
|
||||||
<translation>Toxygen поддерживает псевдооффлайн сообщения и файл трансферы.</translation>
|
<translation>Toxygen поддерживает псевдооффлайн сообщения и файл трансферы.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen_widgets.py" line="386"/>
|
<location filename="mainscreen_widgets.py" line="382"/>
|
||||||
<source>Set new NoSpam to avoid spam friend requests: Profile -> Settings -> Set new NoSpam.</source>
|
<source>Set new NoSpam to avoid spam friend requests: Profile -> Settings -> Set new NoSpam.</source>
|
||||||
<translation>Установите новый NoSpam, чтобы избежать спам запросов в друзья: Профиль->Настройки->Новый NoSpam.</translation>
|
<translation>Установите новый NoSpam, чтобы избежать спам запросов в друзья: Профиль->Настройки->Новый NoSpam.</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -811,12 +831,12 @@ Version: </source>
|
|||||||
<translation type="obsolete">Новое в Toxygen 0.2.3:<br>Соответствие TCS<br>Импорт плагинов, смайлов и стикеров<br>Исправления ошибок</translation>
|
<translation type="obsolete">Новое в Toxygen 0.2.3:<br>Соответствие TCS<br>Импорт плагинов, смайлов и стикеров<br>Исправления ошибок</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen_widgets.py" line="378"/>
|
<location filename="mainscreen_widgets.py" line="374"/>
|
||||||
<source>Delete single message in chat: make right click on spinner or message time and choose "Delete" in menu</source>
|
<source>Delete single message in chat: make right click on spinner or message time and choose "Delete" in menu</source>
|
||||||
<translation>Чтобы удалить отдельное сообщение в чате сделайте правый клик на спиннер или время сообщения и выберите "Удалить" в меню</translation>
|
<translation>Чтобы удалить отдельное сообщение в чате сделайте правый клик на спиннер или время сообщения и выберите "Удалить" в меню</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen_widgets.py" line="382"/>
|
<location filename="mainscreen_widgets.py" line="378"/>
|
||||||
<source>Use right click on inline image to save it</source>
|
<source>Use right click on inline image to save it</source>
|
||||||
<translation>Правый клик на инлайн изображении позволит сохранить его</translation>
|
<translation>Правый клик на инлайн изображении позволит сохранить его</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -828,7 +848,7 @@ Version: </source>
|
|||||||
<message>
|
<message>
|
||||||
<location filename="mainscreen_widgets.py" line="370"/>
|
<location filename="mainscreen_widgets.py" line="370"/>
|
||||||
<source>New in Toxygen v0.2.6:<br>Updater<br>Better contact sorting<br>Plugins improvements</source>
|
<source>New in Toxygen v0.2.6:<br>Updater<br>Better contact sorting<br>Plugins improvements</source>
|
||||||
<translation>Новое в Toxygen v0.2.6:<br>Поддержка обновлений<br>Улучшенная сортировка контактов<br>Улучшения в работе плагинов</translation>
|
<translation type="obsolete">Новое в Toxygen v0.2.6:<br>Поддержка обновлений<br>Улучшенная сортировка контактов<br>Улучшения в работе плагинов</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -852,32 +872,32 @@ Version: </source>
|
|||||||
<context>
|
<context>
|
||||||
<name>incoming_call</name>
|
<name>incoming_call</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="1214"/>
|
<location filename="profile.py" line="1229"/>
|
||||||
<source>Incoming video call</source>
|
<source>Incoming video call</source>
|
||||||
<translation>Входящий видеозвонок</translation>
|
<translation>Входящий видеозвонок</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="1217"/>
|
<location filename="profile.py" line="1232"/>
|
||||||
<source>Incoming audio call</source>
|
<source>Incoming audio call</source>
|
||||||
<translation>Входящий аудиозвонок</translation>
|
<translation>Входящий аудиозвонок</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="1195"/>
|
<location filename="profile.py" line="1210"/>
|
||||||
<source>Outgoing video call</source>
|
<source>Outgoing video call</source>
|
||||||
<translation>Исходящий видеозвонок</translation>
|
<translation>Исходящий видеозвонок</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="1198"/>
|
<location filename="profile.py" line="1213"/>
|
||||||
<source>Outgoing audio call</source>
|
<source>Outgoing audio call</source>
|
||||||
<translation>Исходящий аудиозвонок</translation>
|
<translation>Исходящий аудиозвонок</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="1248"/>
|
<location filename="profile.py" line="1263"/>
|
||||||
<source>Call declined</source>
|
<source>Call declined</source>
|
||||||
<translation>Звонок отменен</translation>
|
<translation>Звонок отменен</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="profile.py" line="1250"/>
|
<location filename="profile.py" line="1265"/>
|
||||||
<source>Call finished</source>
|
<source>Call finished</source>
|
||||||
<translation>Звонок завершен</translation>
|
<translation>Звонок завершен</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -1038,7 +1058,7 @@ Version: </source>
|
|||||||
<translation>Ошибка сохранения профиля! Toxygen имеет разрешение на запись в данную папку?</translation>
|
<translation>Ошибка сохранения профиля! Toxygen имеет разрешение на запись в данную папку?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.py" line="288"/>
|
<location filename="main.py" line="290"/>
|
||||||
<source>Update for Toxygen was found. Download and install it?</source>
|
<source>Update for Toxygen was found. Download and install it?</source>
|
||||||
<translation>Обновление для Toxygen было найдено. Загрузить и установить его?</translation>
|
<translation>Обновление для Toxygen было найдено. Загрузить и установить его?</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -1077,7 +1097,7 @@ Version: </source>
|
|||||||
<message>
|
<message>
|
||||||
<location filename="passwordscreen.py" line="65"/>
|
<location filename="passwordscreen.py" line="65"/>
|
||||||
<source>Password:</source>
|
<source>Password:</source>
|
||||||
<translation>Пароль</translation>
|
<translation>Пароль:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="passwordscreen.py" line="66"/>
|
<location filename="passwordscreen.py" line="66"/>
|
||||||
@ -1176,32 +1196,32 @@ Version: </source>
|
|||||||
<context>
|
<context>
|
||||||
<name>tray</name>
|
<name>tray</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.py" line="228"/>
|
<location filename="main.py" line="229"/>
|
||||||
<source>Open Toxygen</source>
|
<source>Open Toxygen</source>
|
||||||
<translation>Открыть Toxygen</translation>
|
<translation>Открыть Toxygen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.py" line="237"/>
|
<location filename="main.py" line="238"/>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Выход</translation>
|
<translation>Выход</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.py" line="229"/>
|
<location filename="main.py" line="230"/>
|
||||||
<source>Set status</source>
|
<source>Set status</source>
|
||||||
<translation>Изменить статус</translation>
|
<translation>Изменить статус</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.py" line="230"/>
|
<location filename="main.py" line="231"/>
|
||||||
<source>Online</source>
|
<source>Online</source>
|
||||||
<translation>Онлайн</translation>
|
<translation>Онлайн</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.py" line="231"/>
|
<location filename="main.py" line="232"/>
|
||||||
<source>Away</source>
|
<source>Away</source>
|
||||||
<translation>Нет на месте</translation>
|
<translation>Нет на месте</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.py" line="232"/>
|
<location filename="main.py" line="233"/>
|
||||||
<source>Busy</source>
|
<source>Busy</source>
|
||||||
<translation>Занят</translation>
|
<translation>Занят</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1,9 +1,25 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
|
import re
|
||||||
|
|
||||||
program_version = '0.2.6'
|
program_version = '0.2.8'
|
||||||
|
|
||||||
|
|
||||||
|
def cached(func):
|
||||||
|
saved_result = None
|
||||||
|
|
||||||
|
def wrapped_func():
|
||||||
|
nonlocal saved_result
|
||||||
|
if saved_result is None:
|
||||||
|
saved_result = func()
|
||||||
|
|
||||||
|
return saved_result
|
||||||
|
|
||||||
|
return wrapped_func
|
||||||
|
|
||||||
|
|
||||||
def log(data):
|
def log(data):
|
||||||
@ -11,6 +27,7 @@ def log(data):
|
|||||||
fl.write(str(data) + '\n')
|
fl.write(str(data) + '\n')
|
||||||
|
|
||||||
|
|
||||||
|
@cached
|
||||||
def curr_directory():
|
def curr_directory():
|
||||||
return os.path.dirname(os.path.realpath(__file__))
|
return os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
||||||
@ -37,7 +54,7 @@ def remove(folder):
|
|||||||
|
|
||||||
|
|
||||||
def convert_time(t):
|
def convert_time(t):
|
||||||
offset = time.timezone - time.daylight * 3600
|
offset = time.timezone + time_offset() * 60
|
||||||
sec = int(t) - offset
|
sec = int(t) - offset
|
||||||
m, s = divmod(sec, 60)
|
m, s = divmod(sec, 60)
|
||||||
h, m = divmod(m, 60)
|
h, m = divmod(m, 60)
|
||||||
@ -45,6 +62,18 @@ def convert_time(t):
|
|||||||
return '%02d:%02d' % (h, m)
|
return '%02d:%02d' % (h, m)
|
||||||
|
|
||||||
|
|
||||||
|
@cached
|
||||||
|
def time_offset():
|
||||||
|
hours = int(time.strftime('%H'))
|
||||||
|
minutes = int(time.strftime('%M'))
|
||||||
|
sec = int(time.time()) - time.timezone
|
||||||
|
m, s = divmod(sec, 60)
|
||||||
|
h, m = divmod(m, 60)
|
||||||
|
d, h = divmod(h, 24)
|
||||||
|
result = hours * 60 + minutes - h * 60 - m
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
def append_slash(s):
|
def append_slash(s):
|
||||||
if len(s) and s[-1] not in ('\\', '/'):
|
if len(s) and s[-1] not in ('\\', '/'):
|
||||||
s += '/'
|
s += '/'
|
||||||
@ -55,6 +84,15 @@ def is_64_bit():
|
|||||||
return sys.maxsize > 2 ** 32
|
return sys.maxsize > 2 ** 32
|
||||||
|
|
||||||
|
|
||||||
|
def is_re_valid(regex):
|
||||||
|
try:
|
||||||
|
re.compile(regex)
|
||||||
|
except re.error:
|
||||||
|
return False
|
||||||
|
else:
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
class Singleton:
|
class Singleton:
|
||||||
_instance = None
|
_instance = None
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ class DataLabel(QtGui.QLabel):
|
|||||||
Label with elided text
|
Label with elided text
|
||||||
"""
|
"""
|
||||||
def setText(self, text):
|
def setText(self, text):
|
||||||
text = ''.join(c if c <= '\U0010FFFF' else '\u25AF' for c in text)
|
text = ''.join('\u25AF' if len(bytes(c, 'utf-8')) >= 4 else c for c in text)
|
||||||
metrics = QtGui.QFontMetrics(self.font())
|
metrics = QtGui.QFontMetrics(self.font())
|
||||||
text = metrics.elidedText(text, QtCore.Qt.ElideRight, self.width())
|
text = metrics.elidedText(text, QtCore.Qt.ElideRight, self.width())
|
||||||
super().setText(text)
|
super().setText(text)
|
||||||
@ -137,4 +137,3 @@ class MultilineEdit(CenteredWidget):
|
|||||||
def button_click(self):
|
def button_click(self):
|
||||||
self.save(self.edit.toPlainText())
|
self.save(self.edit.toPlainText())
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user