summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorFranklinDM <mrmineshafter17@gmail.com>2018-11-16 21:40:17 +0800
committerFranklinDM <mrmineshafter17@gmail.com>2018-11-16 21:40:17 +0800
commitae48428aa3f5e45db068106e825e23e80f1a1a55 (patch)
tree129f8c4e550a2cbef2e081ef5b34f6e7f50ef44d /application
parentbecd71a8600c7229f765d8eda21c1843c4f4adf1 (diff)
downloadUXP-ae48428aa3f5e45db068106e825e23e80f1a1a55.tar
UXP-ae48428aa3f5e45db068106e825e23e80f1a1a55.tar.gz
UXP-ae48428aa3f5e45db068106e825e23e80f1a1a55.tar.lz
UXP-ae48428aa3f5e45db068106e825e23e80f1a1a55.tar.xz
UXP-ae48428aa3f5e45db068106e825e23e80f1a1a55.zip
Issue #638 - Part 2: Add tooltip to mute/unmute buttons
Diffstat (limited to 'application')
-rw-r--r--application/palemoon/base/content/tabbrowser.xml22
-rw-r--r--application/palemoon/locales/en-US/chrome/browser/tabbrowser.properties4
2 files changed, 23 insertions, 3 deletions
diff --git a/application/palemoon/base/content/tabbrowser.xml b/application/palemoon/base/content/tabbrowser.xml
index 0a2a1c3f5..d73f87bd6 100644
--- a/application/palemoon/base/content/tabbrowser.xml
+++ b/application/palemoon/base/content/tabbrowser.xml
@@ -3084,9 +3084,25 @@
event.preventDefault();
return;
}
- event.target.setAttribute("label", tab.mOverCloseButton ?
- tab.getAttribute("closetabtext") :
- tab.getAttribute("label"));
+
+ var stringID, label;
+ if (tab.mOverCloseButton) {
+ stringID = "tabs.closeTab";
+ } else if (tab._overPlayingIcon) {
+ if (tab.linkedBrowser.audioBlocked) {
+ stringID = "tabs.unblockAudio.tooltip";
+ } else {
+ stringID = tab.linkedBrowser.audioMuted ?
+ "tabs.unmuteAudio.tooltip" :
+ "tabs.muteAudio.tooltip";
+ }
+ } else {
+ label = tab.getAttribute("label");
+ }
+ if (stringID && !label) {
+ label = this.mStringBundle.getString(stringID);
+ }
+ event.target.setAttribute("label", label);
]]></body>
</method>
diff --git a/application/palemoon/locales/en-US/chrome/browser/tabbrowser.properties b/application/palemoon/locales/en-US/chrome/browser/tabbrowser.properties
index 0d21d4d14..a4a0be0a0 100644
--- a/application/palemoon/locales/en-US/chrome/browser/tabbrowser.properties
+++ b/application/palemoon/locales/en-US/chrome/browser/tabbrowser.properties
@@ -24,3 +24,7 @@ tabs.closeWarningTitle=Confirm close
tabs.closeWarningMultipleTabs=You are about to close %S tabs. Are you sure you want to continue?
tabs.closeButtonMultiple=Close tabs
tabs.closeWarningPromptMe=Warn me when I attempt to close multiple tabs
+
+tabs.muteAudio.tooltip=Mute tab
+tabs.unmuteAudio.tooltip=Unmute tab
+tabs.unblockAudio.tooltip=Play tab