зеркало из https://github.com/mozilla/pjs.git
Merge m-c to m-i; a=merge
This commit is contained in:
Коммит
fd95d11f25
|
@ -157,7 +157,7 @@ __defineSetter__("PluralForm", function (val) {
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "TelemetryStopwatch",
|
XPCOMUtils.defineLazyModuleGetter(this, "TelemetryStopwatch",
|
||||||
"resource:///modules/TelemetryStopwatch.jsm");
|
"resource://gre/modules/TelemetryStopwatch.jsm");
|
||||||
|
|
||||||
#ifdef MOZ_SERVICES_SYNC
|
#ifdef MOZ_SERVICES_SYNC
|
||||||
XPCOMUtils.defineLazyGetter(this, "Weave", function() {
|
XPCOMUtils.defineLazyGetter(this, "Weave", function() {
|
||||||
|
|
|
@ -105,5 +105,7 @@ function getIconForApp(aShell, callback) {
|
||||||
function onIconDownloaded(aShell, aMimeType, aStatusCode, aIcon, aCallback) {
|
function onIconDownloaded(aShell, aMimeType, aStatusCode, aIcon, aCallback) {
|
||||||
if (Components.isSuccessCode(aStatusCode)) {
|
if (Components.isSuccessCode(aStatusCode)) {
|
||||||
aShell.processIcon(aMimeType, aIcon, aCallback);
|
aShell.processIcon(aMimeType, aIcon, aCallback);
|
||||||
|
} else {
|
||||||
|
aCallback.call(aShell);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,9 +8,9 @@ const Cc = Components.classes;
|
||||||
const Ci = Components.interfaces;
|
const Ci = Components.interfaces;
|
||||||
const Cu = Components.utils;
|
const Cu = Components.utils;
|
||||||
|
|
||||||
Cu.import("resource:///modules/Services.jsm");
|
Cu.import("resource://gre/modules/Services.jsm");
|
||||||
Cu.import("resource:///modules/FileUtils.jsm");
|
Cu.import("resource://gre/modules/FileUtils.jsm");
|
||||||
Cu.import("resource:///modules/NetUtil.jsm");
|
Cu.import("resource://gre/modules/NetUtil.jsm");
|
||||||
|
|
||||||
let WebappsInstaller = {
|
let WebappsInstaller = {
|
||||||
/**
|
/**
|
||||||
|
@ -495,7 +495,7 @@ MacNativeApp.prototype = {
|
||||||
throw(ex);
|
throw(ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
getIconForApp(this);
|
getIconForApp(this, this._createPListFile);
|
||||||
},
|
},
|
||||||
|
|
||||||
_removeInstallation: function(keepProfile) {
|
_removeInstallation: function(keepProfile) {
|
||||||
|
@ -561,7 +561,10 @@ MacNativeApp.prototype = {
|
||||||
writer.setString("Webapp", "Name", this.appName);
|
writer.setString("Webapp", "Name", this.appName);
|
||||||
writer.setString("Webapp", "Profile", this.appProfileDir.leafName);
|
writer.setString("Webapp", "Profile", this.appProfileDir.leafName);
|
||||||
writer.writeFile();
|
writer.writeFile();
|
||||||
|
},
|
||||||
|
|
||||||
|
_createPListFile: function() {
|
||||||
|
// ${InstallDir}/Contents/Info.plist
|
||||||
let infoPListContent = '<?xml version="1.0" encoding="UTF-8"?>\n\
|
let infoPListContent = '<?xml version="1.0" encoding="UTF-8"?>\n\
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n\
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n\
|
||||||
<plist version="1.0">\n\
|
<plist version="1.0">\n\
|
||||||
|
@ -616,7 +619,7 @@ MacNativeApp.prototype = {
|
||||||
* @param aCallback a callback function to be called
|
* @param aCallback a callback function to be called
|
||||||
* after the process finishes
|
* after the process finishes
|
||||||
*/
|
*/
|
||||||
processIcon: function(aMimeType, aIcon) {
|
processIcon: function(aMimeType, aIcon, aCallback) {
|
||||||
try {
|
try {
|
||||||
let process = Cc["@mozilla.org/process/util;1"]
|
let process = Cc["@mozilla.org/process/util;1"]
|
||||||
.createInstance(Ci.nsIProcess);
|
.createInstance(Ci.nsIProcess);
|
||||||
|
@ -633,6 +636,8 @@ MacNativeApp.prototype = {
|
||||||
9);
|
9);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
throw(e);
|
throw(e);
|
||||||
|
} finally {
|
||||||
|
aCallback.call(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ let Cu = Components.utils;
|
||||||
Cu.import("resource://gre/modules/Services.jsm");
|
Cu.import("resource://gre/modules/Services.jsm");
|
||||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
Cu.import("resource://gre/modules/Webapps.jsm");
|
Cu.import("resource://gre/modules/Webapps.jsm");
|
||||||
Cu.import("resource://gre/modules/WebappsInstaller.jsm");
|
Cu.import("resource:///modules/WebappsInstaller.jsm");
|
||||||
|
|
||||||
let webappsUI = {
|
let webappsUI = {
|
||||||
init: function webappsUI_init() {
|
init: function webappsUI_init() {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче