mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1032932 fix talos regression with share button, r=Gijs
This commit is contained in:
parent
69ed385dfd
commit
5e61a2db19
@ -551,14 +551,15 @@ SocialShare = {
|
||||
},
|
||||
|
||||
update: function() {
|
||||
let shareButton = this.shareButton;
|
||||
if (!shareButton)
|
||||
let widget = CustomizableUI.getWidget("social-share-button");
|
||||
if (!widget)
|
||||
return;
|
||||
// if we got here, the button is in the window somewhere, update it's hidden
|
||||
// state based on available providers.
|
||||
shareButton.hidden = !SocialUI.enabled ||
|
||||
[p for (p of Social.providers) if (p.shareURL)].length == 0;
|
||||
let disabled = shareButton.hidden || !this.canSharePage(gBrowser.currentURI);
|
||||
let shareButton = widget.forWindow(window).node;
|
||||
// hidden state is based on available share providers and location of
|
||||
// button. It's always visible and disabled in the customization palette.
|
||||
shareButton.hidden = !SocialUI.enabled || (widget.areaType &&
|
||||
[p for (p of Social.providers) if (p.shareURL)].length == 0);
|
||||
let disabled = !widget.areaType || shareButton.hidden || !this.canSharePage(gBrowser.currentURI);
|
||||
|
||||
// 1. update the relevent command's disabled state so the keyboard
|
||||
// shortcut only works when available.
|
||||
|
@ -939,6 +939,7 @@
|
||||
tooltiptext="&sharePageCmd.label;"
|
||||
cui-areatype="toolbar"
|
||||
removable="true"
|
||||
hidden="true"
|
||||
command="Social:SharePage"/>
|
||||
</hbox>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user