return NS_OK;
if (dialogTitle) { CPlatformUCSConversion::GetInstance()->UCSToPlatform(nsDependentString(dialogTitle), pStr); theDialog->SetDescriptor(pStr); }  LStaticText	*msgText = dynamic_cast<LStaticText*>(theDialog->FindPaneByID('Msg ')); CPlatformUCSConversion::GetInstance()->UCSToPlatform(nsDependentString(text), cStr); cStr.ReplaceChar('\n', '\r'); msgText->SetText(const_cast<char *>(cStr.get()), cStr.Length());  LEditText *responseText = dynamic_cast<LEditText*>(theDialog->FindPaneByID('Rslt')); if (value && *value) { CPlatformUCSConversion::GetInstance()->UCSToPlatform(nsDependentString(*value), pStr); responseText->SetDescriptor(pStr); }  if (checkValue) { checkbox->SetValue(*checkValue); if (checkMsg) { CPlatformUCSConversion::GetInstance()->UCSToPlatform(nsDependentString(checkMsg), pStr); checkbox->SetDescriptor(pStr); } } else checkbox->Hide();  theDialog->SetLatentSub(responseText); theDialog->Show(); theDialog->Select();  while (true) { MessageT	hitMessage = theHandler.DoDialog();  if (hitMessage == msg_OK) { nsAutoString ucStr;  *_retval = PR_TRUE; if (value && *value) { nsMemory::Free(*value); *value = nsnull; } responseText->GetDescriptor(pStr); CPlatformUCSConversion::GetInstance()->PlatformToUCS(pStr, ucStr); *value = ToNewUnicode(ucStr); if (*value == nsnull) resultErr = NS_ERROR_OUT_OF_MEMORY;  if (checkValue) *checkValue = checkbox->GetValue();  break; } else if (hitMessage == msg_Cancel) { *_retval = PR_FALSE; break; } }  return resultErr;
NS_IMETHODIMP CPromptService::Prompt(nsIDOMWindow *parent,                                     const PRUnichar *dialogTitle,                                     const PRUnichar *text,                                     PRUnichar **value,                                     const PRUnichar *checkboxMsg,                                     PRBool *checkValue,                                     PRBool *_retval){	nsString 	mTitle(dialogTitle);	nsString 	mText(text);	nsString 	mMsg(checkboxMsg);	int 		ret;	CWebBrowserContainer *w = GetWebBrowser( parent );	if (w->InvokeDialogCallback(Pt_MOZ_DIALOG_CONFIRM, ToNewCString(mTitle), ToNewCString(mText), \			ToNewCString(mMsg), &ret) == Pt_CONTINUE)		*_retval = PR_TRUE;	else		*_retval = PR_FALSE;	*checkValue = ret;	return NS_OK;}