version 1.6, 2002/02/10 01:12:05
|
version 1.7, 2002/02/25 03:22:59
|
Line 344 nsCocoaBrowserService::ConfirmEx(nsIDOMW
|
Line 344 nsCocoaBrowserService::ConfirmEx(nsIDOMW
|
const PRUnichar *checkMsg, |
const PRUnichar *checkMsg, |
PRBool *checkValue, PRInt32 *buttonPressed) |
PRBool *checkValue, PRInt32 *buttonPressed) |
{ |
{ |
return NS_ERROR_NOT_IMPLEMENTED; | nsAlertController* controller = GetAlertController(); |
| if (!controller) { |
| return NS_ERROR_FAILURE; |
| } |
| |
| NSString* titleStr = [NSString stringWithCharacters:dialogTitle length:(dialogTitle ? nsCRT::strlen(dialogTitle) : 0)]; |
| NSString* textStr = [NSString stringWithCharacters:text length:(text ? nsCRT::strlen(text) : 0)]; |
| NSString* msgStr = [NSString stringWithCharacters:checkMsg length:(checkMsg ? nsCRT::strlen(checkMsg) : 0)]; |
| NSWindow* window = GetNSWindowForDOMWindow(parent); |
| |
| NSString* btn1Str = [NSString stringWithCharacters:button0Title length:(button0Title ? nsCRT::strlen(button0Title) : 0)]; |
| NSString* btn2Str = [NSString stringWithCharacters:button1Title length:(button1Title ? nsCRT::strlen(button1Title) : 0)]; |
| NSString* btn3Str = [NSString stringWithCharacters:button2Title length:(button2Title ? nsCRT::strlen(button2Title) : 0)]; |
| |
| if (checkValue) { |
| BOOL valueBool = *checkValue ? YES : NO; |
| |
| *buttonPressed = (PRInt32)[controller confirmCheckEx:window title:titleStr text:textStr |
| button1: btn1Str button2: btn2Str button3: btn3Str |
| checkMsg:msgStr checkValue:&valueBool]; |
| |
| *checkValue = (valueBool == YES) ? PR_TRUE : PR_FALSE; |
| } |
| else { |
| *buttonPressed = (PRInt32)[controller confirmEx:window title:titleStr text:textStr |
| button1: btn1Str button2: btn2Str button3: btn3Str]; |
| } |
| |
| printf("Uh-oh! Not posing the confirm yet, but just assuming OK was pressed.\n"); |
| |
| return NS_OK; |
| |
} |
} |
|
|
/* boolean prompt (in nsIDOMWindow parent, in wstring dialogTitle, in wstring text, inout wstring value, in wstring checkMsg, inout boolean checkValue); */ |
/* boolean prompt (in nsIDOMWindow parent, in wstring dialogTitle, in wstring text, inout wstring value, in wstring checkMsg, inout boolean checkValue); */ |
Line 487 nsCocoaBrowserService::Select(nsIDOMWind
|
Line 518 nsCocoaBrowserService::Select(nsIDOMWind
|
PRInt32 *outSelection, |
PRInt32 *outSelection, |
PRBool *_retval) |
PRBool *_retval) |
{ |
{ |
|
printf("Uh-oh. Select has not been implemented.\n"); |
return NS_ERROR_NOT_IMPLEMENTED; |
return NS_ERROR_NOT_IMPLEMENTED; |
} |
} |
|
|
Line 497 nsCocoaBrowserService::CreateChromeWindo
|
Line 529 nsCocoaBrowserService::CreateChromeWindo
|
PRUint32 chromeFlags, |
PRUint32 chromeFlags, |
nsIWebBrowserChrome **_retval) |
nsIWebBrowserChrome **_retval) |
{ |
{ |
|
printf("Uh-oh. We don't know how to create a chrome window.\n"); |
return NS_ERROR_NOT_IMPLEMENTED; |
return NS_ERROR_NOT_IMPLEMENTED; |
} |
} |
|
|