Bug #291011 --> the product version is no longer showing up in the About Dialog and in the send mail header

effects thunderbird only.
This commit is contained in:
scott%scott-macgregor.org 2005-04-19 19:09:03 +00:00
parent e02611dda6
commit 5af5e86a47
4 changed files with 33 additions and 32 deletions

View File

@ -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

View File

@ -63,8 +63,7 @@
<![CDATA[
function onLoad() {
var versionField = document.getElementById("versionField");
versionField.value = document.documentElement.getAttribute("versionlabel") + ' '
+ navigator.vendorSub + ' (' + navigator.productSub + ')';
versionField.value = versionField.value + ' (' + navigator.productSub + ')';
var button = document.documentElement.getButton("extra2");
button.setAttribute("label", document.documentElement.getAttribute("creditslabel"));
@ -107,7 +106,8 @@
<deck id="modes" flex="1">
<vbox flex="1" id="clientBox">
<vbox id="versionWrapper">
<textbox id="versionField" readonly="true" class="plain" tabindex="2"/>
<textbox id="versionField" readonly="true" class="plain" tabindex="2"
#expand value="&aboutVersion; __MOZ_APP_VERSION__"/>
</vbox>
<separator class="thin"/>
<description id="copyright">&copyrightText;</description>

View File

@ -88,6 +88,8 @@ REQUIRES = xpcom \
REQUIRES += gfx
#endif
DEFINES += -DMOZ_APP_VERSION="$(MOZ_APP_VERSION)"
CPPSRCS = \
nsMsgCompFields.cpp \
nsSmtpUrl.cpp \

View File

@ -479,43 +479,40 @@ RRT_HEADER:
// allow a user to override the default UA
if (!userAgentOverride)
{
nsCOMPtr<nsIStringBundleService> stringService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv))
{
nsCOMPtr<nsIStringBundle> brandSringBundle;
rv = stringService->CreateBundle("chrome://branding/locale/brand.properties", getter_AddRefs(brandSringBundle));
nsCOMPtr<nsIStringBundleService> 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<nsIStringBundle> 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())