From 51ec1af3690f116eb386cdf777a404813002273f Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Mon, 30 May 2016 22:26:07 +0300 Subject: [PATCH] docs update --- docs/install.md | 26 +++++++++++++++----------- src/plugin_support.py | 3 +++ src/profile.py | 13 +++++++++++++ src/toxygen.pro | 2 +- 4 files changed, 32 insertions(+), 12 deletions(-) diff --git a/docs/install.md b/docs/install.md index 7d2f877..03b0203 100644 --- a/docs/install.md +++ b/docs/install.md @@ -1,11 +1,14 @@ # How to install Toxygen +## Use precompiled binary: +[Check our releases page](https://github.com/xveduk/toxygen/releases) + ## From source code (recommended for developers) ### Windows 1. [Download and install latest Python 2.7](https://www.python.org/downloads/windows/) -2. [Install PySide](https://pypi.python.org/pypi/PySide/1.2.4) *(PyQt4 support will be added later)* +2. [Install PySide](https://pypi.python.org/pypi/PySide/1.2.4) (recommended) or [PyQt4](https://riverbankcomputing.com/software/pyqt/download) 3. Install PyAudio: ``python -m pip install pyaudio`` 4. [Download toxygen](https://github.com/xveduk/toxygen/archive/master.zip) 5. Unpack archive @@ -23,22 +26,23 @@ ### Linux -- Install Python2.7: +Dependencies: + +1. Install Python2.7: ``sudo apt-get install python2.7`` -- [Install PySide](https://wiki.qt.io/PySide_Binaries_Linux) *(PyQt4 support will be added later)* -- Install PyAudio: +2. [Install PySide](https://wiki.qt.io/PySide_Binaries_Linux) (recommended) or [PyQt4](https://riverbankcomputing.com/software/pyqt/download) +3. Install [toxcore](https://github.com/irungentoo/toxcore/blob/master/INSTALL.md) with toxav support in your system (install in /usr/lib/) +4. Install PyAudio: ```bash sudo apt-get install portaudio19-dev sudo pip install pyaudio ``` -- [Download toxygen](https://github.com/xveduk/toxygen/archive/master.zip) -- Unpack archive -- Install [toxcore](https://github.com/irungentoo/toxcore/blob/master/INSTALL.md) in your system (install in /usr/lib/) -- Run app: -``python main.py`` +Toxygen: -## Use precompiled binary: -[Check our releases page](https://github.com/xveduk/toxygen/releases) +1. [Download toxygen](https://github.com/xveduk/toxygen/archive/master.zip) +2. Unpack archive +3. Run app: +``python main.py`` ## Compile Toxygen Check [compile.md](/docs/compile.md) for more info diff --git a/src/plugin_support.py b/src/plugin_support.py index f4618f8..fe515da 100644 --- a/src/plugin_support.py +++ b/src/plugin_support.py @@ -76,6 +76,9 @@ class PluginLoader(util.Singleton): self._plugins[name][0].lossy_packet(''.join(chr(x) for x in data[l + 1:length]), friend_number) def friend_online(self, friend_number): + """ + Friend with specified number is online + """ for elem in self._plugins.values(): if elem[1]: elem[0].friend_connected(friend_number) diff --git a/src/profile.py b/src/profile.py index a0cb3b7..a5458d4 100644 --- a/src/profile.py +++ b/src/profile.py @@ -484,6 +484,10 @@ class Profile(Contact, Singleton): self.set_active(self._active_friend) def friend_exit(self, friend_number): + """ + Friend with specified number quit + """ + # TODO: pause transfers self.get_friend_by_number(friend_number).status = None self.friend_typing(friend_number, False) if friend_number in self._call: @@ -600,6 +604,9 @@ class Profile(Contact, Singleton): del self._history def clear_history(self, num=None): + """ + Clear chat history + """ if num is not None: friend = self._friends[num] friend.clear_corr() @@ -696,6 +703,9 @@ class Profile(Contact, Singleton): # ----------------------------------------------------------------------------------------------------------------- def set_alias(self, num): + """ + Set new alias for friend + """ friend = self._friends[num] name = friend.name.encode('utf-8') dialog = QtGui.QApplication.translate('MainWindow', @@ -762,6 +772,9 @@ class Profile(Contact, Singleton): ProfileHelper.get_instance().save_profile(data) def add_friend(self, tox_id): + """ + Adds friend to list + """ num = self._tox.friend_add_norequest(tox_id) # num - friend number item = self.create_friend_item() try: diff --git a/src/toxygen.pro b/src/toxygen.pro index 5c40a3a..463c931 100644 --- a/src/toxygen.pro +++ b/src/toxygen.pro @@ -1,2 +1,2 @@ -SOURCES = main.py profile.py menu.py list_items.py loginscreen.py mainscreen.py plugins/plugin_super_class.py +SOURCES = main.py profile.py menu.py list_items.py loginscreen.py mainscreen.py plugins/plugin_super_class.py callbacks.py widgets.py TRANSLATIONS = translations/en_GB.ts translations/ru_RU.ts translations/fr_FR.ts