Add MacFE stubs for FE_CheckConfirm and FE_SelectDialog for morse's privacy code. danm acquired the appropriate permissions from the module owners for the XP spammage.

This commit is contained in:
sdagley%netscape.com 1998-08-13 22:11:56 +00:00
Родитель 9dd66e7de3
Коммит 02ff6820f9
12 изменённых файлов: 138 добавлений и 71 удалений

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

@ -885,6 +885,37 @@ PRBool XP_Confirm( MWContext * , const char * msg)
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
XP_Bool CNSContext::CheckConfirm(
const char* pConfirmMessage,
const char* pCheckMessage,
const char* pOKMessage,
const char* pCancelMessage,
XP_Bool* pChecked)
{
CStr255 confirmMessage(pConfirmMessage),
checkMessage(pCheckMessage),
okMessage(pOKMessage),
cancelMessage(pCancelMessage);
return (UStdDialogs::CheckConfirm(confirmMessage, checkMessage, okMessage, cancelMessage, pChecked));
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
XP_Bool CNSContext::SelectDialog(
const char* pMessage,
char** pList,
int16* pCount)
{
CStr255 message(pMessage);
return (UStdDialogs::SelectDialog(message, pList, pCount));
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
char* CNSContext::Prompt(
const char* inMessage,
const char* inDefaultText)

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

@ -432,6 +432,18 @@ protected:
virtual XP_Bool Confirm(
const char* inMessage);
virtual XP_Bool CheckConfirm(
const char* pConfirmMessage,
const char* pCheckMessage,
const char* pOKMessage,
const char* pCancelMessage,
XP_Bool* pChecked);
virtual XP_Bool SelectDialog(
const char* pMessage,
char** pList,
int16* pCount);
virtual char* Prompt(
const char* inMessage,
const char* inDefaultText);

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

@ -619,6 +619,30 @@ XP_Bool CNSContextCallbacks::Confirm(
return theNSContext->Confirm(inMessage);
}
XP_Bool CNSContextCallbacks::CheckConfirm(
MWContext* inContext,
const char* pConfirmMessage,
const char* pCheckMessage,
const char* pOKMessage,
const char* pCancelMessage,
XP_Bool* pChecked)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
return theNSContext->CheckConfirm(pConfirmMessage, pCheckMessage, pOKMessage, pCancelMessage, pChecked);
}
XP_Bool CNSContextCallbacks::SelectDialog(
MWContext* inContext,
const char* pMessage,
const char** pList,
int16* pCount)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
return theNSContext->SelectDialog(pMessage, pList, pCount);
}
char* CNSContextCallbacks::Prompt(
MWContext* inContext,
const char* inMessage,

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

@ -318,6 +318,20 @@ class CNSContextCallbacks
MWContext* inContext,
const char* inMessage);
static XP_Bool CheckConfirm(
MWContext* inContext,
const char* pConfirmMessage,
const char* pCheckMessage,
const char* pOKMessage,
const char* pCancelMessage,
XP_Bool* pChecked);
static XP_Bool SelectDialog(
MWContext* inContext,
const char* pMessage,
const char** pList,
int16* pCount);
static char* PromptWithCaption(
MWContext* inContext,
const char* inCaption,

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

@ -680,15 +680,10 @@ BOOL FE_FileType(char * path,
(*context->funcs->PromptPassword)(context, Msg)
#define FE_PromptUsernameAndPassword(cx, Msg, username, password) \
(*cx->funcs->PromptUsernameAndPassword)(cx,Msg,username,password)
#ifdef XP_WIN /* privacy ifdef - last person to get here please remove */
#define FE_CheckConfirm(context,msg,checkmsg,okmsg,cancelmsg,checked) \
(*context->funcs->CheckConfirm)(context,msg,checkmsg,okmsg,cancelmsg,checked)
#define FE_SelectDialog(context,msg,list,count) \
(*context->funcs->SelectDialog)(context,msg,list,count)
#endif
#define FE_EnableClicking(context) \
(*context->funcs->EnableClicking)(context)
#define FE_GetDefaultBackgroundColor(context,color) \

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

@ -462,7 +462,7 @@ JSBool
ET_PostCheckConfirmBox(MWContext* context,
char* szMainMessage, char* szCheckMessage,
char* szOKMessage, char* szCancelMessage,
JSBool *bChecked);
XP_Bool *bChecked);
extern void
ET_PostProgress(MWContext* context, const char* szMessage);

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

@ -135,10 +135,8 @@ FE_DEFINE(UseFancyNewsgroupListing, XP_Bool, (MWContext *window_id))
FE_DEFINE(FileSortMethod, int, (MWContext * window_id))
FE_DEFINE(ShowAllNewsArticles, XP_Bool, (MWContext *window_id))
FE_DEFINE(Confirm, XP_Bool,(MWContext * context, const char * Msg))
#ifdef XP_WIN /* privacy ifdef - last person to get here, please remove */
FE_DEFINE(CheckConfirm, XP_Bool, (MWContext *pContext, const char *pConfirmMessage, const char *pCheckMessage, const char *pOKMessage, const char *pCancelMessage, XP_Bool *pChecked))
FE_DEFINE(SelectDialog, XP_Bool, (MWContext *pContext, const char *pMessage, const char **pList, int *pCount))
#endif
FE_DEFINE(SelectDialog, XP_Bool, (MWContext *pContext, const char *pMessage, const char **pList, int16 *pCount))
FE_DEFINE(Prompt,char*,(MWContext * context, const char * Msg, const char * dflt))
FE_DEFINE(PromptWithCaption,char*,(MWContext * context, const char *caption, const char * Msg, const char * dflt))
FE_DEFINE(PromptUsernameAndPassword, XP_Bool, (MWContext *,const char *,char **, char **))

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

@ -118,8 +118,8 @@ typedef struct {
* checkMessage,
* okMessage,
* cancelMessage;
JSBool accepted, /* dialog was OKed? */
checked; /* checkbox is checked? */
JSBool accepted; /* dialog was OKed? */
XP_Bool checked; /* checkbox is checked? */
} MozillaEvent_CheckConfirmBox; /* CheckConfirm message box event */
@ -163,13 +163,9 @@ et_HandleEvent_CheckConfirmBox(MozillaEvent_CheckConfirmBox* e)
e->ce.context->bJavaScriptCalling = TRUE;
}
#ifdef XP_WIN /* privacy ifdef - last person to get here please remove */
e->accepted = FE_CheckConfirm(e->ce.context, e->mainMessage,
e->checkMessage, e->okMessage, e->cancelMessage,
&e->checked);
#else
e->accepted = 0; /* and kill this else clause while you're at it */
#endif
/* we're restricted to a single (void *) return value, and we need to return
two separate booleans, thus the bit hackery: */
pRet = (void *) ((e->accepted ? CHECKBOX_ACCEPTBIT : 0x0) |
@ -214,7 +210,7 @@ JSBool
ET_PostCheckConfirmBox(MWContext* context,
char* szMainMessage, char* szCheckMessage,
char* szOKMessage, char* szCancelMessage,
JSBool *bChecked)
XP_Bool *bChecked)
{
uint8 rtnVal;
MozillaEvent_CheckConfirmBox* event = PR_NEW(MozillaEvent_CheckConfirmBox);

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

@ -639,6 +639,38 @@ Boolean UStdDialogs::AskForNameAndPassword(
return (theMessage == msg_OK);
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥ CheckConfirm
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
Boolean UStdDialogs::CheckConfirm(
const CString& pConfirmMessage,
const CString& pCheckMessage,
const CString& pOKMessage,
const CString& pCancelMessage,
XP_Bool* pChecked,
LWindow* inOverWindow,
LCommander* inSuper)
{
return false;
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥ SelectDialog
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
Boolean UStdDialogs::SelectDialog(
const CString& pMessage,
const char** pList,
int16 *pCount,
LWindow* inOverWindow,
LCommander* inSuper)
{
return false;
}
// ムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムム
// ・ TryToInteract
// ムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムム

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

@ -22,6 +22,8 @@
#include "PascalString.h"
#include "xp_core.h"
const ResIDT cDefaultTextTraitsID = 128;
const ResIDT cPasswordTextTraitsID = 4000;
@ -207,6 +209,24 @@ class UStdDialogs
LCommander* inSuper = NULL);
static Boolean CheckConfirm(
const CString& pConfirmMessage,
const CString& pCheckMessage,
const CString& pOKMessage,
const CString& pCancelMessage,
XP_Bool* pChecked,
LWindow* inOverWindow = NULL,
LCommander* inSuper = NULL);
static Boolean SelectDialog(
const CString& pMessage,
const char** pList,
int16* pCount,
LWindow* inOverWindow = NULL,
LCommander* inSuper = NULL);
static OSErr AskSaveAsTextOrSource(
StandardFileReply& ioReply,
const CString& initialFilename,

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

@ -1735,25 +1735,6 @@ net_AddCookiePermission
#endif
#ifndef XP_WIN /* privacy ifdef - last person to get here please remove */
/*
* temporary UI until FE implements this function as a single dialog box
*/
XP_Bool FE_CheckConfirm (
MWContext *pContext,
char* pConfirmMessage,
char* pCheckMessage,
char* pOKMessage,
char* pCancelMessage,
XP_Bool* pChecked) {
Bool userHasAccepted = ET_PostMessageBox(pContext, pConfirmMessage, TRUE);
*pChecked = ET_PostMessageBox (pContext, pCheckMessage, TRUE);
return userHasAccepted;
}
/* end of temporary UI */
#endif
/* Java script is calling NET_SetCookieString, netlib is calling
** this via NET_SetCookieStringFromHttp.
*/
@ -2167,11 +2148,7 @@ net_IntSetCookieString(MWContext * context,
{
Bool old_cookie_remember_checked = cookie_remember_checked;
#ifdef XP_WIN /* privacy ifdef - last person to get here please remove */
XP_Bool userHasAccepted = ET_PostCheckConfirmBox
#else
XP_Bool userHasAccepted = FE_CheckConfirm
#endif
(context,
new_string,
remember_string,

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

@ -46,18 +46,6 @@
(MAIL_NEWS_TYPE(cp->type)))
#ifndef XP_WIN /* privacy ifdef - last person to get here please remove */
PRIVATE
XP_Bool FE_CheckConfirm (
MWContext *pContext,
char* pConfirmMessage,
char* pCheckMessage,
char* pOKMessage,
char* pCancelMessage,
XP_Bool* pChecked);
#endif
PRIVATE int32
prvcy_countEntryBoxes(lo_DocState *top_doc_state,
LO_FormElementStruct *ele_struct)
@ -345,23 +333,3 @@ PUBLIC Bool
PRVCY_IsAnonymous() {
return anonymous;
}
#ifndef XP_WIN /* privacy ifdef - last person to get here please remove */
/*
* temporary UI until FE implements this function as a single dialog box
*/
PRIVATE
XP_Bool FE_CheckConfirm (
MWContext *pContext,
char* pConfirmMessage,
char* pCheckMessage,
char* pOKMessage,
char* pCancelMessage,
XP_Bool* pChecked) {
Bool result = ET_PostMessageBox(pContext, pConfirmMessage, TRUE);
*pChecked = ET_PostMessageBox (pContext, pCheckMessage, TRUE);
return result;
}
/* end of temporary UI */
#endif