[zimio and I] warn user when quitting while file transfers are running. Fixes #2467
This commit is contained in:
parent
8faa6feac6
commit
2e5bd08221
1 changed files with 19 additions and 1 deletions
|
@ -2305,7 +2305,7 @@ class RosterWindow:
|
|||
get_msg = True
|
||||
break
|
||||
|
||||
def on_continue2(message, pep_dict):
|
||||
def on_continue3(message, pep_dict):
|
||||
self.quit_on_next_offline = 0
|
||||
accounts_to_disconnect = []
|
||||
for acct in accounts:
|
||||
|
@ -2320,6 +2320,24 @@ class RosterWindow:
|
|||
if not self.quit_on_next_offline:
|
||||
self.quit_gtkgui_interface()
|
||||
|
||||
def on_continue2(message, pep_dict):
|
||||
# check if there is an active file transfer
|
||||
files_props = gajim.interface.instances['file_transfers'].files_props
|
||||
transfer_active = False
|
||||
for x in files_props:
|
||||
for y in files_props[x]:
|
||||
if is_transfer_active(files_props[x][y]):
|
||||
transfer_active = True
|
||||
break
|
||||
|
||||
if transfer_active:
|
||||
dialogs.ConfirmationDialog(_('You have running file transfers'),
|
||||
_('If you quit now, the file(s) being transfered will be '
|
||||
'stopped. Do you still want to quit?'),
|
||||
on_response_ok=(on_continue3, message, pep_dict))
|
||||
return
|
||||
on_continue3(message, pep_dict)
|
||||
|
||||
def on_continue(message, pep_dict):
|
||||
if message is None:
|
||||
# user pressed Cancel to change status message dialog
|
||||
|
|
Loading…
Add table
Reference in a new issue