Commit 1b1ca88c authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Interface: Simplify event code

parent e00dad0b
......@@ -168,14 +168,6 @@ def generate(self):
self.file_props.transfered_size = []
return True
class FileTransferCompletedEvent(nec.NetworkIncomingEvent):
name = 'file-transfer-completed'
def generate(self):
jid = str(self.file_props.receiver)
self.jid = app.get_jid_without_resource(jid)
return True
class NotificationEvent(nec.NetworkIncomingEvent):
name = 'notification'
base_network_events = ['decrypted-message-received',
......@@ -77,8 +77,7 @@
from gajim.common.structs import MUCData
from import NetworkEvent
from gajim.common.i18n import _
from gajim.common.connection_handlers_events import (
OurShowEvent, FileTransferCompletedEvent)
from gajim.common.connection_handlers_events import OurShowEvent
from gajim.common.modules.httpupload import HTTPUploadProgressEvent
from gajim.common.connection import Connection
......@@ -637,8 +636,12 @@ def handle_event_file_rcv_completed(self, account, file_props):
if file_props.error == 0:
file_props.type_, file_props.sid, file_props.received_len)
jid = app.get_jid_without_resource(str(file_props.receiver))
FileTransferCompletedEvent(None, file_props=file_props))
ft.set_status(file_props, 'stop')
if not file_props.completed and (file_props.stalled or
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment