comparison 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
comparison
equal deleted inserted replaced
1600:8d41cd4da2f6 1601:e0a152f2cf6d
200 200
201 exists_d = xml_tools.deferConfirm( 201 exists_d = xml_tools.deferConfirm(
202 self.host, 202 self.host,
203 _(CONFIRM_OVERWRITE).format(file_path), 203 _(CONFIRM_OVERWRITE).format(file_path),
204 _(CONFIRM_OVERWRITE_TITLE), 204 _(CONFIRM_OVERWRITE_TITLE),
205 action_extra={'meta_from_jid': peer_jid.full(),
206 'meta_type': C.META_TYPE_OVERWRITE,
207 'meta_progress_id': file_data[PROGRESS_ID_KEY]
208 },
205 profile=profile) 209 profile=profile)
206 exists_d.addCallback(check_overwrite) 210 exists_d.addCallback(check_overwrite)
207 return exists_d 211 return exists_d
208 212
209 self._openFileWrite(file_path, transfer_data, file_data, profile) 213 self._openFileWrite(file_path, transfer_data, file_data, profile)
241 d = xml_tools.deferDialog(self.host, 245 d = xml_tools.deferDialog(self.host,
242 _(CONFIRM).format(peer=peer_jid.full(), **file_data), 246 _(CONFIRM).format(peer=peer_jid.full(), **file_data),
243 _(CONFIRM_TITLE), 247 _(CONFIRM_TITLE),
244 type_=C.XMLUI_DIALOG_FILE, 248 type_=C.XMLUI_DIALOG_FILE,
245 options={C.XMLUI_DATA_FILETYPE: C.XMLUI_DATA_FILETYPE_DIR}, 249 options={C.XMLUI_DATA_FILETYPE: C.XMLUI_DATA_FILETYPE_DIR},
250 action_extra={'meta_from_jid': peer_jid.full(),
251 'meta_type': C.META_TYPE_FILE,
252 'meta_progress_id': file_data[PROGRESS_ID_KEY]
253 },
246 profile=profile) 254 profile=profile)
247 d.addCallback(self._gotConfirmation, peer_jid, transfer_data, file_data, profile) 255 d.addCallback(self._gotConfirmation, peer_jid, transfer_data, file_data, profile)
248 return d 256 return d