some fixes

This commit is contained in:
ingvar1995 2017-04-06 21:28:34 +03:00
parent 3ef581bc5d
commit 19fb905554
6 changed files with 19 additions and 14 deletions

View File

@ -8,7 +8,7 @@ Toxygen is powerful cross-platform [Tox](https://tox.chat/) client written in pu
[![License](https://img.shields.io/badge/license-GPLv3-blue.svg?style=flat)](https://raw.githubusercontent.com/toxygen-project/toxygen/master/LICENSE.md) [![License](https://img.shields.io/badge/license-GPLv3-blue.svg?style=flat)](https://raw.githubusercontent.com/toxygen-project/toxygen/master/LICENSE.md)
[![Build Status](https://travis-ci.org/toxygen-project/toxygen.svg?branch=master)](https://travis-ci.org/toxygen-project/toxygen) [![Build Status](https://travis-ci.org/toxygen-project/toxygen.svg?branch=master)](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

View File

@ -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.

View File

@ -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

View File

@ -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:

View File

@ -109,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)

View File

@ -146,7 +146,7 @@ class Contact(basecontact.BaseContact):
old = filter(save_message, self._corr[:-SAVE_MESSAGES]) old = filter(save_message, self._corr[:-SAVE_MESSAGES])
self._corr = list(old) + self._corr[-SAVE_MESSAGES:] self._corr = list(old) + self._corr[-SAVE_MESSAGES:]
text_messages = filter(lambda x: x.get_type <= 1, self._corr) text_messages = filter(lambda x: x.get_type() <= 1, self._corr)
self._unsaved_messages = min(self._unsaved_messages, len(list(text_messages))) self._unsaved_messages = min(self._unsaved_messages, len(list(text_messages)))
self._search_index = 0 self._search_index = 0