Bug 31685 Push secure icon to folder pane r+sr=bienvenu

This commit is contained in:
neil%parkwaycc.co.uk 2005-09-17 17:12:26 +00:00
Родитель ab485465b8
Коммит 6be8a29bfa
3 изменённых файлов: 25 добавлений и 1 удалений

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

@ -136,6 +136,7 @@ nsIAtom * nsMsgFolderDataSource::kNameAtom = nsnull;
nsIAtom * nsMsgFolderDataSource::kSynchronizeAtom = nsnull;
nsIAtom * nsMsgFolderDataSource::kOpenAtom = nsnull;
nsIAtom * nsMsgFolderDataSource::kIsDeferredAtom = nsnull;
nsIAtom * nsMsgFolderDataSource::kIsSecureAtom = nsnull;
nsIAtom * nsMsgFolderDataSource::kCanFileMessagesAtom = nsnull;
nsIAtom * nsMsgFolderDataSource::kInVFEditSearchScopeAtom = nsnull;
@ -217,6 +218,7 @@ nsMsgFolderDataSource::nsMsgFolderDataSource()
kSynchronizeAtom = NS_NewAtom("Synchronize");
kOpenAtom = NS_NewAtom("open");
kIsDeferredAtom = NS_NewAtom("isDeferred");
kIsSecureAtom = NS_NewAtom("isSecure");
kCanFileMessagesAtom = NS_NewAtom("canFileMessages");
kInVFEditSearchScopeAtom = NS_NewAtom("inVFEditSearchScope");
@ -306,6 +308,7 @@ nsMsgFolderDataSource::~nsMsgFolderDataSource (void)
NS_RELEASE(kSynchronizeAtom);
NS_RELEASE(kOpenAtom);
NS_RELEASE(kIsDeferredAtom);
NS_RELEASE(kIsSecureAtom);
NS_RELEASE(kCanFileMessagesAtom);
NS_RELEASE(kInVFEditSearchScopeAtom);
@ -986,6 +989,8 @@ nsMsgFolderDataSource::OnItemBoolPropertyChanged(nsIRDFResource *resource,
NotifyPropertyChanged(resource, kNC_Open, literalNode);
else if (kIsDeferredAtom == property)
NotifyPropertyChanged(resource, kNC_IsDeferred, literalNode, oldLiteralNode);
else if (kIsSecureAtom == property)
NotifyPropertyChanged(resource, kNC_IsSecure, literalNode, oldLiteralNode);
else if (kCanFileMessagesAtom == property)
NotifyPropertyChanged(resource, kNC_CanFileMessages, literalNode, oldLiteralNode);
else if (kInVFEditSearchScopeAtom == property)

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

@ -284,6 +284,7 @@ protected:
static nsIAtom* kSynchronizeAtom;
static nsIAtom* kOpenAtom;
static nsIAtom* kIsDeferredAtom;
static nsIAtom* kIsSecureAtom;
static nsrefcnt gFolderResourceRefCnt;
static nsIAtom* kCanFileMessagesAtom;
static nsIAtom* kInVFEditSearchScopeAtom;

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

@ -1717,10 +1717,28 @@ nsMsgIncomingServer::GetSearchScope(nsMsgSearchScopeValue *searchScope)
return NS_OK;
}
NS_IMETHODIMP
nsMsgIncomingServer::GetIsSecure(PRBool* aIsSecure)
{
return GetBoolValue("isSecure", aIsSecure);
}
NS_IMETHODIMP
nsMsgIncomingServer::SetIsSecure(PRBool aIsSecure)
{
PRBool isSecure;
GetBoolValue("isSecure", &isSecure);
if (isSecure != aIsSecure) {
SetBoolValue("isSecure", aIsSecure);
if (m_rootFolder)
m_rootFolder->NotifyBoolPropertyChanged(NS_NewAtom("isSecure"), isSecure, aIsSecure);
}
return NS_OK;
}
// use the convenience macros to implement the accessors
NS_IMPL_SERVERPREF_STR(nsMsgIncomingServer, Username, "userName")
NS_IMPL_SERVERPREF_STR(nsMsgIncomingServer, PrefPassword, "password")
NS_IMPL_SERVERPREF_BOOL(nsMsgIncomingServer, IsSecure, "isSecure")
NS_IMPL_SERVERPREF_BOOL(nsMsgIncomingServer, UseSecAuth, "useSecAuth")
NS_IMPL_SERVERPREF_BOOL(nsMsgIncomingServer, LogonFallback, "logon_fallback")
NS_IMPL_SERVERPREF_INT(nsMsgIncomingServer, BiffMinutes, "check_time")