destroy send file confirmation dialog when we press ok. fixes #3048
This commit is contained in:
parent
ae9dc18244
commit
aa241a338a
|
@ -4088,15 +4088,6 @@ class RosterWindow:
|
||||||
contact.groups.remove(group)
|
contact.groups.remove(group)
|
||||||
self.remove_contact(contact, account)
|
self.remove_contact(contact, account)
|
||||||
|
|
||||||
def _on_send_files(self, widget, account, jid, uri):
|
|
||||||
c = gajim.contacts.get_contact_with_highest_priority(account, jid)
|
|
||||||
uri_splitted = uri.split() # we may have more than one file dropped
|
|
||||||
for uri in uri_splitted:
|
|
||||||
path = helpers.get_file_path_from_dnd_dropped_uri(uri)
|
|
||||||
if os.path.isfile(path): # is it file?
|
|
||||||
gajim.interface.instances['file_transfers'].send_file(
|
|
||||||
account, c, path)
|
|
||||||
|
|
||||||
def drag_data_received_data(self, treeview, context, x, y, selection, info,
|
def drag_data_received_data(self, treeview, context, x, y, selection, info,
|
||||||
etime):
|
etime):
|
||||||
model = treeview.get_model()
|
model = treeview.get_model()
|
||||||
|
@ -4145,8 +4136,18 @@ class RosterWindow:
|
||||||
for uri in uri_splitted:
|
for uri in uri_splitted:
|
||||||
path = helpers.get_file_path_from_dnd_dropped_uri(uri)
|
path = helpers.get_file_path_from_dnd_dropped_uri(uri)
|
||||||
sec_text += '\n' + os.path.basename(path)
|
sec_text += '\n' + os.path.basename(path)
|
||||||
|
def _on_send_files(widget, account, jid, uri):
|
||||||
|
dialog.destroy()
|
||||||
|
c = gajim.contacts.get_contact_with_highest_priority(account, jid)
|
||||||
|
uri_splitted = uri.split() # we may have more than one file dropped
|
||||||
|
for uri in uri_splitted:
|
||||||
|
path = helpers.get_file_path_from_dnd_dropped_uri(uri)
|
||||||
|
if os.path.isfile(path): # is it file?
|
||||||
|
gajim.interface.instances['file_transfers'].send_file(
|
||||||
|
account, c, path)
|
||||||
|
|
||||||
dialog = dialogs.NonModalConfirmationDialog(prim_text, sec_text,
|
dialog = dialogs.NonModalConfirmationDialog(prim_text, sec_text,
|
||||||
on_response_ok = (self._on_send_files, account_dest, jid_dest, uri))
|
on_response_ok = (_on_send_files, account_dest, jid_dest, uri))
|
||||||
dialog.popup()
|
dialog.popup()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue