зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1023193: make a customizableWidget out of the Loop toolbar button. r=mconley
This commit is contained in:
Родитель
c7fa0bb48d
Коммит
4b89b84a05
|
@ -917,22 +917,6 @@
|
|||
cui-areatype="toolbar"
|
||||
aboutHomeOverrideTooltip="&abouthome.pageTitle;"/>
|
||||
|
||||
<!-- XXX Bug 1013989 will provide a label for the button -->
|
||||
<!-- This uses badged to be compatible with the social api code it shares.
|
||||
We may also want it to be badged in the future, for notification
|
||||
purposes. -->
|
||||
<toolbarbutton id="loop-call-button"
|
||||
class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
persist="class"
|
||||
type="badged"
|
||||
removable="true"
|
||||
tooltiptext="&loopCallButton.tooltip;"
|
||||
oncommand="LoopUI.openCallPanel(event);"
|
||||
cui-areatype="toolbar"
|
||||
>
|
||||
</toolbarbutton>
|
||||
|
||||
|
||||
<toolbarbutton id="social-share-button"
|
||||
class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
label="&sharePageCmd.label;"
|
||||
|
|
|
@ -52,7 +52,7 @@ const kSubviewEvents = [
|
|||
* The current version. We can use this to auto-add new default widgets as necessary.
|
||||
* (would be const but isn't because of testing purposes)
|
||||
*/
|
||||
let kVersion = 0;
|
||||
let kVersion = 1;
|
||||
|
||||
/**
|
||||
* gPalette is a map of every widget that CustomizableUI.jsm knows about, keyed
|
||||
|
|
|
@ -898,6 +898,28 @@ const CustomizableWidgets = [{
|
|||
let win = aEvent.view;
|
||||
win.MailIntegration.sendLinkForWindow(win.content);
|
||||
}
|
||||
}, {
|
||||
id: "loop-call-button",
|
||||
type: "custom",
|
||||
// XXX Bug 1013989 will provide a label for the button
|
||||
label: "loop-call-button.label",
|
||||
tooltiptext: "loop-call-button.tooltiptext",
|
||||
defaultArea: CustomizableUI.AREA_NAVBAR,
|
||||
introducedInVersion: 1,
|
||||
onBuild: function(aDocument) {
|
||||
let node = aDocument.createElementNS(kNSXUL, "toolbarbutton");
|
||||
node.setAttribute("id", this.id);
|
||||
node.classList.add("toolbarbutton-1");
|
||||
node.classList.add("chromeclass-toolbar-additional");
|
||||
node.setAttribute("type", "badged");
|
||||
node.setAttribute("label", CustomizableUI.getLocalizedProperty(this, "label"));
|
||||
node.setAttribute("tooltiptext", CustomizableUI.getLocalizedProperty(this, "tooltiptext"));
|
||||
node.setAttribute("removable", "true");
|
||||
node.addEventListener("command", function(event) {
|
||||
aDocument.defaultView.LoopUI.openCallPanel(event);
|
||||
});
|
||||
return node;
|
||||
}
|
||||
}];
|
||||
|
||||
#ifdef XP_WIN
|
||||
|
|
|
@ -715,8 +715,6 @@ just addresses the organization to follow, e.g. "This site is run by " -->
|
|||
<!ENTITY getUserMedia.selectMicrophone.accesskey "M">
|
||||
<!ENTITY getUserMedia.allWindowsShared.message "All visible windows on your screen will be shared.">
|
||||
|
||||
<!ENTITY loopCallButton.tooltip "Invite someone to talk">
|
||||
|
||||
<!ENTITY mixedContentBlocked.moreinfo "Most websites will still work properly even when this content is blocked.">
|
||||
|
||||
<!ENTITY pointerLock.notification.message "Press ESC at any time to show it again.">
|
||||
|
|
|
@ -96,3 +96,6 @@ quit-button.tooltiptext.linux2 = Quit %1$S (%2$S)
|
|||
# LOCALIZATION NOTE(quit-button.tooltiptext.mac): %1$S is the brand name (e.g. Firefox),
|
||||
# %2$S is the keyboard shortcut
|
||||
quit-button.tooltiptext.mac = Quit %1$S (%2$S)
|
||||
|
||||
loop-call-button.label = Invite someone to talk
|
||||
loop-call-button.tooltiptext = Invite someone to talk
|
||||
|
|
Загрузка…
Ссылка в новой задаче