Renamed init() to read(), save() to write().

This commit is contained in:
mcafee%netscape.com 1998-09-21 05:29:26 +00:00
Родитель 2b0a693f1c
Коммит 0981afc9b2
5 изменённых файлов: 171 добавлений и 202 удалений

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

@ -262,12 +262,12 @@ public:
// Manipulators // Manipulators
virtual void create() = 0; virtual void create() = 0;
virtual void init() = 0; virtual void read() = 0;
virtual void map(); virtual void map();
virtual void unmap(); virtual void unmap();
virtual Boolean verify(); virtual Boolean verify();
virtual void install() = 0; virtual void install() = 0;
virtual void save() = 0; virtual void write() = 0;
void setCreated(Boolean); void setCreated(Boolean);
void setInitialized(Boolean); void setInitialized(Boolean);
@ -309,9 +309,9 @@ public:
// Manipulators // Manipulators
virtual void create(); virtual void create();
virtual void init(); virtual void read();
virtual void install(); virtual void install();
virtual void save(); virtual void write();
// Gets // Gets
PrefsDataGeneralAppearance *getData(); PrefsDataGeneralAppearance *getData();
@ -339,9 +339,9 @@ public:
// Manipulators // Manipulators
virtual void create(); virtual void create();
virtual void relayout(PrefsDataGeneralFonts *fep); virtual void relayout(PrefsDataGeneralFonts *fep);
virtual void init(); virtual void read();
virtual void install(); virtual void install();
virtual void save(); virtual void write();
// Gets // Gets
PrefsDataGeneralFonts *getData(); PrefsDataGeneralFonts *getData();
@ -369,9 +369,9 @@ public:
// Manipulators // Manipulators
virtual void create(); virtual void create();
virtual void init(); virtual void read();
virtual void install(); virtual void install();
virtual void save(); virtual void write();
// Gets // Gets
PrefsDataGeneralColors *getData(); PrefsDataGeneralColors *getData();
@ -400,9 +400,9 @@ public:
// Manipulators // Manipulators
virtual void create(); virtual void create();
virtual void init(); virtual void read();
virtual void install(); virtual void install();
virtual void save(); virtual void write();
// Gets // Gets
PrefsDataGeneralAdvanced *getData(); PrefsDataGeneralAdvanced *getData();
@ -427,9 +427,9 @@ public:
// Manipulators // Manipulators
virtual void create(); virtual void create();
virtual void init(); virtual void read();
virtual void install(); virtual void install();
virtual void save(); virtual void write();
// Gets // Gets
PrefsDataGeneralPrivacy *getData(); PrefsDataGeneralPrivacy *getData();
@ -454,9 +454,9 @@ public:
// Manipulators // Manipulators
virtual void create(); virtual void create();
virtual void init(); virtual void read();
virtual void install(); virtual void install();
virtual void save(); virtual void write();
virtual void unmap(); virtual void unmap();
void setModified(Boolean); void setModified(Boolean);
@ -486,9 +486,9 @@ public:
// Manipulators // Manipulators
virtual void create(); virtual void create();
virtual void init(); virtual void read();
virtual void install(); virtual void install();
virtual void save(); virtual void write();
// Gets // Gets
PrefsDataGeneralCache *getData(); PrefsDataGeneralCache *getData();
@ -516,9 +516,9 @@ public:
// Manipulators // Manipulators
virtual void create(); virtual void create();
virtual void init(); virtual void read();
virtual void install(); virtual void install();
virtual void save(); virtual void write();
// Gets // Gets
PrefsDataGeneralProxies *getData(); PrefsDataGeneralProxies *getData();
@ -546,9 +546,9 @@ public:
// Manipulators // Manipulators
virtual void create(); virtual void create();
virtual void init(); virtual void read();
virtual void install(); virtual void install();
virtual void save(); virtual void write();
// Gets // Gets
PrefsDataBrowser *getData(); PrefsDataBrowser *getData();
@ -578,9 +578,9 @@ public:
// Manipulators // Manipulators
virtual void create(); virtual void create();
virtual void init(); virtual void read();
virtual void install(); virtual void install();
virtual void save(); virtual void write();
void insertLang(char *lang); void insertLang(char *lang);
void insertLangAtPos(int pos, char *lang); void insertLangAtPos(int pos, char *lang);
@ -638,6 +638,46 @@ private:
int m_rowIndex; int m_rowIndex;
}; };
// ********************* XFE_PrefsPageBrowserSmart *************************
class XFE_PrefsPageBrowserSmart : public XFE_PrefsPage
{
public:
// Constructors, Destructors
XFE_PrefsPageBrowserSmart(XFE_PrefsDialog *dialog);
virtual ~XFE_PrefsPageBrowserSmart();
// Manipulators
virtual void create();
virtual void read();
virtual void install();
virtual void write();
// Gets
PrefsDataBrowserSmart *getData();
// Callbacks - page Browser/Smart
// static void cb_toggleInternetKeywords(Widget, XtPointer, XtPointer);
static void cb_toggleRelatedAutoload(Widget, XtPointer, XtPointer);
static void cb_toggleRelatedEnabled(Widget, XtPointer, XtPointer);
private:
// Data
PrefsDataBrowserSmart *m_prefsDataBrowserSmart;
XP_Bool m_rl_need_chrome_update;
void updateRelatedLinksSensitive();
void updateInternetKeywordsSensitive();
};
#ifdef MOZ_MAIL_NEWS #ifdef MOZ_MAIL_NEWS
// ************************* XFE_PrefsPageMailNews ************************* // ************************* XFE_PrefsPageMailNews *************************
@ -652,9 +692,9 @@ public:
// Manipulators // Manipulators
virtual void create(); virtual void create();
virtual void init(); virtual void read();
virtual void install(); virtual void install();
virtual void save(); virtual void write();
// Gets // Gets
PrefsDataMailNews *getData(); PrefsDataMailNews *getData();
@ -683,9 +723,9 @@ public:
// Manipulators // Manipulators
virtual void create(); virtual void create();
virtual void init(); virtual void read();
virtual void install(); virtual void install();
virtual void save(); virtual void write();
virtual Boolean verify(); virtual Boolean verify();
// Gets // Gets
@ -815,9 +855,9 @@ public:
// Manipulators // Manipulators
virtual void create(); virtual void create();
virtual void init(); virtual void read();
virtual void install(); virtual void install();
virtual void save(); virtual void write();
virtual Boolean verify(); virtual Boolean verify();
// Callbacks - page Mail News/Mail Server // Callbacks - page Mail News/Mail Server
@ -845,9 +885,9 @@ public:
MSG_FolderInfo *GetFolderInfoFromPath(char *path, MSG_FolderInfo *GetFolderInfoFromPath(char *path,
MSG_FolderInfo *parent=NULL); MSG_FolderInfo *parent=NULL);
virtual void init(); virtual void read();
virtual void install(); virtual void install();
virtual void save(); virtual void write();
virtual Boolean verify(); virtual Boolean verify();
private: private:
@ -903,9 +943,9 @@ public:
virtual ~XFE_PrefsPageMailNewsHTML(); virtual ~XFE_PrefsPageMailNewsHTML();
virtual void create(); virtual void create();
virtual void init(); virtual void read();
virtual void install(); virtual void install();
virtual void save(); virtual void write();
virtual Boolean verify(); virtual Boolean verify();
private: private:
@ -930,9 +970,9 @@ public:
virtual ~XFE_PrefsPageMailNewsReceipts(); virtual ~XFE_PrefsPageMailNewsReceipts();
virtual void create(); virtual void create();
virtual void init(); virtual void read();
virtual void install(); virtual void install();
virtual void save(); virtual void write();
virtual Boolean verify(); virtual Boolean verify();
private: private:
@ -964,9 +1004,9 @@ public:
// Manipulators // Manipulators
virtual void create(); virtual void create();
virtual void init(); virtual void read();
virtual void install(); virtual void install();
virtual void save(); virtual void write();
virtual Boolean verify(); virtual Boolean verify();
// Gets // Gets
@ -997,9 +1037,9 @@ public:
// Manipulators // Manipulators
virtual void create(); virtual void create();
virtual void init(); virtual void read();
virtual void install(); virtual void install();
virtual void save(); virtual void write();
// Gets // Gets
PrefsDataEditorAppearance *getData(); PrefsDataEditorAppearance *getData();
@ -1024,9 +1064,9 @@ public:
// Manipulators // Manipulators
virtual void create(); virtual void create();
virtual void init(); virtual void read();
virtual void install(); virtual void install();
virtual void save(); virtual void write();
// Gets // Gets
PrefsDataEditorPublish *getData(); PrefsDataEditorPublish *getData();
@ -1056,9 +1096,9 @@ public:
// Manipulators // Manipulators
virtual void create(); virtual void create();
virtual void init(); virtual void read();
virtual void install(); virtual void install();
virtual void save(); virtual void write();
// Gets // Gets
PrefsDataOffline *getData(); PrefsDataOffline *getData();
@ -1086,9 +1126,9 @@ public:
// Manipulators // Manipulators
virtual void create(); virtual void create();
virtual void init(); virtual void read();
virtual void install(); virtual void install();
virtual void save(); virtual void write();
// Gets // Gets
PrefsDataOfflineNews *getData(); PrefsDataOfflineNews *getData();
@ -1118,9 +1158,9 @@ public:
// Manipulators // Manipulators
virtual void create(); virtual void create();
virtual void init(); virtual void read();
virtual void install(); virtual void install();
virtual void save(); virtual void write();
// Gets // Gets
PrefsDataDiskSpace *getData(); PrefsDataDiskSpace *getData();
@ -1150,9 +1190,9 @@ public:
// Manipulators // Manipulators
virtual void create(); virtual void create();
virtual void init(); virtual void read();
virtual void install(); virtual void install();
virtual void save(); virtual void write();
// Gets // Gets
PrefsDataHelpFiles *getData(); PrefsDataHelpFiles *getData();

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

@ -410,12 +410,8 @@ void XFE_PrefsPageBrowser::create()
setCreated(TRUE); setCreated(TRUE);
} }
// Member: init // Read prefs from PREF backend.
// Description: Initializes page for Browser void XFE_PrefsPageBrowser::read()
// Inputs:
// Side effects:
void XFE_PrefsPageBrowser::init()
{ {
XP_ASSERT(m_prefsDataBrowser); XP_ASSERT(m_prefsDataBrowser);
@ -480,12 +476,9 @@ void XFE_PrefsPageBrowser::install()
} }
} }
// Member: save
// Description:
// Inputs:
// Side effects:
void XFE_PrefsPageBrowser::save() // Write pref UI to PREF backend.
void XFE_PrefsPageBrowser::write()
{ {
PrefsDataBrowser *fep = m_prefsDataBrowser; PrefsDataBrowser *fep = m_prefsDataBrowser;
@ -897,12 +890,8 @@ void XFE_PrefsPageBrowserLang::create()
setCreated(TRUE); setCreated(TRUE);
} }
// Member: init
// Description: Initializes page for BrowserLang
// Inputs:
// Side effects:
void XFE_PrefsPageBrowserLang::init() void XFE_PrefsPageBrowserLang::read()
{ {
XP_ASSERT(m_prefsDataBrowserLang); XP_ASSERT(m_prefsDataBrowserLang);
PrefsDataBrowserLang *fep = m_prefsDataBrowserLang; PrefsDataBrowserLang *fep = m_prefsDataBrowserLang;
@ -947,12 +936,9 @@ void XFE_PrefsPageBrowserLang::install()
fe_installBrowserLang(new_accept_lang); fe_installBrowserLang(new_accept_lang);
} }
// Member: save
// Description:
// Inputs:
// Side effects:
void XFE_PrefsPageBrowserLang::save() // Write pref UI to PREF backend.
void XFE_PrefsPageBrowserLang::write()
{ {
PrefsDataBrowserLang *fep = m_prefsDataBrowserLang; PrefsDataBrowserLang *fep = m_prefsDataBrowserLang;

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

@ -509,12 +509,8 @@ void XFE_PrefsPageEditor::create()
setCreated(TRUE); setCreated(TRUE);
} }
// Member: init
// Description: Initializes page for Editor
// Inputs:
// Side effects:
void XFE_PrefsPageEditor::init() void XFE_PrefsPageEditor::read()
{ {
XP_ASSERT(m_prefsDataEditor); XP_ASSERT(m_prefsDataEditor);
PrefsDataEditor *w_data = m_prefsDataEditor; PrefsDataEditor *w_data = m_prefsDataEditor;
@ -659,12 +655,8 @@ void XFE_PrefsPageEditor::install()
EDT_EndBatchChanges(context); EDT_EndBatchChanges(context);
} }
// Member: save
// Description:
// Inputs:
// Side effects:
void XFE_PrefsPageEditor::save() void XFE_PrefsPageEditor::write()
{ {
// XFE_PrefsDialog *theDialog = getPrefsDialog(); // XFE_PrefsDialog *theDialog = getPrefsDialog();
PrefsDataEditor *fep = m_prefsDataEditor; PrefsDataEditor *fep = m_prefsDataEditor;
@ -1225,12 +1217,8 @@ void XFE_PrefsPageEditorAppearance::create()
setCreated(TRUE); setCreated(TRUE);
} }
// Member: init
// Description: Initializes page for EditorAppearance
// Inputs:
// Side effects:
void XFE_PrefsPageEditorAppearance::init() void XFE_PrefsPageEditorAppearance::read()
{ {
XP_ASSERT(m_prefsDataEditorAppearance); XP_ASSERT(m_prefsDataEditorAppearance);
PrefsDataEditorAppearance *fep = m_prefsDataEditorAppearance; PrefsDataEditorAppearance *fep = m_prefsDataEditorAppearance;
@ -1262,12 +1250,8 @@ void XFE_PrefsPageEditorAppearance::install()
EDT_EndBatchChanges(context); EDT_EndBatchChanges(context);
} }
// Member: save
// Description:
// Inputs:
// Side effects:
void XFE_PrefsPageEditorAppearance::save() void XFE_PrefsPageEditorAppearance::write()
{ {
// XFE_PrefsDialog *theDialog = getPrefsDialog(); // XFE_PrefsDialog *theDialog = getPrefsDialog();
PrefsDataEditorAppearance *fep = m_prefsDataEditorAppearance; PrefsDataEditorAppearance *fep = m_prefsDataEditorAppearance;
@ -1543,12 +1527,8 @@ void XFE_PrefsPageEditorPublish::create()
setCreated(TRUE); setCreated(TRUE);
} }
// Member: init
// Description: Initializes page for EditorPublish
// Inputs:
// Side effects:
void XFE_PrefsPageEditorPublish::init() void XFE_PrefsPageEditorPublish::read()
{ {
XP_ASSERT(m_prefsDataEditorPublish); XP_ASSERT(m_prefsDataEditorPublish);
@ -1673,12 +1653,8 @@ void XFE_PrefsPageEditorPublish::install()
EDT_EndBatchChanges(context); EDT_EndBatchChanges(context);
} }
// Member: save
// Description:
// Inputs:
// Side effects:
void XFE_PrefsPageEditorPublish::save() void XFE_PrefsPageEditorPublish::write()
{ {
// XFE_PrefsDialog *theDialog = getPrefsDialog(); // XFE_PrefsDialog *theDialog = getPrefsDialog();
PrefsDataEditorPublish *fep = m_prefsDataEditorPublish; PrefsDataEditorPublish *fep = m_prefsDataEditorPublish;

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

@ -479,12 +479,9 @@ void XFE_PrefsPageGeneralAppearance::create()
setCreated(TRUE); setCreated(TRUE);
} }
// Member: init
// Description: Initializes page for Appearance
// Inputs:
// Side effects:
void XFE_PrefsPageGeneralAppearance::init() // Read prefs from PREF backend.
void XFE_PrefsPageGeneralAppearance::read()
{ {
XP_ASSERT(m_prefsDataGeneralAppearance); XP_ASSERT(m_prefsDataGeneralAppearance);
@ -585,12 +582,9 @@ void XFE_PrefsPageGeneralAppearance::install()
} }
} }
// Member: save
// Description:
// Inputs:
// Side effects:
void XFE_PrefsPageGeneralAppearance::save() // Write prefs UI to PREF backend.
void XFE_PrefsPageGeneralAppearance::write()
{ {
PrefsDataGeneralAppearance *fep = m_prefsDataGeneralAppearance; PrefsDataGeneralAppearance *fep = m_prefsDataGeneralAppearance;
Boolean b; Boolean b;
@ -1197,12 +1191,9 @@ void XFE_PrefsPageGeneralFonts::create()
setCreated(TRUE); setCreated(TRUE);
} }
// Member: init
// Description: Initializes page for GeneralFonts
// Inputs:
// Side effects:
void XFE_PrefsPageGeneralFonts::init() // Read prefs from PREF backend.
void XFE_PrefsPageGeneralFonts::read()
{ {
XP_ASSERT(m_prefsDataGeneralFonts); XP_ASSERT(m_prefsDataGeneralFonts);
@ -1245,12 +1236,9 @@ void XFE_PrefsPageGeneralFonts::install()
fe_installGeneralFonts(); fe_installGeneralFonts();
} }
// Member: save
// Description:
// Inputs:
// Side effects:
void XFE_PrefsPageGeneralFonts::save() // Write prefs UI to PREF backend.
void XFE_PrefsPageGeneralFonts::write()
{ {
PrefsDataGeneralFonts *fep = m_prefsDataGeneralFonts; PrefsDataGeneralFonts *fep = m_prefsDataGeneralFonts;
@ -2113,12 +2101,9 @@ void XFE_PrefsPageGeneralColors::create()
setCreated(TRUE); setCreated(TRUE);
} }
// Member: init
// Description: Initializes page for GeneralColors
// Inputs:
// Side effects:
void XFE_PrefsPageGeneralColors::init() // Read prefs from PREF backend.
void XFE_PrefsPageGeneralColors::read()
{ {
XP_ASSERT(m_prefsDataGeneralColors); XP_ASSERT(m_prefsDataGeneralColors);
@ -2223,12 +2208,9 @@ void XFE_PrefsPageGeneralColors::install()
} }
} }
// Member: save
// Description:
// Inputs:
// Side effects:
void XFE_PrefsPageGeneralColors::save() // Write prefs UI to PREF backend.
void XFE_PrefsPageGeneralColors::write()
{ {
PrefsDataGeneralColors *fep = m_prefsDataGeneralColors; PrefsDataGeneralColors *fep = m_prefsDataGeneralColors;
Boolean b; Boolean b;
@ -2579,7 +2561,8 @@ void XFE_PrefsPageGeneralAdvanced::create()
} }
void XFE_PrefsPageGeneralAdvanced::init() // Read prefs from PREF backend.
void XFE_PrefsPageGeneralAdvanced::read()
{ {
XP_ASSERT(m_prefsDataGeneralAdvanced); XP_ASSERT(m_prefsDataGeneralAdvanced);
@ -2639,7 +2622,8 @@ void XFE_PrefsPageGeneralAdvanced::install()
} }
void XFE_PrefsPageGeneralAdvanced::save() // Write prefs UI to PREF backend.
void XFE_PrefsPageGeneralAdvanced::write()
{ {
PrefsDataGeneralAdvanced *fep = m_prefsDataGeneralAdvanced; PrefsDataGeneralAdvanced *fep = m_prefsDataGeneralAdvanced;
Boolean b; Boolean b;
@ -2693,6 +2677,10 @@ PrefsDataGeneralAdvanced *XFE_PrefsPageGeneralAdvanced::getData()
// ************************ General/Privacy ************************** // ************************ General/Privacy **************************
// ******************************************************************** // ********************************************************************
#define PREF_NETWORK_SIGNON_REMEMBERSIGNONS "network.signon.rememberSignons"
#define PREF_PRIVACY_WARN_NO_POLICY "privacy.warn_no_policy"
#define PREF_NETWORK_COOKIE_COOKIEBEHAVIOR "network.cookie.cookieBehavior"
#define PREF_NETWORK_COOKIE_WARNABOUTCOOKIES "network.cookie.warnAboutCookies"
XFE_PrefsPageGeneralPrivacy::XFE_PrefsPageGeneralPrivacy(XFE_PrefsDialog *dialog) XFE_PrefsPageGeneralPrivacy::XFE_PrefsPageGeneralPrivacy(XFE_PrefsDialog *dialog)
: XFE_PrefsPage(dialog), : XFE_PrefsPage(dialog),
@ -2887,60 +2875,61 @@ void XFE_PrefsPageGeneralPrivacy::create()
setCreated(TRUE); setCreated(TRUE);
} }
void XFE_PrefsPageGeneralPrivacy::init()
// Read prefs from PREF backend.
void XFE_PrefsPageGeneralPrivacy::read()
{ {
XP_ASSERT(m_prefsDataGeneralPrivacy); XP_ASSERT(m_prefsDataGeneralPrivacy);
PrefsDataGeneralPrivacy *fep = m_prefsDataGeneralPrivacy; PrefsDataGeneralPrivacy *fep = m_prefsDataGeneralPrivacy;
XFE_GlobalPrefs *prefs = &fe_globalPrefs; Boolean sensitive;
Boolean sensitive; XP_Bool initialBoolValue;
XP_Bool initialValue; int initialIntValue;
// Privacy // Privacy
sensitive = !PREF_PrefIsLocked("network.signon.rememberSignons"); sensitive = !PREF_PrefIsLocked(PREF_NETWORK_SIGNON_REMEMBERSIGNONS);
PREF_GetBoolPref("network.signon.rememberSignons", &initialValue); PREF_GetBoolPref(PREF_NETWORK_SIGNON_REMEMBERSIGNONS, &initialBoolValue);
XtVaSetValues(fep->save_logins_and_passwords, XtVaSetValues(fep->save_logins_and_passwords,
XmNset, initialValue, XmNset, initialBoolValue,
XmNsensitive, sensitive, XmNsensitive, sensitive,
NULL); NULL);
sensitive = !PREF_PrefIsLocked("privacy.warn_no_policy"); sensitive = !PREF_PrefIsLocked(PREF_PRIVACY_WARN_NO_POLICY);
PREF_GetBoolPref("privacy.warn_no_policy", &initialValue); PREF_GetBoolPref(PREF_PRIVACY_WARN_NO_POLICY, &initialBoolValue);
XtVaSetValues(fep->warn_no_privacy, XtVaSetValues(fep->warn_no_privacy,
XmNset, initialValue, XmNset, initialBoolValue,
XmNsensitive, sensitive, XmNsensitive, sensitive,
NULL); NULL);
// Cookies // Cookies
sensitive = !PREF_PrefIsLocked("network.cookie.cookieBehavior"); sensitive = !PREF_PrefIsLocked(PREF_NETWORK_COOKIE_COOKIEBEHAVIOR);
PREF_GetIntPref(PREF_NETWORK_COOKIE_COOKIEBEHAVIOR, &initialIntValue);
XtVaSetValues(fep->always_accept_cookie_toggle, XtVaSetValues(fep->always_accept_cookie_toggle,
XmNset, prefs->accept_cookie == NET_Accept, XmNset, initialIntValue == NET_Accept,
XmNsensitive, sensitive, XmNsensitive, sensitive,
0); 0);
XtVaSetValues(fep->no_foreign_cookie_toggle, XtVaSetValues(fep->no_foreign_cookie_toggle,
XmNset, prefs->accept_cookie == NET_DontAcceptForeign, XmNset, initialIntValue == NET_DontAcceptForeign,
XmNsensitive, sensitive, XmNsensitive, sensitive,
0); 0);
XtVaSetValues(fep->never_accept_cookie_toggle, XtVaSetValues(fep->never_accept_cookie_toggle,
XmNset, prefs->accept_cookie == NET_DontUse, XmNset, initialIntValue == NET_DontUse,
XmNsensitive, sensitive, XmNsensitive, sensitive,
0); 0);
sensitive = !PREF_PrefIsLocked("network.cookie.warnAboutCookies"); sensitive = !PREF_PrefIsLocked(PREF_NETWORK_COOKIE_WARNABOUTCOOKIES);
PREF_GetBoolPref(PREF_NETWORK_COOKIE_WARNABOUTCOOKIES, &initialBoolValue);
XtVaSetValues(fep->warn_cookie_toggle, XtVaSetValues(fep->warn_cookie_toggle,
XmNset, prefs->warn_accept_cookie, XmNset, initialBoolValue,
XmNsensitive, sensitive, XmNsensitive, sensitive,
0); 0);
setInitialized(TRUE); setInitialized(TRUE);
} }
// Do we need this? God this code is a mess.
void XFE_PrefsPageGeneralPrivacy::install() void XFE_PrefsPageGeneralPrivacy::install()
{ {
// Legacy code?
// fe_installGeneralAdvanced();
if (m_toolbar_needs_updating) { if (m_toolbar_needs_updating) {
// Notify whoever is interested in updating toolbar appearance // Notify whoever is interested in updating toolbar appearance
XFE_MozillaApp::theApp()-> XFE_MozillaApp::theApp()->
@ -2950,7 +2939,9 @@ void XFE_PrefsPageGeneralPrivacy::install()
} }
} }
void XFE_PrefsPageGeneralPrivacy::save()
// Write prefs UI to PREF backend.
void XFE_PrefsPageGeneralPrivacy::write()
{ {
PrefsDataGeneralPrivacy *fep = m_prefsDataGeneralPrivacy; PrefsDataGeneralPrivacy *fep = m_prefsDataGeneralPrivacy;
Boolean b; Boolean b;
@ -2959,31 +2950,31 @@ void XFE_PrefsPageGeneralPrivacy::save()
// Privacy // Privacy
XtVaGetValues(fep->save_logins_and_passwords, XmNset, &b, 0); XtVaGetValues(fep->save_logins_and_passwords, XmNset, &b, 0);
PREF_SetBoolPref("network.signon.rememberSignons", (XP_Bool)b); PREF_SetBoolPref(PREF_NETWORK_SIGNON_REMEMBERSIGNONS, (XP_Bool)b);
XtVaGetValues(fep->warn_no_privacy, XmNset, &b, 0); XtVaGetValues(fep->warn_no_privacy, XmNset, &b, 0);
PREF_SetBoolPref("privacy.warn_no_policy", (XP_Bool)b); PREF_SetBoolPref(PREF_PRIVACY_WARN_NO_POLICY, (XP_Bool)b);
// Cookies // Cookies
XtVaGetValues(fep->always_accept_cookie_toggle, XmNset, &b, 0); XtVaGetValues(fep->always_accept_cookie_toggle, XmNset, &b, 0);
if (b) { if (b) {
fe_globalPrefs.accept_cookie = NET_Accept; PREF_SetIntPref(PREF_NETWORK_COOKIE_COOKIEBEHAVIOR, NET_Accept);
} }
XtVaGetValues(fep->no_foreign_cookie_toggle, XmNset, &b, 0); XtVaGetValues(fep->no_foreign_cookie_toggle, XmNset, &b, 0);
if (b) { if (b) {
fe_globalPrefs.accept_cookie = NET_DontAcceptForeign; PREF_SetIntPref(PREF_NETWORK_COOKIE_COOKIEBEHAVIOR,
NET_DontAcceptForeign);
} }
XtVaGetValues(fep->never_accept_cookie_toggle, XmNset, &b, 0); XtVaGetValues(fep->never_accept_cookie_toggle, XmNset, &b, 0);
if (b) { if (b) {
fe_globalPrefs.accept_cookie = NET_DontUse; PREF_SetIntPref(PREF_NETWORK_COOKIE_COOKIEBEHAVIOR, NET_DontUse);
} }
XtVaGetValues(fep->warn_cookie_toggle, XmNset, &b, 0); XtVaGetValues(fep->warn_cookie_toggle, XmNset, &b, 0);
fe_globalPrefs.warn_accept_cookie = b; PREF_SetBoolPref(PREF_NETWORK_COOKIE_WARNABOUTCOOKIES, (XP_Bool)b);
install(); install();
} }
@ -3362,12 +3353,9 @@ void XFE_PrefsPageGeneralAppl::create()
setCreated(TRUE); setCreated(TRUE);
} }
// Member: init
// Description: Initializes page for GeneralAppl
// Inputs:
// Side effects:
void XFE_PrefsPageGeneralAppl::init() // Read prefs from PREF backend.
void XFE_PrefsPageGeneralAppl::read()
{ {
XFE_GlobalPrefs *prefs = &fe_globalPrefs; XFE_GlobalPrefs *prefs = &fe_globalPrefs;
XP_ASSERT(m_prefsDataGeneralAppl); XP_ASSERT(m_prefsDataGeneralAppl);
@ -3527,12 +3515,9 @@ void XFE_PrefsPageGeneralAppl::setModified(Boolean flag)
fep->helpers_changed = flag; fep->helpers_changed = flag;
} }
// Member: save
// Description:
// Inputs:
// Side effects:
void XFE_PrefsPageGeneralAppl::save() // Write prefs UI to PREF backend.
void XFE_PrefsPageGeneralAppl::write()
{ {
XP_ASSERT(m_prefsDataGeneralAppl); XP_ASSERT(m_prefsDataGeneralAppl);
PrefsDataGeneralAppl *fep = m_prefsDataGeneralAppl; PrefsDataGeneralAppl *fep = m_prefsDataGeneralAppl;
@ -4050,12 +4035,9 @@ void XFE_PrefsPageGeneralCache::create()
setCreated(TRUE); setCreated(TRUE);
} }
// Member: init
// Description: Initializes page for GeneralCache
// Inputs:
// Side effects:
void XFE_PrefsPageGeneralCache::init() // Read prefs from PREF backend.
void XFE_PrefsPageGeneralCache::read()
{ {
XP_ASSERT(m_prefsDataGeneralCache); XP_ASSERT(m_prefsDataGeneralCache);
@ -4108,12 +4090,9 @@ void XFE_PrefsPageGeneralCache::install()
fe_installGeneralCache(); fe_installGeneralCache();
} }
// Member: save
// Description:
// Inputs:
// Side effects:
void XFE_PrefsPageGeneralCache::save() // Write prefs UI to PREF backend.
void XFE_PrefsPageGeneralCache::write()
{ {
PrefsDataGeneralCache *fep = m_prefsDataGeneralCache; PrefsDataGeneralCache *fep = m_prefsDataGeneralCache;
Boolean b; Boolean b;
@ -4444,12 +4423,9 @@ void XFE_PrefsPageGeneralProxies::create()
setCreated(TRUE); setCreated(TRUE);
} }
// Member: init
// Description: Initializes page for GeneralProxies
// Inputs:
// Side effects:
void XFE_PrefsPageGeneralProxies::init() // Read prefs from PREF backend.
void XFE_PrefsPageGeneralProxies::read()
{ {
XP_ASSERT(m_prefsDataGeneralProxies); XP_ASSERT(m_prefsDataGeneralProxies);
@ -4495,12 +4471,9 @@ void XFE_PrefsPageGeneralProxies::install()
fe_installGeneralProxies(); fe_installGeneralProxies();
} }
// Member: save
// Description:
// Inputs:
// Side effects:
void XFE_PrefsPageGeneralProxies::save() // Write prefs UI to PREF backend.
void XFE_PrefsPageGeneralProxies::write()
{ {
PrefsDataGeneralProxies *fep = m_prefsDataGeneralProxies; PrefsDataGeneralProxies *fep = m_prefsDataGeneralProxies;
@ -5007,12 +4980,9 @@ void XFE_PrefsPageDiskSpace::create()
setCreated(TRUE); setCreated(TRUE);
} }
// Member: init
// Description: Initializes page for DiskSpace
// Inputs:
// Side effects:
void XFE_PrefsPageDiskSpace::init() // Read prefs from PREF backend.
void XFE_PrefsPageDiskSpace::read()
{ {
XP_ASSERT(m_prefsDataDiskSpace); XP_ASSERT(m_prefsDataDiskSpace);
@ -5115,12 +5085,9 @@ void XFE_PrefsPageDiskSpace::install()
fe_installDiskSpace(); fe_installDiskSpace();
} }
// Member: save
// Description:
// Inputs:
// Side effects:
void XFE_PrefsPageDiskSpace::save() // Write prefs UI to PREF backend.
void XFE_PrefsPageDiskSpace::write()
{ {
PrefsDataDiskSpace *fep = m_prefsDataDiskSpace; PrefsDataDiskSpace *fep = m_prefsDataDiskSpace;

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

@ -1148,7 +1148,7 @@ void XFE_PrefsPageMailNewsIdentity::create()
// Inputs: // Inputs:
// Side effects: // Side effects:
void XFE_PrefsPageMailNewsIdentity::init() void XFE_PrefsPageMailNewsIdentity::read()
{ {
XP_ASSERT(m_prefsDataMailNewsIdentity); XP_ASSERT(m_prefsDataMailNewsIdentity);
@ -1259,7 +1259,7 @@ Boolean XFE_PrefsPageMailNewsIdentity::verify()
// Inputs: // Inputs:
// Side effects: // Side effects:
void XFE_PrefsPageMailNewsIdentity::save() void XFE_PrefsPageMailNewsIdentity::write()
{ {
PrefsDataMailNewsIdentity *fep = m_prefsDataMailNewsIdentity; PrefsDataMailNewsIdentity *fep = m_prefsDataMailNewsIdentity;