From 9fbcced17ca4b2d4336f04e6f4c8f1d5dd569fe5 Mon Sep 17 00:00:00 2001 From: "tom@pep-project.org" Date: Thu, 22 Apr 2021 12:58:15 +0300 Subject: [PATCH] Bug 1706170 - Remove use of pref mailnews.display.original_date. r=mkmelin --- mailnews/mailnews.js | 2 +- mailnews/mime/emitters/nsMimeBaseEmitter.cpp | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/mailnews/mailnews.js b/mailnews/mailnews.js index 06b3f7d900..93be2dc751 100644 --- a/mailnews/mailnews.js +++ b/mailnews/mailnews.js @@ -701,7 +701,7 @@ pref("mail.display_glyph", true); pref("mail.display_struct", true); // HTML->HTML *bold* etc. during Send; ditto pref("mail.send_struct", false); -// display time and date in message pane using senders timezone +// display time and date using senders timezone in message pane and when printing pref("mailnews.display.date_senders_timezone", false); // For the next 4 prefs, see // Ignore HTML parts in multipart/alternative diff --git a/mailnews/mime/emitters/nsMimeBaseEmitter.cpp b/mailnews/mime/emitters/nsMimeBaseEmitter.cpp index fd53cf2cdf..015259725c 100644 --- a/mailnews/mime/emitters/nsMimeBaseEmitter.cpp +++ b/mailnews/mime/emitters/nsMimeBaseEmitter.cpp @@ -587,11 +587,8 @@ nsresult nsMimeBaseEmitter::GenerateDateString(const char* dateString, /** * See if the user wants to have the date displayed in the senders * timezone (including the timezone offset). - * We also evaluate the pref original_date which was introduced - * as makeshift in bug 118899. */ bool displaySenderTimezone = false; - bool displayOriginalDate = false; nsCOMPtr prefs = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv); @@ -602,10 +599,6 @@ nsresult nsMimeBaseEmitter::GenerateDateString(const char* dateString, NS_ENSURE_SUCCESS(rv, rv); dateFormatPrefs->GetBoolPref("date_senders_timezone", &displaySenderTimezone); - dateFormatPrefs->GetBoolPref("original_date", &displayOriginalDate); - // migrate old pref to date_senders_timezone - if (displayOriginalDate && !displaySenderTimezone) - dateFormatPrefs->SetBoolPref("date_senders_timezone", true); PRExplodedTime explodedMsgTime; @@ -678,7 +671,7 @@ char* nsMimeBaseEmitter::GetLocalizedDateString(const char* dateString) { nsCOMPtr prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID)); if (prefBranch) - prefBranch->GetBoolPref("mailnews.display.original_date", + prefBranch->GetBoolPref("mailnews.display.date_senders_timezone", &displayOriginalDate); if (!displayOriginalDate) {