Added code to fire TitleChange events. b=84496 r=ccarlen@netscape.com sr=blizzard@mozilla.org a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@96923 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -224,7 +224,8 @@ public:
|
||||
{
|
||||
pCI->pfnCommandProc(pT, pCI->pCmdGUID, pCI->nCmdID, nCmdexecopt, pvaIn, pvaOut);
|
||||
}
|
||||
else if (pCI->nWindowsCmdID != 0)
|
||||
else if (pCI->nWindowsCmdID != 0 &&
|
||||
!(nCmdexecopt & OLECMDEXECOPT_SHOWHELP))
|
||||
{
|
||||
HWND hwndTarget = pT->GetCommandTargetWindow();
|
||||
if (hwndTarget)
|
||||
|
||||
@@ -479,14 +479,31 @@ CWebBrowserContainer::SetFocus(void)
|
||||
NS_IMETHODIMP
|
||||
CWebBrowserContainer::GetTitle(PRUnichar * *aTitle)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
NG_ASSERT_POINTER(aTitle, PRUnichar **);
|
||||
if (!aTitle)
|
||||
return E_INVALIDARG;
|
||||
|
||||
*aTitle = m_sTitle.ToNewUnicode();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
CWebBrowserContainer::SetTitle(const PRUnichar * aTitle)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
NG_ASSERT_POINTER(aTitle, PRUnichar *);
|
||||
if (!aTitle)
|
||||
return E_INVALIDARG;
|
||||
|
||||
m_sTitle = aTitle;
|
||||
// Fire a TitleChange event
|
||||
BSTR bstrTitle = SysAllocString(aTitle);
|
||||
m_pEvents1->Fire_TitleChange(bstrTitle);
|
||||
m_pEvents2->Fire_TitleChange(bstrTitle);
|
||||
SysFreeString(bstrTitle);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user