mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 32d1752fb7ba (bug 786095)
This commit is contained in:
parent
ff540847c2
commit
a1824208ff
@ -80,10 +80,6 @@ let SocialUI = {
|
||||
let accesskey = gNavigatorBundle.getString("social.toggle.accesskey");
|
||||
toggleCommand.setAttribute("label", label);
|
||||
toggleCommand.setAttribute("accesskey", accesskey);
|
||||
// Override the normal 'checked' state set by updateToggleCommand
|
||||
// when in safe mode so the feature can be disabled.
|
||||
if (Services.appinfo.inSafeMode)
|
||||
toggleCommand.setAttribute("checked", Services.prefs.getBoolPref("social.enabled"));
|
||||
|
||||
SocialToolbar.init();
|
||||
SocialShareButton.init();
|
||||
|
@ -19,10 +19,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "SocialService",
|
||||
let Social = {
|
||||
lastEventReceived: 0,
|
||||
provider: null,
|
||||
_disabledForSafeMode: false,
|
||||
init: function Social_init(callback) {
|
||||
this._disabledForSafeMode = Services.appinfo.inSafeMode && this.enabled;
|
||||
|
||||
if (this.provider) {
|
||||
schedule(callback);
|
||||
return;
|
||||
@ -57,8 +54,7 @@ let Social = {
|
||||
},
|
||||
|
||||
toggle: function Social_toggle() {
|
||||
this.enabled = this._disabledForSafeMode ? true : !this.enabled;
|
||||
this._disabledForSafeMode = false;
|
||||
this.enabled = !this.enabled;
|
||||
},
|
||||
|
||||
toggleSidebar: function SocialSidebar_toggle() {
|
||||
|
@ -63,7 +63,7 @@ XPCOMUtils.defineLazyGetter(SocialServiceInternal, "providers", function () {
|
||||
try {
|
||||
var manifest = JSON.parse(MANIFEST_PREFS.getCharPref(pref));
|
||||
if (manifest && typeof(manifest) == "object") {
|
||||
let provider = new SocialProvider(manifest, Services.appinfo.inSafeMode ? false : SocialServiceInternal.enabled);
|
||||
let provider = new SocialProvider(manifest, SocialServiceInternal.enabled);
|
||||
providers[provider.origin] = provider;
|
||||
}
|
||||
} catch (err) {
|
||||
@ -86,11 +86,7 @@ const SocialService = {
|
||||
},
|
||||
set enabled(val) {
|
||||
let enable = !!val;
|
||||
|
||||
// Allow setting to the same value when in safe mode so the
|
||||
// feature can be force enabled.
|
||||
if (enable == SocialServiceInternal.enabled &&
|
||||
!Services.appinfo.inSafeMode)
|
||||
if (enable == SocialServiceInternal.enabled)
|
||||
return;
|
||||
|
||||
Services.prefs.setBoolPref("social.enabled", enable);
|
||||
|
Loading…
Reference in New Issue
Block a user