Bug 1706170 - Remove use of pref mailnews.display.original_date. r=mkmelin

This commit is contained in:
tom@pep-project.org 2021-04-22 12:58:15 +03:00
Родитель 5c2abe79ee
Коммит 9fbcced17c
2 изменённых файлов: 2 добавлений и 9 удалений

Просмотреть файл

@ -701,7 +701,7 @@ pref("mail.display_glyph", true);
pref("mail.display_struct", true); pref("mail.display_struct", true);
// HTML->HTML *bold* etc. during Send; ditto // HTML->HTML *bold* etc. during Send; ditto
pref("mail.send_struct", false); 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); pref("mailnews.display.date_senders_timezone", false);
// For the next 4 prefs, see <http://www.bucksch.org/1/projects/mozilla/108153> // For the next 4 prefs, see <http://www.bucksch.org/1/projects/mozilla/108153>
// Ignore HTML parts in multipart/alternative // Ignore HTML parts in multipart/alternative

Просмотреть файл

@ -587,11 +587,8 @@ nsresult nsMimeBaseEmitter::GenerateDateString(const char* dateString,
/** /**
* See if the user wants to have the date displayed in the senders * See if the user wants to have the date displayed in the senders
* timezone (including the timezone offset). * timezone (including the timezone offset).
* We also evaluate the pref original_date which was introduced
* as makeshift in bug 118899.
*/ */
bool displaySenderTimezone = false; bool displaySenderTimezone = false;
bool displayOriginalDate = false;
nsCOMPtr<nsIPrefService> prefs = nsCOMPtr<nsIPrefService> prefs =
do_GetService(NS_PREFSERVICE_CONTRACTID, &rv); do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
@ -602,10 +599,6 @@ nsresult nsMimeBaseEmitter::GenerateDateString(const char* dateString,
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
dateFormatPrefs->GetBoolPref("date_senders_timezone", &displaySenderTimezone); 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; PRExplodedTime explodedMsgTime;
@ -678,7 +671,7 @@ char* nsMimeBaseEmitter::GetLocalizedDateString(const char* dateString) {
nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID)); nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
if (prefBranch) if (prefBranch)
prefBranch->GetBoolPref("mailnews.display.original_date", prefBranch->GetBoolPref("mailnews.display.date_senders_timezone",
&displayOriginalDate); &displayOriginalDate);
if (!displayOriginalDate) { if (!displayOriginalDate) {