diff src/plugins/plugin_misc_file.py @ 1601:e0a152f2cf6d

core (xmlui), plugin file: added action_extra param to deferXMLUI/deferDialog which is merged to the action data dict when actionNew is called
author Goffi <goffi@goffi.org>
date Sun, 15 Nov 2015 23:11:27 +0100
parents b144babc2658
children 33728a2f17bf
line wrap: on
line diff
--- a/src/plugins/plugin_misc_file.py	Sat Nov 14 19:54:27 2015 +0100
+++ b/src/plugins/plugin_misc_file.py	Sun Nov 15 23:11:27 2015 +0100
@@ -202,6 +202,10 @@
                 self.host,
                 _(CONFIRM_OVERWRITE).format(file_path),
                 _(CONFIRM_OVERWRITE_TITLE),
+                action_extra={'meta_from_jid': peer_jid.full(),
+                              'meta_type': C.META_TYPE_OVERWRITE,
+                              'meta_progress_id': file_data[PROGRESS_ID_KEY]
+                             },
                 profile=profile)
             exists_d.addCallback(check_overwrite)
             return exists_d
@@ -243,6 +247,10 @@
             _(CONFIRM_TITLE),
             type_=C.XMLUI_DIALOG_FILE,
             options={C.XMLUI_DATA_FILETYPE: C.XMLUI_DATA_FILETYPE_DIR},
+            action_extra={'meta_from_jid': peer_jid.full(),
+                          'meta_type': C.META_TYPE_FILE,
+                          'meta_progress_id': file_data[PROGRESS_ID_KEY]
+                         },
             profile=profile)
         d.addCallback(self._gotConfirmation, peer_jid, transfer_data, file_data, profile)
         return d