Bug 1649788 - Remove the unused "Show Header" checkbox under IM prefs. r=clokep DONTBUILD
This commit is contained in:
Родитель
726398e336
Коммит
f8f4a035ed
|
@ -61,7 +61,6 @@ pref("messenger.options.filterMode", 2);
|
|||
pref("messenger.options.emoticonsTheme", "default");
|
||||
pref("messenger.options.messagesStyle.theme", "bubbles");
|
||||
pref("messenger.options.messagesStyle.variant", "default");
|
||||
pref("messenger.options.messagesStyle.showHeader", false);
|
||||
pref("messenger.options.messagesStyle.combineConsecutive", true);
|
||||
// if the time interval in seconds between two messages is longer than
|
||||
// this value, the messages will not be combined
|
||||
|
|
|
@ -25,7 +25,6 @@ const { XPCOMUtils } = ChromeUtils.import(
|
|||
var kMessagesStylePrefBranch = "messenger.options.messagesStyle.";
|
||||
var kThemePref = "theme";
|
||||
var kVariantPref = "variant";
|
||||
var kShowHeaderPref = "showHeader";
|
||||
var kCombineConsecutivePref = "combineConsecutive";
|
||||
var kCombineConsecutiveIntervalPref = "combineConsecutiveInterval";
|
||||
|
||||
|
@ -259,7 +258,6 @@ function getThemeByName(aName) {
|
|||
baseURI,
|
||||
metadata,
|
||||
html: new HTMLTheme(baseURI),
|
||||
showHeader: gPrefBranch.getBoolPref(kShowHeaderPref),
|
||||
combineConsecutive: gPrefBranch.getBoolPref(kCombineConsecutivePref),
|
||||
combineConsecutiveInterval: gPrefBranch.getIntPref(
|
||||
kCombineConsecutiveIntervalPref
|
||||
|
@ -392,7 +390,7 @@ function getStatusIconFromBuddy(aBuddy) {
|
|||
return "chrome://chat/skin/" + status + "-16.png";
|
||||
}
|
||||
|
||||
var headerFooterReplacements = {
|
||||
var footerReplacements = {
|
||||
chatName: aConv => TXTToHTML(aConv.title),
|
||||
sourceName: aConv => TXTToHTML(aConv.account.alias || aConv.account.name),
|
||||
destinationName: aConv => TXTToHTML(aConv.name),
|
||||
|
@ -723,18 +721,11 @@ function initHTMLDocument(aConv, aTheme, aDoc) {
|
|||
|
||||
HTML += '</head><body id="ibcontent">';
|
||||
|
||||
// We insert the whole content of body: header, chat div, footer
|
||||
if (aTheme.showHeader) {
|
||||
HTML += replaceKeywordsInHTML(
|
||||
aTheme.html.header,
|
||||
headerFooterReplacements,
|
||||
aConv
|
||||
);
|
||||
}
|
||||
// We insert the whole content of body: chat div, footer
|
||||
HTML += '<div id="Chat" aria-live="polite"></div>';
|
||||
HTML += replaceKeywordsInHTML(
|
||||
aTheme.html.footer,
|
||||
headerFooterReplacements,
|
||||
footerReplacements,
|
||||
aConv
|
||||
);
|
||||
aDoc.open();
|
||||
|
|
|
@ -192,8 +192,6 @@
|
|||
onselect="previewObserver.currentVariantChanged();"/>
|
||||
</hbox>
|
||||
</hbox>
|
||||
<checkbox id="showHeaderCheckbox" data-l10n-id="chat-header-label"
|
||||
preference="messenger.options.messagesStyle.showHeader"/>
|
||||
</html:fieldset>
|
||||
</html:div>
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ Preferences.addAll([
|
|||
{ id: "messenger.options.getAttentionOnNewMessages", type: "bool" },
|
||||
{ id: "messenger.options.messagesStyle.theme", type: "string" },
|
||||
{ id: "messenger.options.messagesStyle.variant", type: "string" },
|
||||
{ id: "messenger.options.messagesStyle.showHeader", type: "bool" },
|
||||
]);
|
||||
|
||||
var gChatPane = {
|
||||
|
|
|
@ -98,12 +98,6 @@ var previewObserver = {
|
|||
|
||||
let themeName = document.getElementById("messagestyle-themename");
|
||||
previewObserver.browser = document.getElementById("previewbrowser");
|
||||
document
|
||||
.getElementById("showHeaderCheckbox")
|
||||
.addEventListener(
|
||||
"CheckboxStateChange",
|
||||
previewObserver.showHeaderChanged
|
||||
);
|
||||
|
||||
// If the preferences tab is opened straight to the message styles,
|
||||
// loading the preview fails. Pushing this to back of the event queue
|
||||
|
@ -114,15 +108,6 @@ var previewObserver = {
|
|||
});
|
||||
},
|
||||
|
||||
showHeaderChanged() {
|
||||
if (!previewObserver._loaded) {
|
||||
return;
|
||||
}
|
||||
|
||||
previewObserver.theme.showHeader = this.checked;
|
||||
previewObserver.reloadPreview();
|
||||
},
|
||||
|
||||
currentThemeChanged() {
|
||||
if (!this._loaded) {
|
||||
return;
|
||||
|
@ -214,10 +199,6 @@ var previewObserver = {
|
|||
menulist.disabled =
|
||||
variants.length == 0 || (variants.length == 1 && defaultVariant);
|
||||
|
||||
document.getElementById(
|
||||
"showHeaderCheckbox"
|
||||
).disabled = !this.theme.html.hasOwnProperty("header");
|
||||
|
||||
this.reloadPreview();
|
||||
document.getElementById("previewDeck").selectedIndex = 1;
|
||||
},
|
||||
|
|
|
@ -855,10 +855,6 @@ chat-variant-label =
|
|||
.value = Variant:
|
||||
.accesskey = V
|
||||
|
||||
chat-header-label =
|
||||
.label = Show Header
|
||||
.accesskey = H
|
||||
|
||||
# This is used to determine the width of the search field in about:preferences,
|
||||
# in order to make the entire placeholder string visible
|
||||
#
|
||||
|
|
Загрузка…
Ссылка в новой задаче