author | Richard Marti <richard.marti@gmail.com> |
Tue, 15 Jul 2014 23:05:55 +0200 | |
changeset 194345 | c12579b0b8561454443c5bbdb560c18ffa65ccd8 |
parent 194344 | b6ca88f40b7964d62ca2f2d91cc9998c4914c60f |
child 194346 | acf444215f8d167082b6612b6e58667cc6ac0258 |
push id | 27144 |
push user | kwierso@gmail.com |
push date | Wed, 16 Jul 2014 21:35:16 +0000 |
treeherder | mozilla-central@4024d8019701 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mattn |
bugs | 1036054 |
milestone | 33.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/browser/components/preferences/in-content/sync.js +++ b/browser/components/preferences/in-content/sync.js @@ -273,23 +273,29 @@ let gSyncPane = { fxAccounts.resendVerificationEmail().then(() => { fxAccounts.getSignedInUser().then(data => { let sb = this._stringBundle; let title = sb.GetStringFromName("firefoxAccountsVerificationSentTitle"); let heading = sb.formatStringFromName("firefoxAccountsVerificationSentHeading", [data.email], 1); let description = sb.GetStringFromName("firefoxAccountVerificationSentDescription"); - Services.prompt.alert(window, title, heading + "\n\n" + description); + let factory = Cc["@mozilla.org/prompter;1"] + .getService(Ci.nsIPromptFactory); + let prompt = factory.getPrompt(window, Ci.nsIPrompt); + let bag = prompt.QueryInterface(Ci.nsIWritablePropertyBag2); + bag.setPropertyAsBool("allowTabModal", true); + + prompt.alert(title, heading + "\n\n" + description); }); }); }, openOldSyncSupportPage: function() { - let url = Services.urlFormatter.formatURLPref('app.support.baseURL') + "old-sync" + let url = Services.urlFormatter.formatURLPref("app.support.baseURL") + "old-sync"; this.openContentInBrowser(url); }, unlinkFirefoxAccount: function(confirm) { if (confirm) { // We use a string bundle shared with aboutAccounts. let sb = Services.strings.createBundle("chrome://browser/locale/syncSetup.properties"); let continueLabel = sb.GetStringFromName("continue.label"); @@ -299,23 +305,31 @@ let gSyncPane = { let body = sb.GetStringFromName("disconnect.verify.heading") + "\n\n" + sb.formatStringFromName("disconnect.verify.description", [brandShortName], 1); let ps = Services.prompt; let buttonFlags = (ps.BUTTON_POS_0 * ps.BUTTON_TITLE_IS_STRING) + (ps.BUTTON_POS_1 * ps.BUTTON_TITLE_CANCEL) + ps.BUTTON_POS_1_DEFAULT; - let pressed = Services.prompt.confirmEx(window, title, body, buttonFlags, - continueLabel, null, null, null, {}); + + let factory = Cc["@mozilla.org/prompter;1"] + .getService(Ci.nsIPromptFactory); + let prompt = factory.getPrompt(window, Ci.nsIPrompt); + let bag = prompt.QueryInterface(Ci.nsIWritablePropertyBag2); + bag.setPropertyAsBool("allowTabModal", true); + + let pressed = prompt.confirmEx(title, body, buttonFlags, + continueLabel, null, null, null, {}); + if (pressed != 0) { // 0 is the "continue" button return; } } - Components.utils.import('resource://gre/modules/FxAccounts.jsm'); + Cu.import("resource://gre/modules/FxAccounts.jsm"); fxAccounts.signOut().then(() => { this.updateWeavePrefs(); }); }, openQuotaDialog: function () { let win = Services.wm.getMostRecentWindow("Sync:ViewQuota"); if (win)