New privacy preference pane class

This commit is contained in:
mcafee%netscape.com 1998-09-10 22:35:39 +00:00
parent 0fbc01cb40
commit ec032b60ba
5 changed files with 123 additions and 2 deletions

View File

@ -2299,8 +2299,8 @@ Show security information for this page
*menuBar*viewReceipts.labelString: Display Receipts
*menuBar*viewReceipts.mnemonic: R
*menuBar*privacyTutorial.labelString: Privacy Tutorial
*menuBar*privacyTutorial.mnemonic: T
*menuBar*privacyTutorial.labelString: About Privacy
*menuBar*privacyTutorial.mnemonic: B
! end Privacy Tools Submenu
@ -5969,6 +5969,7 @@ for download.
*pref.browser: Navigator
*pref.lang: Languages
*pref.applications: Applications
*pref.privacy: Privacy
*pref.mailNews: Mail & Groups
*pref.identity: Identity
*pref.messages: Messages
@ -5998,6 +5999,7 @@ for download.
*prefDesc.browser: Specify the home page location
*prefDesc.lang: View web pages in different languages
*prefDesc.applications: Specify helper applications for different file types
*prefDesc.privacy: Establish your level of privacy protection
*prefDesc.mailNews: Change appearance settings for Mail & Groups
*prefDesc.identity: Set your name, email address, and signature file
*prefDesc.composition: Choose settings for outgoing messages

View File

@ -128,6 +128,20 @@ struct PrefsDataGeneralAdvanced
Widget warn_cookie_toggle;
};
struct PrefsDataGeneralPrivacy
{
MWContext *context;
Widget prompt_dialog;
Widget page;
Widget always_accept_cookie_toggle;
Widget no_foreign_cookie_toggle;
Widget never_accept_cookie_toggle;
Widget warn_cookie_toggle;
};
struct PrefsDataGeneralCache
{
MWContext *context;

View File

@ -72,6 +72,7 @@ static char *TAG_BOLD = "BOLD";
#define CAT_FONTS "Fonts"
#define CAT_COLORS "Colors"
#define CAT_APPS "Applications"
#define CAT_PRIVACY "Privacy"
#define CAT_LANG "Languages"
#define CAT_CACHE "Cache"
#define CAT_PROXIES "Proxies"
@ -102,6 +103,7 @@ static char *TAG_BOLD = "BOLD";
#define CAT_RESNAME_BROWSER "pref.browser"
#define CAT_RESNAME_LANG "pref.lang"
#define CAT_RESNAME_APPS "pref.applications"
#define CAT_RESNAME_PRIVACY "pref.privacy"
#define CAT_RESNAME_MAILNEWS "pref.mailNews"
#define CAT_RESNAME_MAILNEWS_IDENTITY "pref.identity"
#define CAT_RESNAME_MAILNEWS_MESSAGES "pref.messages"
@ -135,6 +137,7 @@ static char *TAG_BOLD = "BOLD";
#define CAT_RESCLASS_BROWSER "Pref.Browser"
#define CAT_RESCLASS_LANG "Pref.Lang"
#define CAT_RESCLASS_APPS "Pref.Applications"
#define CAT_RESCLASS_PRIVACY "Pref.Privacy"
#define CAT_RESCLASS_MAILNEWS "Pref.MailNews"
#define CAT_RESCLASS_MAILNEWS_IDENTITY "Pref.Identity"
#define CAT_RESCLASS_MAILNEWS_MESSAGES "Pref.Messages"
@ -168,6 +171,7 @@ static char *TAG_BOLD = "BOLD";
#define DESC_RESNAME_BROWSER "prefDesc.browser"
#define DESC_RESNAME_LANG "prefDesc.lang"
#define DESC_RESNAME_APPS "prefDesc.applications"
#define DESC_RESNAME_PRIVACY "prefDesc.privacy"
#define DESC_RESNAME_MAILNEWS "prefDesc.mailNews"
#define DESC_RESNAME_MAILNEWS_IDENTITY "prefDesc.identity"
#define DESC_RESNAME_MAILNEWS_MESSAGES "prefDesc.messages"
@ -201,6 +205,7 @@ static char *TAG_BOLD = "BOLD";
#define DESC_RESCLASS_BROWSER "PrefDesc.Browser"
#define DESC_RESCLASS_LANG "PrefDesc.Lang"
#define DESC_RESCLASS_APPS "PrefDesc.Applications"
#define DESC_RESCLASS_PRIVACY "PrefDesc.Privacy"
#define DESC_RESCLASS_MAILNEWS "PrefDesc.MailNews"
#define DESC_RESCLASS_MAILNEWS_IDENTITY "PrefDesc.Identity"
#define DESC_RESCLASS_MAILNEWS_MESSAGES "PrefDesc.Messages"
@ -235,6 +240,7 @@ typedef enum _prefsPageType {
PAGE_TYPE_BROWSER,
PAGE_TYPE_LANG,
PAGE_TYPE_APPS,
PAGE_TYPE_PRIVACY,
PAGE_TYPE_MAILNEWS,
PAGE_TYPE_MAILNEWS_IDENTITY,
PAGE_TYPE_MAILNEWS_MESSAGES,
@ -469,6 +475,17 @@ struct _prefsCategory prefsBrowser[] = {
0,
PAGE_TYPE_APPS,
},
{
CAT_PRIVACY,
CAT_RESNAME_PRIVACY,
CAT_RESCLASS_PRIVACY,
DESC_RESNAME_PRIVACY,
DESC_RESCLASS_PRIVACY,
TRUE,
NULL,
0,
PAGE_TYPE_PRIVACY,
}
};
struct _prefsCategory prefsAdvanced[] = {
@ -1810,6 +1827,9 @@ void XFE_PrefsDialog::newPage(XFE_PrefsPage *&page,
case PAGE_TYPE_APPS:
page = new XFE_PrefsPageGeneralAppl(this);
break;
case PAGE_TYPE_PRIVACY:
page = new XFE_PrefsPageGeneralPrivacy(this);
break;
case PAGE_TYPE_CACHE:
page = new XFE_PrefsPageGeneralCache(this);
break;

View File

@ -445,6 +445,34 @@ private:
XP_Bool m_toolbar_needs_updating;
};
// Moved some things from Advanced to Privacy pane.
class XFE_PrefsPageGeneralPrivacy : public XFE_PrefsPage
{
public:
// Constructors, Destructors
XFE_PrefsPageGeneralPrivacy(XFE_PrefsDialog *dialog);
virtual ~XFE_PrefsPageGeneralPrivacy();
// Manipulators
virtual void create();
virtual void init();
virtual void install();
virtual void save();
// Gets
PrefsDataGeneralPrivacy *getData();
// Callbacks - page General/Advanced
//static void cb_toggleCookieState(Widget, XtPointer, XtPointer);
private:
PrefsDataGeneralPrivacy *m_prefsDataGeneralPrivacy;
XP_Bool m_toolbar_needs_updating;
};
// ************************* XFE_PrefsPageGeneralAppl *************************
class XFE_PrefsPageGeneralAppl : public XFE_PrefsPage

View File

@ -2874,6 +2874,63 @@ void XFE_PrefsPageGeneralAdvanced::cb_toggleCookieState(Widget w,
abort();
}
// ********************************************************************
// ************************ General/Privacy **************************
// ********************************************************************
XFE_PrefsPageGeneralPrivacy::XFE_PrefsPageGeneralPrivacy(XFE_PrefsDialog *dialog)
: XFE_PrefsPage(dialog),
m_prefsDataGeneralPrivacy(0)
{
m_toolbar_needs_updating = FALSE;
}
XFE_PrefsPageGeneralPrivacy::~XFE_PrefsPageGeneralPrivacy()
{
delete m_prefsDataGeneralPrivacy;
}
void XFE_PrefsPageGeneralPrivacy::create()
{
PrefsDataGeneralPrivacy *fep = NULL;
Widget form;
// Zap our data structure.
fep = new PrefsDataGeneralPrivacy;
memset(fep, 0, sizeof(PrefsDataGeneralPrivacy));
m_prefsDataGeneralPrivacy = fep;
// Form
form = XmCreateForm (m_wPageForm, "privacy", NULL, 0);
XtManageChild(form);
m_wPage = fep->page = form;
setCreated(TRUE);
}
void XFE_PrefsPageGeneralPrivacy::init()
{
setInitialized(TRUE);
}
void XFE_PrefsPageGeneralPrivacy::install()
{
}
void XFE_PrefsPageGeneralPrivacy::save()
{
install();
}
PrefsDataGeneralPrivacy *XFE_PrefsPageGeneralPrivacy::getData()
{
return m_prefsDataGeneralPrivacy;
}
// ************************************************************************
// ************************** General/Appl ***************************
// ************************************************************************