docs update

This commit is contained in:
ingvar1995 2016-05-30 22:26:07 +03:00
parent 74d7c67d8c
commit 51ec1af369
4 changed files with 32 additions and 12 deletions

View file

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

View file

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

View file

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