mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 05:15:45 +00:00
bug 243618 : relanding the up-to-date(tested) patch (sorry for the bustage) r=bienvenu, sr=neil
This commit is contained in:
parent
f44dc0930c
commit
79869c9ef7
@ -106,11 +106,11 @@ const PRUnichar * nsMapiRegistryUtils::brandName()
|
||||
return m_brand.get();
|
||||
}
|
||||
|
||||
const PRUnichar * nsMapiRegistryUtils::vendorName()
|
||||
const nsString& nsMapiRegistryUtils::vendorName()
|
||||
{
|
||||
if (m_vendor.IsEmpty())
|
||||
getVarValue(NS_LITERAL_STRING("vendorShortName").get(), m_vendor);
|
||||
return m_vendor.get();
|
||||
return m_vendor;
|
||||
}
|
||||
|
||||
|
||||
@ -454,7 +454,7 @@ nsresult nsMapiRegistryUtils::setMailtoProtocolHandler()
|
||||
// make sure mailto urls go through our application if we are the default
|
||||
// mail application...
|
||||
nsCAutoString appName;
|
||||
NS_CopyUnicodeToNative(nsDependentString(vendorName()), appName);
|
||||
NS_CopyUnicodeToNative(vendorName(), appName);
|
||||
|
||||
nsCAutoString mailAppPath(thisApplication());
|
||||
mailAppPath += " -compose %1";
|
||||
@ -472,7 +472,7 @@ nsresult nsMapiRegistryUtils::setNewsProtocolHandler()
|
||||
// make sure news and snews urls go through our application if we are the default
|
||||
// mail application...
|
||||
nsCAutoString appName;
|
||||
NS_CopyUnicodeToNative(nsDependentString(vendorName()), appName);
|
||||
NS_CopyUnicodeToNative(vendorName(), appName);
|
||||
|
||||
nsCAutoString mailAppPath(thisApplication());
|
||||
mailAppPath += " -mail %1";
|
||||
@ -506,7 +506,7 @@ nsresult nsMapiRegistryUtils::setDefaultMailClient()
|
||||
nsCAutoString keyName("Software\\Clients\\Mail\\");
|
||||
|
||||
nsCAutoString appName;
|
||||
NS_CopyUnicodeToNative(nsDependentString(vendorName()), appName);
|
||||
NS_CopyUnicodeToNative(vendorName(), appName);
|
||||
if (!appName.IsEmpty()) {
|
||||
keyName.Append(appName.get());
|
||||
|
||||
@ -517,7 +517,7 @@ nsresult nsMapiRegistryUtils::setDefaultMailClient()
|
||||
nsXPIDLString defaultMailTitle;
|
||||
// Use vendorName instead of brandname since brandName is product name
|
||||
// and has more than just the name of the application
|
||||
const PRUnichar *keyValuePrefixStr[] = { vendorName() };
|
||||
const PRUnichar *keyValuePrefixStr[] = { vendorName().get() };
|
||||
NS_NAMED_LITERAL_STRING(defaultMailTitleTag, "defaultMailDisplayTitle");
|
||||
rv = bundle->FormatStringFromName(defaultMailTitleTag.get(),
|
||||
keyValuePrefixStr, 1,
|
||||
@ -638,7 +638,7 @@ nsresult nsMapiRegistryUtils::unsetDefaultMailClient() {
|
||||
// Use vendorName instead of brandname since brandName is product name
|
||||
// and has more than just the name of the application
|
||||
nsCAutoString appName;
|
||||
NS_CopyUnicodeToNative(nsDependentString(vendorName()), appName);
|
||||
NS_CopyUnicodeToNative(vendorName(), appName);
|
||||
|
||||
if (!name.IsEmpty() && !appName.IsEmpty() && name.Equals(appName)) {
|
||||
nsCAutoString keyName("HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\");
|
||||
|
@ -70,7 +70,7 @@ public :
|
||||
// This returns the brand name for this application
|
||||
const PRUnichar * brandName() ;
|
||||
// This returns the vendor name of this application
|
||||
const PRUnichar * vendorName();
|
||||
const nsString& vendorName();
|
||||
// verifyRestrictedAccess - Returns PR_TRUE if this user only has restricted access
|
||||
// to the registry keys we need to modify.
|
||||
PRBool verifyRestrictedAccess() ;
|
||||
|
Loading…
Reference in New Issue
Block a user