зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1073501 - Include activity type in activity-choice mozChromeEvent. r=fabrice
This commit is contained in:
Родитель
ae9ea5239b
Коммит
5f63fe0ac4
|
@ -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);
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче