docs update

This commit is contained in:
ingvar1995 2016-03-30 21:05:21 +03:00
parent 9696615caf
commit 420c4b943a
5 changed files with 13 additions and 6 deletions

3
.gitignore vendored
View file

@ -12,3 +12,6 @@ src/libs
*.iml *.iml
*.so *.so
*.log *.log
src/build
src/dist
*.spec

Binary file not shown.

View file

@ -48,7 +48,6 @@ class FileTransfer(QtCore.QObject):
def cancel(self): def cancel(self):
self.send_control(TOX_FILE_CONTROL['CANCEL']) self.send_control(TOX_FILE_CONTROL['CANCEL'])
if hasattr(self, '_file'): if hasattr(self, '_file'):
print 'closing'
self._file.close() self._file.close()
self._state_changed.signal.emit(self.state, self._done / self._size) self._state_changed.signal.emit(self.state, self._done / self._size)
@ -65,10 +64,6 @@ class FileTransfer(QtCore.QObject):
def get_file_id(self): def get_file_id(self):
return self._tox.file_get_file_id(self._friend_number, self._file_number) return self._tox.file_get_file_id(self._friend_number, self._file_number)
def file_seek(self):
# TODO implement or not implement
pass
# ----------------------------------------------------------------------------------------------------------------- # -----------------------------------------------------------------------------------------------------------------
# Send file # Send file
# ----------------------------------------------------------------------------------------------------------------- # -----------------------------------------------------------------------------------------------------------------

View file

@ -28,6 +28,9 @@ class Message(object):
class TextMessage(Message): class TextMessage(Message):
"""
Plain text or action message
"""
def __init__(self, message, owner, time, message_type): def __init__(self, message, owner, time, message_type):
super(TextMessage, self).__init__(message_type, owner, time) super(TextMessage, self).__init__(message_type, owner, time)
@ -38,6 +41,9 @@ class TextMessage(Message):
class TransferMessage(Message): class TransferMessage(Message):
"""
Message with info about file transfer
"""
def __init__(self, owner, time, status, size, name, friend_number, file_number): def __init__(self, owner, time, status, size, name, friend_number, file_number):
super(TransferMessage, self).__init__(MESSAGE_TYPE['FILE_TRANSFER'], owner, time) super(TransferMessage, self).__init__(MESSAGE_TYPE['FILE_TRANSFER'], owner, time)
@ -66,6 +72,9 @@ class TransferMessage(Message):
class InlineImage(Message): class InlineImage(Message):
"""
Inline image
"""
def __init__(self, owner, time, data): def __init__(self, owner, time, data):
super(InlineImage, self).__init__(MESSAGE_TYPE['INLINE'], owner, time) super(InlineImage, self).__init__(MESSAGE_TYPE['INLINE'], owner, time)

View file

@ -7,7 +7,7 @@ program_version = '0.0.3'
def log(data): def log(data):
with open('logs.log', 'a') as fl: with open(curr_directory() + '/logs.log', 'a') as fl:
fl.write(str(data) + '\n') fl.write(str(data) + '\n')