summaryrefslogtreecommitdiffstats
path: root/comm/mailnews/addrbook/src/nsAbDirProperty.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'comm/mailnews/addrbook/src/nsAbDirProperty.cpp')
-rw-r--r--comm/mailnews/addrbook/src/nsAbDirProperty.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/comm/mailnews/addrbook/src/nsAbDirProperty.cpp b/comm/mailnews/addrbook/src/nsAbDirProperty.cpp
index dddb9d9..b653912 100644
--- a/comm/mailnews/addrbook/src/nsAbDirProperty.cpp
+++ b/comm/mailnews/addrbook/src/nsAbDirProperty.cpp
@@ -472,7 +472,16 @@ NS_IMETHODIMP nsAbDirProperty::UseForAutocomplete(const nsACString &aIdentityKey
&rv));
NS_ENSURE_SUCCESS(rv, rv);
- return prefBranch->GetBoolPref("mail.enable_autocomplete", aResult);
+ rv = prefBranch->GetBoolPref("mail.enable_autocomplete", aResult);
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ // If autocomplete is generally enabled, check if it has been disabled explicitly for this directory.
+ if (*aResult)
+ {
+ (void) GetBoolValue("enable_autocomplete", true, aResult);
+ }
+
+ return rv;
}
NS_IMETHODIMP nsAbDirProperty::GetDirPrefId(nsACString &aDirPrefId)