mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
Removed dead GetRoot code.
This commit is contained in:
parent
e632efc190
commit
747c99adae
@ -1293,34 +1293,3 @@ NS_IMETHODIMP nsMsgFolder::GetHostName(char **hostName)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#if 0
|
||||
#include "nsMsgLocalMailFolder.h"
|
||||
|
||||
const char* kMsgRootFolderName = "Mail and News"; // XXX i18n
|
||||
|
||||
nsresult
|
||||
nsMsgFolder::GetRoot(nsIMsgFolder* *result)
|
||||
{
|
||||
nsresult rv;
|
||||
nsMsgFolder* root = new nsMsgFolder("mailbox://");
|
||||
if (root == nsnull)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(root);
|
||||
root->SetName(kMsgRootFolderName);
|
||||
|
||||
nsIMsgFolder* localMail;
|
||||
rv = nsMsgLocalMailFolder::GetRoot(&localMail);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_RELEASE(root);
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
root->AppendElement(localMail);
|
||||
|
||||
// Add news root, etc.
|
||||
|
||||
*result = root;
|
||||
return rv;
|
||||
}
|
||||
#endif
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -892,52 +892,6 @@ NS_IMETHODIMP nsMsgLocalMailFolder::GetPath(nsNativeFileSpec& aPathName)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if 0
|
||||
|
||||
static nsMsgFolder* gRoot = nsnull;
|
||||
|
||||
nsresult
|
||||
nsMsgLocalMailFolder::GetRoot(nsIMsgFolder* *result)
|
||||
{
|
||||
if (gRoot) {
|
||||
*result = gRoot;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
#if 0
|
||||
nsIPref* prefs;
|
||||
rv = nsServiceManager::GetService(kPrefCID, kIPrefIID,
|
||||
(nsISupports**)&prefs);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
#define ROOT_PATH_LENGTH 128
|
||||
char rootPath[ROOT_PATH_LENGTH];
|
||||
int rootLen = ROOT_PATH_LENGTH;
|
||||
rv = prefs->GetCharPref(kMsgRootFolderPref, rootPath, &rootLen);
|
||||
nsServiceManager::ReleaseService(kPrefCID, prefs);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
nsNativeFileSpec startPath(rootPath, PR_FALSE);
|
||||
#else
|
||||
nsNativeFileSpec startPath("h:\\user\\warren\\Mail", PR_FALSE);
|
||||
#endif
|
||||
|
||||
nsMsgLocalMailFolder* root =
|
||||
new nsMsgLocalMailFolder(nsnull, &startPath); // XXX fix uri
|
||||
if (root == nsnull)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(root);
|
||||
root->SetDepth(0);
|
||||
*result = root;
|
||||
gRoot = root;
|
||||
return rv;
|
||||
}
|
||||
|
||||
#endif
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* This class creates resources for message folder URIs. It should be
|
||||
* registered for the "mailnewsfolder:" prefix.
|
||||
|
Loading…
Reference in New Issue
Block a user