Bug 889031 - Remove some obsolete code from comm-central. r=mkmelin, r=Neil, a=Standard8

This commit is contained in:
aceman 2013-07-11 21:42:27 -04:00
Родитель 07b7e3acdb
Коммит 20c800e9e7
9 изменённых файлов: 8 добавлений и 83 удалений

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

@ -3746,29 +3746,6 @@ function AddAttachments(aAttachments, aCallback)
return items;
}
/**
* Add a file object as attachment. This is mostly just a helper function to
* wrap a file into an nsIMsgAttachment object with it's URL set. Note: this
* function is DEPRECATED. Use AddAttachments and FileToAttachment instead.
*
* @param file the nsIFile object to add as attachment
*/
function AddFileAttachment(file)
{
AddAttachments([FileToAttachment(file)]);
}
/**
* Add an attachment object as attachment. The attachment URL must be set. Note:
* this function is DEPRECATED. Use AddAttachments instead.
*
* @param attachment the nsIMsgAttachment object to add as attachment
*/
function AddUrlAttachment(attachment)
{
AddAttachments([attachment]);
}
function MessageGetNumSelectedAttachments()
{
var bucketList = document.getElementById("attachmentBucket");

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

@ -3115,7 +3115,7 @@ nsresult nsMsgDBView::DeleteMessages(nsIMsgWindow *window, nsMsgViewIndex *indic
rv = wwatch->GetNewPrompter(0, getter_AddRefs(dialog));
NS_ENSURE_SUCCESS(rv, rv);
bool dontAsk = false; // "Don't ask..." - unchecked by default.
PRInt32 buttonPressed = 0;
int32_t buttonPressed = 0;
nsString dialogTitle;
nsString confirmString;
@ -3130,7 +3130,7 @@ nsresult nsMsgDBView::DeleteMessages(nsIMsgWindow *window, nsMsgViewIndex *indic
else // if (activePref == warnShiftDelPref || activePref == warnNewsPref)
confirmString.Adopt(GetString(NS_LITERAL_STRING("confirmMsgDelete.deleteNoTrash.desc").get()));
const PRUint32 buttonFlags =
const uint32_t buttonFlags =
(nsIPrompt::BUTTON_TITLE_IS_STRING * nsIPrompt::BUTTON_POS_0) +
(nsIPrompt::BUTTON_TITLE_CANCEL * nsIPrompt::BUTTON_POS_1);
rv = dialog->ConfirmEx(dialogTitle.get(), confirmString.get(), buttonFlags,

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

@ -2,15 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let EXPORTED_SYMBOLS = ["StringBundle"];
const EXPORTED_SYMBOLS = ["StringBundle"];
Components.utils.import("resource://gre/modules/Services.jsm");
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cr = Components.results;
const Cu = Components.utils;
/**
* A string bundle.
*
@ -116,7 +111,8 @@ StringBundle.prototype = {
// We could simply return the nsIPropertyElement objects, but I think
// it's better to return standard JS objects that behave as consumers
// expect JS objects to behave (f.e. you can modify them dynamically).
let string = enumerator.getNext().QueryInterface(Ci.nsIPropertyElement);
let string = enumerator.getNext()
.QueryInterface(Components.interfaces.nsIPropertyElement);
strings.push({ key: string.key, value: string.value });
}
@ -189,16 +185,5 @@ StringBundle.prototype = {
*/
getFormattedString: function(key, args) {
return this.get(key, args);
},
/**
* Get an enumeration of the strings in the bundle.
* @deprecated use |getAll| instead
*
* @returns {nsISimpleEnumerator}
* a enumeration of the strings in the bundle
*/
get strings() {
return this.stringBundle.getSimpleEnumeration();
}
}

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

@ -7,7 +7,7 @@
#include "nsIMsgAttachment.idl"
#include "nsISimpleEnumerator.idl"
[scriptable, uuid(bb793677-87c1-4125-b929-252bd9177794)]
[scriptable, uuid(bfd07df7-6707-47c8-860d-fd4b30934034)]
interface nsIMsgCompFields : nsISupports {
attribute AString from;
@ -54,13 +54,6 @@ interface nsIMsgCompFields : nsISupports {
*/
attribute AString body;
/**
* temporaryFiles
*
* @OBSOLETE, DO NOT USE ANYMORE
*/
attribute string temporaryFiles;
readonly attribute nsISimpleEnumerator attachments;
void addAttachment(in nsIMsgAttachment attachment);
void removeAttachment(in nsIMsgAttachment attachment);

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

@ -212,18 +212,6 @@ NS_IMETHODIMP nsMsgCompFields::GetSubject(nsAString &_retval)
return GetUnicodeHeader(MSG_SUBJECT_HEADER_ID, _retval);
}
NS_IMETHODIMP nsMsgCompFields::SetTemporaryFiles(const char *value)
{
NS_ERROR("nsMsgCompFields::SetTemporaryFiles is not supported anymore, please use nsMsgCompFields::AddAttachment");
return SetAsciiHeader(MSG_TEMPORARY_FILES_HEADER_ID, value);
}
NS_IMETHODIMP nsMsgCompFields::GetTemporaryFiles(char **_retval)
{
*_retval = strdup(GetAsciiHeader(MSG_TEMPORARY_FILES_HEADER_ID));
return *_retval ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
NS_IMETHODIMP nsMsgCompFields::SetOrganization(const nsAString &value)
{
return SetUnicodeHeader(MSG_ORGANIZATION_HEADER_ID, value);

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

@ -60,7 +60,6 @@ public:
MSG_NEWSGROUPS_HEADER_ID,
MSG_FOLLOWUP_TO_HEADER_ID,
MSG_SUBJECT_HEADER_ID,
MSG_ATTACHMENTS_HEADER_ID,
MSG_ORGANIZATION_HEADER_ID,
MSG_REFERENCES_HEADER_ID,
MSG_OTHERRANDOMHEADERS_HEADER_ID,
@ -70,7 +69,6 @@ public:
MSG_MESSAGE_ID_HEADER_ID,
MSG_X_TEMPLATE_HEADER_ID,
MSG_DRAFT_ID_HEADER_ID,
MSG_TEMPORARY_FILES_HEADER_ID,
MSG_MAX_HEADERS //Must be the last one.
} MsgHeaderID;
@ -117,16 +115,6 @@ public:
nsresult SetSubject(const char *value) {return SetAsciiHeader(MSG_SUBJECT_HEADER_ID, value);}
const char* GetSubject() {return GetAsciiHeader(MSG_SUBJECT_HEADER_ID);}
const char* GetAttachments() {
NS_ERROR("nsMsgCompFields::GetAttachments is not supported anymore, please use nsMsgCompFields::GetAttachmentsArray");
return GetAsciiHeader(MSG_ATTACHMENTS_HEADER_ID);
}
const char* GetTemporaryFiles() {
NS_ERROR("nsMsgCompFields::GetTemporaryFiles is not supported anymore, please use nsMsgCompFields::GetAttachmentsArray");
return GetAsciiHeader(MSG_TEMPORARY_FILES_HEADER_ID);
}
nsresult SetOrganization(const char *value) {return SetAsciiHeader(MSG_ORGANIZATION_HEADER_ID, value);}
const char* GetOrganization() {return GetAsciiHeader(MSG_ORGANIZATION_HEADER_ID);}

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

@ -2661,7 +2661,6 @@ nsresult nsMsgComposeAndSend::SetMimeHeader(nsMsgCompFields::MsgHeaderID header,
case nsMsgCompFields::MSG_SUBJECT_HEADER_ID :
case nsMsgCompFields::MSG_REFERENCES_HEADER_ID :
case nsMsgCompFields::MSG_X_TEMPLATE_HEADER_ID :
case nsMsgCompFields::MSG_ATTACHMENTS_HEADER_ID :
dupHeader = mime_fix_header(value);
break;

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

@ -264,11 +264,6 @@ nsresult nsDBFolderInfo::AddToNewMDB()
mdb_err err = store->NewTable(m_mdb->GetEnv(), m_rowScopeToken,
m_tableKindToken, true, nullptr, &m_mdbTable);
// make sure the oid of the table is 1.
struct mdbOid folderInfoTableOID;
folderInfoTableOID.mOid_Id = 1;
folderInfoTableOID.mOid_Scope = m_rowScopeToken;
// create the singleton row for the dbFolderInfo.
err = store->NewRowWithOid(m_mdb->GetEnv(),
&gDBFolderInfoOID, &m_mdbRow);

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

@ -172,10 +172,10 @@ static int do_main(const char *exePath, int argc, char* argv[])
#ifdef XP_WIN
// exePath comes from mozilla::BinaryPath::Get, which returns a UTF-8
// encoded path, so it is safe to convert it
rv = NS_NewLocalFile(NS_ConvertUTF8toUTF16(exePath), PR_FALSE,
rv = NS_NewLocalFile(NS_ConvertUTF8toUTF16(exePath), false,
getter_AddRefs(appini));
#else
rv = NS_NewNativeLocalFile(nsDependentCString(exePath), PR_FALSE,
rv = NS_NewNativeLocalFile(nsDependentCString(exePath), false,
getter_AddRefs(appini));
#endif
if (NS_FAILED(rv)) {