зеркало из https://github.com/mozilla/pjs.git
Part of bug 331557 - Remove the nsIAbDirectory::directoryProperties attribute. r/sr=bienvenu
This commit is contained in:
Родитель
4f045240b6
Коммит
0d6d5ec69f
|
@ -379,7 +379,7 @@ function AbRenameAddressBook()
|
|||
|
||||
var dialog = window.openDialog(
|
||||
"chrome://messenger/content/addressbook/abAddressBookNameDialog.xul",
|
||||
"", "chrome,modal=yes,resizable=no,centerscreen", {title: dialogTitle, canRename: canRename, name: selectedABDirectory.directoryProperties.description,
|
||||
"", "chrome,modal=yes,resizable=no,centerscreen", {title: dialogTitle, canRename: canRename, name: selectedABDirectory.dirName,
|
||||
okCallback:AbOnRenameAddressBook});
|
||||
}
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ var gComposePane = {
|
|||
var addrbook = enumerator.getNext();
|
||||
if (addrbook instanceof Components.interfaces.nsIAbDirectory && !addrbook.isRemote && !addrbook.isMailList)
|
||||
{
|
||||
var abURI = addrbook.directoryProperties.URI;
|
||||
var abURI = addrbook.URI;
|
||||
item = document.createElement("menuitem");
|
||||
item.setAttribute("label", addrbook.dirName);
|
||||
item.setAttribute("value", abURI);
|
||||
|
|
|
@ -69,7 +69,7 @@ interface nsIAbDirectoryProperties : nsISupports {
|
|||
attribute long position;
|
||||
};
|
||||
|
||||
[scriptable, uuid(215e6765-58d2-4809-9d9d-41991434143e)]
|
||||
[scriptable, uuid(95eb0c05-1c91-4daf-850e-066c495519c4)]
|
||||
interface nsIAbDirectory : nsISupports {
|
||||
|
||||
// Types of operation
|
||||
|
@ -97,7 +97,6 @@ interface nsIAbDirectory : nsISupports {
|
|||
// XXX This should really be replaced by a QI or something better
|
||||
readonly attribute long dirType;
|
||||
|
||||
// XXX These are readonly for now, until we get nsIAbDirectoryProperties
|
||||
// eliminated a bit more.
|
||||
|
||||
// The filename for address books within this directory.
|
||||
|
@ -109,8 +108,6 @@ interface nsIAbDirectory : nsISupports {
|
|||
// The position of the directory on the display.
|
||||
readonly attribute long position;
|
||||
|
||||
// XXX End "readonly XXX"
|
||||
|
||||
// will be used for LDAP replication
|
||||
attribute unsigned long lastModifiedDate;
|
||||
|
||||
|
@ -118,9 +115,6 @@ interface nsIAbDirectory : nsISupports {
|
|||
// list or not
|
||||
attribute PRBool isMailList;
|
||||
|
||||
// Get the directory properties
|
||||
readonly attribute nsIAbDirectoryProperties directoryProperties;
|
||||
|
||||
// Get the children directories
|
||||
readonly attribute nsISimpleEnumerator childNodes;
|
||||
|
||||
|
|
|
@ -365,7 +365,7 @@ function AbRenameAddressBook()
|
|||
|
||||
var dialog = window.openDialog(
|
||||
"chrome://messenger/content/addressbook/abAddressBookNameDialog.xul",
|
||||
"", "chrome,modal=yes,resizable=no,centerscreen", {title: dialogTitle, canRename: canRename, name: selectedABDirectory.directoryProperties.description,
|
||||
"", "chrome,modal=yes,resizable=no,centerscreen", {title: dialogTitle, canRename: canRename, name: selectedABDirectory.dirName,
|
||||
okCallback:AbOnRenameAddressBook});
|
||||
}
|
||||
|
||||
|
|
|
@ -356,65 +356,6 @@ NS_IMETHODIMP nsAbDirProperty::SetDirPrefId(const nsACString &aDirPrefId)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbDirProperty::GetDirectoryProperties(nsIAbDirectoryProperties **aDirectoryProperties)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aDirectoryProperties);
|
||||
|
||||
nsresult rv;
|
||||
|
||||
nsCOMPtr<nsIAbDirectoryProperties> properties = do_CreateInstance(NS_ABDIRECTORYPROPERTIES_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = properties->SetPrefName(m_DirPrefId.get());
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCAutoString prefStringValue;
|
||||
PRInt32 prefIntValue;
|
||||
if (m_DirPrefId.EqualsLiteral("ldap_2.servers.pab") ||
|
||||
m_DirPrefId.EqualsLiteral("ldap_2.servers.history"))
|
||||
{
|
||||
// get default address book name from addressbook.properties
|
||||
rv = GetLocalizedStringValue("description", EmptyCString(), prefStringValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
rv = GetStringValue("description", EmptyCString(), prefStringValue);
|
||||
}
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = properties->SetDescription(NS_ConvertUTF8toUTF16(prefStringValue));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = GetDirType(&prefIntValue);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = properties->SetDirType(prefIntValue);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = GetFileName(prefStringValue);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = properties->SetFileName(prefStringValue.get());
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// the string "s" is the default uri ( <scheme> + "://" + <filename> )
|
||||
rv = GetURI(prefStringValue);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = properties->SetURI(prefStringValue.get());
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = GetPosition(&prefIntValue);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = properties->SetPosition(prefIntValue);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
NS_ADDREF(*aDirectoryProperties = properties);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult nsAbDirProperty::InitDirectoryPrefs()
|
||||
{
|
||||
if (m_DirPrefId.IsEmpty())
|
||||
|
|
|
@ -659,16 +659,6 @@ NS_IMETHODIMP nsAbMDBDirectory::HasDirectory(nsIAbDirectory *dir, PRBool *hasDir
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbMDBDirectory::CreateNewDirectory(nsIAbDirectoryProperties *aProperties)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbMDBDirectory::CreateDirectoryByURI(const PRUnichar *dirName, const char *uri, PRBool migrating)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbMDBDirectory::AddMailList(nsIAbDirectory *list)
|
||||
{
|
||||
if (mIsQueryURI)
|
||||
|
|
|
@ -95,8 +95,6 @@ public:
|
|||
NS_IMETHOD DeleteCards(nsISupportsArray *cards);
|
||||
NS_IMETHOD HasCard(nsIAbCard *cards, PRBool *hasCard);
|
||||
NS_IMETHOD HasDirectory(nsIAbDirectory *dir, PRBool *hasDir);
|
||||
NS_IMETHOD CreateNewDirectory(nsIAbDirectoryProperties *aProperties);
|
||||
NS_IMETHOD CreateDirectoryByURI(const PRUnichar *dirName, const char *uri, PRBool migrating);
|
||||
NS_IMETHOD AddMailList(nsIAbDirectory *list);
|
||||
NS_IMETHOD AddCard(nsIAbCard *card, nsIAbCard **addedCard);
|
||||
NS_IMETHOD ModifyCard(nsIAbCard *aModifiedCard);
|
||||
|
|
Загрузка…
Ссылка в новой задаче