Bug 1073501 - Include activity type in activity-choice mozChromeEvent. r=fabrice

This commit is contained in:
David Garcia 2014-10-31 01:50:00 -04:00
Родитель ae9ea5239b
Коммит 5f63fe0ac4
1 изменённых файлов: 12 добавлений и 2 удалений

Просмотреть файл

@ -41,6 +41,10 @@ ActivitiesDialog.prototype = {
choices: choices
};
if (activity.type) {
detail.activityType = activity.type;
}
// Listen the resulting choice from the front-end. If there is no choice,
// let's return -1, which means the user has cancelled the dialog.
SystemAppProxy.addEventListener("mozContentEvent", function act_getChoice(evt) {
@ -64,11 +68,17 @@ ActivitiesDialog.prototype = {
return;
}
this.activities.push({
let activity = {
name: aOptions.name,
list: aActivities,
callback: aCallback
});
};
if (aOptions.data && aOptions.data.type) {
activity.type = aOptions.data.type;
}
this.activities.push(activity);
Services.tm.currentThread.dispatch(this, Ci.nsIEventTarget.DISPATCH_NORMAL);
},