Set transient_for for 'This file already exists' dialog(FT).
This commit is contained in:
parent
0af89a407c
commit
a62d919cdc
|
@ -1958,8 +1958,10 @@ class FTOverwriteConfirmationDialog(ConfirmationDialog):
|
|||
"""
|
||||
|
||||
def __init__(self, pritext, sectext='', propose_resume=True,
|
||||
on_response=None):
|
||||
if hasattr(gajim.interface, 'roster') and gajim.interface.roster:
|
||||
on_response=None, transient_for=None):
|
||||
if transient_for:
|
||||
parent = transient_for
|
||||
elif hasattr(gajim.interface, 'roster') and gajim.interface.roster:
|
||||
parent = gajim.interface.roster.window
|
||||
else:
|
||||
parent = None
|
||||
|
|
|
@ -404,10 +404,9 @@ class FileTransfersWindow:
|
|||
|
||||
dialog = dialogs.FTOverwriteConfirmationDialog(
|
||||
_('This file already exists'), _('What do you want to do?'),
|
||||
propose_resume=not dl_finished, on_response=on_response)
|
||||
dialog.set_transient_for(dialog2)
|
||||
propose_resume=not dl_finished, on_response=on_response,
|
||||
transient_for=dialog2)
|
||||
dialog.set_destroy_with_parent(True)
|
||||
return
|
||||
else:
|
||||
dirname = os.path.dirname(file_path)
|
||||
if not os.access(dirname, os.W_OK) and os.name != 'nt':
|
||||
|
|
|
@ -845,8 +845,8 @@ def on_avatar_save_as_menuitem_activate(widget, jid, default_name=''):
|
|||
return
|
||||
dialog2 = dialogs.FTOverwriteConfirmationDialog(
|
||||
_('This file already exists'), _('What do you want to do?'),
|
||||
propose_resume=False, on_response=(on_continue, file_path))
|
||||
dialog2.set_transient_for(dialog)
|
||||
propose_resume=False, on_response=(on_continue, file_path),
|
||||
transient_for=dialog)
|
||||
dialog2.set_destroy_with_parent(True)
|
||||
else:
|
||||
dirname = os.path.dirname(file_path)
|
||||
|
|
Loading…
Reference in New Issue