BOOL CPublishPrefs::ApplyChanges() { PREF_SetBoolPref("editor.publish_keep_links",(XP_Bool)m_bAutoAdjustLinks); PREF_SetBoolPref("editor.publish_keep_images",(XP_Bool)m_bKeepImagesWithDoc); PREF_SetCharPref("editor.publish_location",LPCSTR(m_strPublishLocation)); PREF_SetCharPref("editor.publish_browse_location",LPCSTR(m_strBrowseLocation)); return TRUE; }
void CAdvSearchOptionsDlg::OnOK() { UpdateData(); PREF_SetBoolPref("mailnews.searchSubFolders",(XP_Bool)m_bIncludeSubfolders); XP_Bool bSearchServer = m_iSearchArea ? 1 : 0; PREF_SetBoolPref("mailnews.searchServer", bSearchServer); m_bChanges = TRUE; GetParent()->PostMessage(WM_ADVANCED_OPTIONS_DONE); OnClose(); }
NS_IMETHODIMP nsPrefBranch::SetBoolPref(const char *aPrefName, PRInt32 aValue) { const char *pref; nsresult rv; rv = getValidatedPrefName(aPrefName, &pref); if (NS_SUCCEEDED(rv)) { rv = PREF_SetBoolPref(pref, aValue, mIsDefault); } return rv; }
nsresult pref_SetPrefTuple(const PrefTuple &aPref, bool set_default) { switch (aPref.type) { case PrefTuple::PREF_STRING: return PREF_SetCharPref(aPref.key.get(), aPref.stringVal.get(), set_default); case PrefTuple::PREF_INT: return PREF_SetIntPref(aPref.key.get(), aPref.intVal, set_default); case PrefTuple::PREF_BOOL: return PREF_SetBoolPref(aPref.key.get(), aPref.boolVal, set_default); } NS_NOTREACHED("Unknown type"); return NS_ERROR_INVALID_ARG; }
BOOL CEditorPrefs2::ApplyChanges() { PREF_SetBoolPref("editor.page_updown_move_cursor",(XP_Bool)m_bUpDownMoveCursor); return TRUE; }