redraw ft progressbar only every 500ms instead of on every packet. see #2631
This commit is contained in:
parent
ab18937048
commit
8d1eaf0e4e
|
@ -1251,6 +1251,9 @@ class Interface:
|
||||||
path_to_image = path, title = event_type, text = txt)
|
path_to_image = path, title = event_type, text = txt)
|
||||||
|
|
||||||
def handle_event_file_progress(self, account, file_props):
|
def handle_event_file_progress(self, account, file_props):
|
||||||
|
if time.time() - self.last_ftwindow_update > 0.5:
|
||||||
|
# update ft window every 500ms
|
||||||
|
self.last_ftwindow_update = time.time()
|
||||||
self.instances['file_transfers'].set_progress(file_props['type'],
|
self.instances['file_transfers'].set_progress(file_props['type'],
|
||||||
file_props['sid'], file_props['received-len'])
|
file_props['sid'], file_props['received-len'])
|
||||||
|
|
||||||
|
@ -2012,6 +2015,9 @@ class Interface:
|
||||||
'choose another language by setting the speller_language option.'
|
'choose another language by setting the speller_language option.'
|
||||||
) % lang)
|
) % lang)
|
||||||
gajim.config.set('use_speller', False)
|
gajim.config.set('use_speller', False)
|
||||||
|
|
||||||
|
self.last_ftwindow_update = 0
|
||||||
|
|
||||||
gobject.timeout_add(100, self.autoconnect)
|
gobject.timeout_add(100, self.autoconnect)
|
||||||
gobject.timeout_add(200, self.process_connections)
|
gobject.timeout_add(200, self.process_connections)
|
||||||
gobject.timeout_add(500, self.read_sleepy)
|
gobject.timeout_add(500, self.read_sleepy)
|
||||||
|
|
Loading…
Reference in New Issue