зеркало из https://github.com/mozilla/gecko-dev.git
Add OpenComposeWindowWithValues()
This commit is contained in:
Родитель
902d067869
Коммит
aeb299284c
|
@ -32,10 +32,15 @@ interface nsIMsgComposeService : nsISupports {
|
|||
void OpenComposeWindow(in wstring msgComposeWindowURL, in wstring originalMsgURI, in MSG_ComposeType type, in MSG_ComposeFormat format,
|
||||
in nsISupports object); /*object is temporary*/
|
||||
|
||||
/* ... */
|
||||
void OpenComposeWindowWithValues(in wstring msgComposeWindowURL, in MSG_ComposeFormat format,
|
||||
in wstring to, in wstring cc, in wstring bcc, in wstring newsgroups,
|
||||
in wstring subject, in wstring body);
|
||||
|
||||
/* ... */
|
||||
nsIMsgCompose InitCompose(in nsIDOMWindow aWindow, in wstring originalMsgURI, in long type, in long format);
|
||||
|
||||
/* ... */
|
||||
void DisposeCompose(in nsIMsgCompose compose, in boolean closeWindow);
|
||||
void DisposeCompose(in nsIMsgCompose compose, in boolean closeWindow);
|
||||
};
|
||||
|
||||
|
|
|
@ -107,6 +107,39 @@ nsresult nsMsgComposeService::OpenComposeWindow(const PRUnichar *msgComposeWindo
|
|||
return rv;
|
||||
}
|
||||
|
||||
nsresult nsMsgComposeService::OpenComposeWindowWithValues(const PRUnichar *msgComposeWindowURL,
|
||||
MSG_ComposeFormat format,
|
||||
const PRUnichar *to,
|
||||
const PRUnichar *cc,
|
||||
const PRUnichar *bcc,
|
||||
const PRUnichar *newsgroups,
|
||||
const PRUnichar *subject,
|
||||
const PRUnichar *body)
|
||||
{
|
||||
nsAutoString args = "";
|
||||
nsresult rv;
|
||||
|
||||
NS_WITH_SERVICE(nsIDOMToolkitCore, toolkitCore, kToolkitCoreCID, &rv);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
args.Append("format=");
|
||||
args.Append(format);
|
||||
|
||||
if (to) {args.Append(",to="); args.Append(to);}
|
||||
if (cc) {args.Append(",cc="); args.Append(cc);}
|
||||
if (bcc) {args.Append(",bcc="); args.Append(bcc);}
|
||||
if (newsgroups) {args.Append(",newsgroups="); args.Append(newsgroups);}
|
||||
if (subject) {args.Append(",subject="); args.Append(subject);}
|
||||
if (body) {args.Append(",body="); args.Append(body);}
|
||||
|
||||
if (msgComposeWindowURL && *msgComposeWindowURL)
|
||||
toolkitCore->ShowWindowWithArgs(msgComposeWindowURL, nsnull, args);
|
||||
else
|
||||
toolkitCore->ShowWindowWithArgs("chrome://messengercompose/content/", nsnull, args);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult nsMsgComposeService::InitCompose(nsIDOMWindow *aWindow, const PRUnichar *originalMsgURI, PRInt32 type, PRInt32 format, nsIMsgCompose **_retval)
|
||||
{
|
||||
|
|
|
@ -32,6 +32,10 @@ public:
|
|||
/* void OpenComposeWindow (in wstring msgComposeWindowURL, in wstring originalMsgURI, in long type, in long format); */
|
||||
NS_IMETHOD OpenComposeWindow(const PRUnichar *msgComposeWindowURL, const PRUnichar *originalMsgURI, PRInt32 type, PRInt32 format, nsISupports *object);
|
||||
|
||||
/* void OpenComposeWindowWithValues (in wstring msgComposeWindowURL, in MSG_ComposeFormat format, in wstring to, in wstring cc, in wstring bcc, in wstring newsgroups, in wstring subject, in wstring body); */
|
||||
NS_IMETHOD OpenComposeWindowWithValues(const PRUnichar *msgComposeWindowURL, MSG_ComposeFormat format, const PRUnichar *to, const PRUnichar *cc, const PRUnichar *bcc, const PRUnichar *newsgroups,
|
||||
const PRUnichar *subject, const PRUnichar *body);
|
||||
|
||||
/* nsIMsgCompose InitCompose (in nsIDOMWindow aWindow, in wstring originalMsgURI, in MSG_ComposeType type, in MSG_ComposeFormat format); */
|
||||
NS_IMETHOD InitCompose(nsIDOMWindow *aWindow, const PRUnichar *originalMsgURI, MSG_ComposeType type, MSG_ComposeFormat format, nsIMsgCompose **_retval);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче