From 3ce24ae705fcbfeaa8f94b95703a84640c22bb96 Mon Sep 17 00:00:00 2001 From: "scott%scott-macgregor.org" Date: Tue, 19 Apr 2005 19:09:03 +0000 Subject: [PATCH] Bug #291011 --> the product version is no longer showing up in the About Dialog and in the send mail header effects thunderbird only. git-svn-id: svn://10.0.0.236/trunk@172446 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mail/base/Makefile.in | 2 + mozilla/mail/base/content/aboutDialog.xul | 6 +- mozilla/mailnews/compose/src/Makefile.in | 2 + .../mailnews/compose/src/nsMsgCompUtils.cpp | 55 +++++++++---------- 4 files changed, 33 insertions(+), 32 deletions(-) diff --git a/mozilla/mail/base/Makefile.in b/mozilla/mail/base/Makefile.in index e7d83d32d15..f1eff1bf455 100644 --- a/mozilla/mail/base/Makefile.in +++ b/mozilla/mail/base/Makefile.in @@ -42,6 +42,8 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk +DEFINES += -DMOZ_APP_VERSION=$(MOZ_APP_VERSION) + ifdef MOZ_USE_OFFICIAL_BRANDING DEFINES += -DMOZ_USE_OFFICIAL_BRANDING endif diff --git a/mozilla/mail/base/content/aboutDialog.xul b/mozilla/mail/base/content/aboutDialog.xul index 45f9fd2031e..2a17998c651 100644 --- a/mozilla/mail/base/content/aboutDialog.xul +++ b/mozilla/mail/base/content/aboutDialog.xul @@ -63,8 +63,7 @@ - + ©rightText; diff --git a/mozilla/mailnews/compose/src/Makefile.in b/mozilla/mailnews/compose/src/Makefile.in index db937a8a7ac..2f75c3a388a 100644 --- a/mozilla/mailnews/compose/src/Makefile.in +++ b/mozilla/mailnews/compose/src/Makefile.in @@ -88,6 +88,8 @@ REQUIRES = xpcom \ REQUIRES += gfx #endif +DEFINES += -DMOZ_APP_VERSION="$(MOZ_APP_VERSION)" + CPPSRCS = \ nsMsgCompFields.cpp \ nsSmtpUrl.cpp \ diff --git a/mozilla/mailnews/compose/src/nsMsgCompUtils.cpp b/mozilla/mailnews/compose/src/nsMsgCompUtils.cpp index 4b919af99d0..ac426ac3752 100644 --- a/mozilla/mailnews/compose/src/nsMsgCompUtils.cpp +++ b/mozilla/mailnews/compose/src/nsMsgCompUtils.cpp @@ -479,43 +479,40 @@ RRT_HEADER: // allow a user to override the default UA if (!userAgentOverride) { - nsCOMPtr stringService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv); - if (NS_SUCCEEDED(rv)) - { - nsCOMPtr brandSringBundle; - rv = stringService->CreateBundle("chrome://branding/locale/brand.properties", getter_AddRefs(brandSringBundle)); + nsCOMPtr stringService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv); if (NS_SUCCEEDED(rv)) - { - nsXPIDLString brandName; - rv = brandSringBundle->GetStringFromName(NS_LITERAL_STRING("brandShortName").get(), getter_Copies(brandName)); + { + nsCOMPtr brandSringBundle; + rv = stringService->CreateBundle("chrome://branding/locale/brand.properties", getter_AddRefs(brandSringBundle)); + if (NS_SUCCEEDED(rv)) + { + nsXPIDLString brandName; + rv = brandSringBundle->GetStringFromName(NS_LITERAL_STRING("brandShortName").get(), getter_Copies(brandName)); - nsCAutoString vendorSub; - pHTTPHandler->GetVendorSub(vendorSub); + nsCAutoString productSub; + pHTTPHandler->GetProductSub(productSub); - nsCAutoString productSub; - pHTTPHandler->GetProductSub(productSub); + nsCAutoString platform; + pHTTPHandler->GetPlatform(platform); - nsCAutoString platform; - pHTTPHandler->GetPlatform(platform); - - // XXX: This may leave characters with the 8th bit set in the string, which - // aren't allowed in header values. this should use some kind of encoding - // for them - LossyCopyUTF16toASCII(brandName, userAgentString); - userAgentString += ' '; - userAgentString += vendorSub; - userAgentString += " ("; - userAgentString += platform; - userAgentString += "/"; - userAgentString += productSub; - userAgentString += ")"; - } - } + // XXX: This may leave characters with the 8th bit set in the string, which + // aren't allowed in header values. this should use some kind of encoding + // for them + LossyCopyUTF16toASCII(brandName, userAgentString); + userAgentString += ' '; + userAgentString += NS_STRINGIFY(MOZ_APP_VERSION); + userAgentString += " ("; + userAgentString += platform; + userAgentString += "/"; + userAgentString += productSub; + userAgentString += ")"; + } + } } else userAgentString = userAgentOverride; #else - pHTTPHandler->GetUserAgent(userAgentString); + pHTTPHandler->GetUserAgent(userAgentString); #endif if (!userAgentString.IsEmpty())