qtox screenshots support
This commit is contained in:
parent
9d939e7439
commit
6cafd14883
@ -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
|
||||||
|
@ -883,7 +883,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:
|
||||||
|
Loading…
Reference in New Issue
Block a user