bug 858321 update default state of toolbarbutton menu, r=markh

This commit is contained in:
Shane Caraveo
2013-05-06 11:25:24 -07:00
parent 78d816db18
commit d064f94ab1
8 changed files with 40 additions and 6 deletions

View File

@@ -694,13 +694,17 @@ SocialToolbar = {
// Called when the Social.provider changes
updateProvider: function () {
let provider = Social.provider || Social.defaultProvider;
let provider = Social.provider;
if (provider) {
this.button.setAttribute("label", provider.name);
this.button.setAttribute("tooltiptext", provider.name);
this.button.style.listStyleImage = "url(" + provider.iconURL + ")";
this.updateProfile();
} else {
this.button.setAttribute("label", gNavigatorBundle.getString("service.toolbarbutton.label"));
this.button.setAttribute("tooltiptext", gNavigatorBundle.getString("service.toolbarbutton.tooltiptext"));
this.button.style.removeProperty("list-style-image");
}
this.updateButton();
},
@@ -994,7 +998,7 @@ SocialToolbar = {
menu.removeChild(providerMenuSep.previousSibling);
}
// only show a selection if enabled and there is more than one
if (!SocialUI.enabled || Social.providers.length < 2) {
if (Social.providers.length < 2) {
providerMenuSep.hidden = true;
return;
}