mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 17:24:29 +00:00
ifdef-ing out LI (Location Independence) code that's not being used. There is intent to re-implement this later, hence the ifdef and not code-removal. r=alecf,neeti
This commit is contained in:
parent
402228ea38
commit
2658ce362e
@ -67,8 +67,10 @@ public:
|
||||
// Save pref files
|
||||
NS_IMETHOD SavePrefFile(void) = 0;
|
||||
NS_IMETHOD SavePrefFileAs(const char *filename) = 0;
|
||||
NS_IMETHOD SaveLIPrefFile(const char *filename) = 0;
|
||||
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
NS_IMETHOD SaveLIPrefFile(const char *filename) = 0;
|
||||
#endif /* MOZ_OLD_LI_STUFF */
|
||||
};
|
||||
|
||||
#endif /* nsIBrowserPrefsManager_h__ */
|
||||
|
@ -73,7 +73,9 @@ interface nsIPref : nsISupports {
|
||||
|
||||
// Config file input
|
||||
void ReadUserJSFile(in nsIFileSpec filename);
|
||||
void ReadLIJSFile(in nsIFileSpec filename);
|
||||
|
||||
// Commenting out: #ifdef MOZ_OLD_LI_STUFF
|
||||
// void ReadLIJSFile(in nsIFileSpec filename);
|
||||
|
||||
void EvaluateConfigScript(in string js_buffer, in PRUint32 length,
|
||||
in boolean bGlobalContext,
|
||||
@ -85,7 +87,10 @@ interface nsIPref : nsISupports {
|
||||
in boolean bCallbacks);
|
||||
|
||||
void SavePrefFileAs(in nsIFileSpec filename);
|
||||
void SaveLIPrefFile(in nsIFileSpec filename);
|
||||
|
||||
|
||||
// Commenting out: #ifdef MOZ_OLD_LI_STUFF
|
||||
// void SaveLIPrefFile(in nsIFileSpec filename);
|
||||
|
||||
/* JS Stuff - don't allow this to be scriptable */
|
||||
[noscript] readonly attribute JSContext configContext;
|
||||
|
@ -196,7 +196,11 @@ PREF_EvaluateConfigScript(const char * js_buffer, size_t length,
|
||||
*/
|
||||
|
||||
typedef enum { PREF_SETDEFAULT, PREF_SETUSER,
|
||||
PREF_LOCK, PREF_SETCONFIG, PREF_SETLI } PrefAction;
|
||||
PREF_LOCK, PREF_SETCONFIG
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
,PREF_SETLI
|
||||
#endif
|
||||
} PrefAction;
|
||||
|
||||
/*
|
||||
// <font color=blue>
|
||||
@ -362,8 +366,9 @@ PR_EXTERN(PrefResult) PREF_SavePrefFile(void);
|
||||
PR_EXTERN(PrefResult) PREF_SavePrefFileAs(const char *filename);
|
||||
|
||||
/* LI_STUFF */
|
||||
#ifdef MOZ_OLD_UI_STUFF
|
||||
PR_EXTERN(PrefResult) PREF_SaveLIPrefFile(const char *filename);
|
||||
|
||||
#endif /* MOZ_OLD_UI_STUFF */
|
||||
|
||||
/*
|
||||
* Called to handle the "about:config" command.
|
||||
|
@ -74,13 +74,16 @@ public:
|
||||
|
||||
#ifdef PREF_SUPPORT_OLD_PATH_STRINGS
|
||||
NS_IMETHOD ReadUserJSFile(const char *filename); // deprecated
|
||||
NS_IMETHOD ReadLIJSFile(const char *filename); // deprecated
|
||||
NS_IMETHOD EvaluateConfigScript(const char * js_buffer, PRUint32 length,
|
||||
const char* filename,
|
||||
PRBool bGlobalContext,
|
||||
PRBool bCallbacks); // deprecated
|
||||
NS_IMETHOD SavePrefFileAs(const char *filename);
|
||||
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
NS_IMETHOD ReadLIJSFile(const char *filename); // deprecated
|
||||
NS_IMETHOD SaveLIPrefFile(const char *filename);
|
||||
#endif
|
||||
|
||||
// Path prefs
|
||||
NS_IMETHOD CopyPathPref(const char *pref, char ** return_buf);
|
||||
@ -322,12 +325,14 @@ NS_IMETHODIMP nsPref::ReadUserJSFile(const char *filename)
|
||||
return _convertRes(PREF_ReadUserJSFile(filename));
|
||||
}
|
||||
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsPref::ReadLIJSFile(const char *filename)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
return _convertRes(PREF_ReadLIJSFile(filename));
|
||||
}
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsPref::EvaluateConfigScript(const char * js_buffer,
|
||||
@ -352,12 +357,14 @@ NS_IMETHODIMP nsPref::SavePrefFileAs(const char *filename)
|
||||
return _convertRes(PREF_SavePrefFileAs(filename));
|
||||
}
|
||||
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsPref::SaveLIPrefFile(const char *filename)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
return _convertRes(PREF_SaveLIPrefFile(filename));
|
||||
}
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsPref::CopyPathPref(const char *pref_name, char ** return_buffer)
|
||||
@ -382,6 +389,7 @@ NS_IMETHODIMP nsPref::ReadUserJSFile(nsIFileSpec* fileSpec)
|
||||
return pref_OpenFileSpec(fileSpec, PR_FALSE, PR_FALSE, PR_TRUE, PR_FALSE);
|
||||
}
|
||||
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsPref::ReadLIJSFile(nsIFileSpec* fileSpec)
|
||||
//----------------------------------------------------------------------------------------
|
||||
@ -391,6 +399,7 @@ NS_IMETHODIMP nsPref::ReadLIJSFile(nsIFileSpec* fileSpec)
|
||||
NS_IF_ADDREF(mLIFileSpec);
|
||||
return pref_OpenFileSpec(fileSpec, PR_FALSE, PR_FALSE, PR_FALSE, PR_FALSE);
|
||||
}
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsPref::EvaluateConfigScript(const char * js_buffer,
|
||||
@ -432,6 +441,8 @@ NS_IMETHODIMP nsPref::SavePrefFileAs(nsIFileSpec* fileSpec)
|
||||
return _convertRes(PREF_SavePrefFileSpecWith(fileSpec, (PLHashEnumerator)pref_savePref));
|
||||
}
|
||||
|
||||
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsPref::SaveLIPrefFile(nsIFileSpec* fileSpec)
|
||||
//----------------------------------------------------------------------------------------
|
||||
@ -441,6 +452,7 @@ NS_IMETHODIMP nsPref::SaveLIPrefFile(nsIFileSpec* fileSpec)
|
||||
PREF_SetSpecialPrefsLocal();
|
||||
return _convertRes(PREF_SavePrefFileSpecWith(fileSpec, (PLHashEnumerator)pref_saveLIPref));
|
||||
}
|
||||
#endif /* MOZ_OLD_LI_STUFF */
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsPref::SavePrefFile()
|
||||
|
@ -129,11 +129,14 @@ PR_STATIC_CALLBACK(JSBool) pref_NativeUnlockPref(JSContext *cx, JSObject *obj, u
|
||||
PR_STATIC_CALLBACK(JSBool) pref_NativeSetConfig(JSContext *cx, JSObject *obj, unsigned int argc, jsval *argv, jsval *rval);
|
||||
PR_STATIC_CALLBACK(JSBool) pref_NativeGetPref(JSContext *cx, JSObject *obj, unsigned int argc, jsval *argv, jsval *rval);
|
||||
PR_STATIC_CALLBACK(JSBool) pref_NativeGetLDAPAttr(JSContext *cx, JSObject *obj, unsigned int argc, jsval *argv, jsval *rval);
|
||||
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
/* LI_STUFF add nativelilocalpref */
|
||||
PR_STATIC_CALLBACK(JSBool) pref_NativeLILocalPref(JSContext *cx, JSObject *obj, unsigned int argc, jsval *argv, jsval *rval);
|
||||
/* LI_STUFF add NativeLIUserPref - does both lilocal and user at once */
|
||||
PR_STATIC_CALLBACK(JSBool) pref_NativeLIUserPref(JSContext *cx, JSObject *obj, unsigned int argc, jsval *argv, jsval *rval);
|
||||
PR_STATIC_CALLBACK(JSBool) pref_NativeLIDefPref(JSContext *cx, JSObject *obj, unsigned int argc, jsval *argv, jsval *rval);
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------------------*/
|
||||
#include "prefapi_private_data.h"
|
||||
@ -166,15 +169,23 @@ JSFunctionSpec autoconf_methods[] = {
|
||||
{ "config", pref_NativeSetConfig, 2,0,0 },
|
||||
{ "getPref", pref_NativeGetPref, 1,0,0 },
|
||||
{ "getLDAPAttributes", pref_NativeGetLDAPAttr, 4,0,0 },
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
{ "localPref", pref_NativeLILocalPref, 1,0,0 },
|
||||
{ "localUserPref", pref_NativeLIUserPref, 2,0,0 },
|
||||
{ "localDefPref", pref_NativeLIDefPref, 2,0,0 },
|
||||
#else
|
||||
{ "localPref", pref_NativeDefaultPref, 1,0,0 },
|
||||
{ "localUserPref", pref_NativeUserPref, 2,0,0 },
|
||||
{ "localDefPref", pref_NativeDefaultPref, 2,0,0 },
|
||||
#endif
|
||||
{ NULL, NULL, 0,0,0 }
|
||||
};
|
||||
|
||||
#ifdef PREF_SUPPORT_OLD_PATH_STRINGS
|
||||
char * gFileName = NULL;
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
char * gLIFileName = NULL;
|
||||
#endif
|
||||
#endif /*PREF_SUPPORT_OLD_PATH_STRINGS*/
|
||||
|
||||
struct CallbackNode* gCallbacks = NULL;
|
||||
@ -193,7 +204,9 @@ PLHashAllocOps pref_HashAllocOps = {
|
||||
#define PREF_IS_LOCKED(pref) ((pref)->flags & PREF_LOCKED)
|
||||
#define PREF_IS_CONFIG(pref) ((pref)->flags & PREF_CONFIG)
|
||||
#define PREF_HAS_USER_VALUE(pref) ((pref)->flags & PREF_USERSET)
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
#define PREF_HAS_LI_VALUE(pref) ((pref)->flags & PREF_LILOCAL) /* LI_STUFF */
|
||||
#endif
|
||||
#define PREF_TYPE(pref) (PrefType)((pref)->flags & PREF_VALUETYPE_MASK)
|
||||
|
||||
static JSBool pref_HashJSPref(unsigned int argc, jsval *argv, PrefAction action);
|
||||
@ -346,6 +359,7 @@ PRBool pref_VerifyLockFile(char* buf, long buflen)
|
||||
}
|
||||
|
||||
#ifdef PREF_SUPPORT_OLD_PATH_STRINGS
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
PR_IMPLEMENT(PrefResult) PREF_ReadLIJSFile(const char *filename)
|
||||
{
|
||||
PrefResult ok;
|
||||
@ -360,6 +374,7 @@ PR_IMPLEMENT(PrefResult) PREF_ReadLIJSFile(const char *filename)
|
||||
|
||||
return ok;
|
||||
}
|
||||
#endif
|
||||
#endif /* PREF_SUPPORT_OLD_PATH_STRINGS */
|
||||
|
||||
#ifdef PREF_SUPPORT_OLD_PATH_STRINGS
|
||||
@ -867,6 +882,7 @@ PREF_SetDefaultRectPref(const char *pref_name, PRInt16 left, PRInt16 top, PRInt1
|
||||
}
|
||||
|
||||
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
/* LI_STUFF this does the same as savePref except it omits the lilocal prefs from the file. */
|
||||
PR_IMPLEMENT(PrefResult)
|
||||
pref_saveLIPref(PLHashEntry *he, int i, void *arg)
|
||||
@ -931,7 +947,7 @@ pref_saveLIPref(PLHashEntry *he, int i, void *arg)
|
||||
}
|
||||
return PREF_NOERROR;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
PR_IMPLEMENT(PrefResult)
|
||||
pref_savePref(PLHashEntry *he, int i, void *arg)
|
||||
@ -1126,10 +1142,12 @@ PR_IMPLEMENT(PrefResult) PREF_SavePrefFile()
|
||||
}
|
||||
#endif /* PREF_SUPPORT_OLD_PATH_STRINGS */
|
||||
|
||||
#ifdef PREF_SUPPORT_OLD_PATH_STRINGS
|
||||
/*
|
||||
* We need to flag a bunch of prefs as local that aren't initialized via all.js.
|
||||
* This seems the safest way to do this.
|
||||
*/
|
||||
|
||||
PR_IMPLEMENT(PrefResult)
|
||||
PREF_SetSpecialPrefsLocal(void)
|
||||
{
|
||||
@ -1204,8 +1222,9 @@ PREF_SetSpecialPrefsLocal(void)
|
||||
}
|
||||
return PREF_OK;
|
||||
}
|
||||
#endif /* PREF_SUPPORT_OLD_PATH_STRINGS */
|
||||
|
||||
#ifdef PREF_SUPPORT_OLD_PATH_STRINGS
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
PR_IMPLEMENT(PrefResult) PREF_SaveLIPrefFile(const char *filename)
|
||||
{
|
||||
|
||||
@ -1216,7 +1235,7 @@ PR_IMPLEMENT(PrefResult) PREF_SaveLIPrefFile(const char *filename)
|
||||
(filename ? filename : gLIFileName),
|
||||
(PLHashEnumerator)pref_saveLIPref);
|
||||
}
|
||||
#endif /* PREF_SUPPORT_OLD_PATH_STRINGS*/
|
||||
#endif /* MOZ_OLD_LI_STUFF */
|
||||
|
||||
#ifdef PREF_SUPPORT_OLD_PATH_STRINGS
|
||||
PR_IMPLEMENT(PrefResult) PREF_SavePrefFileAs(const char *filename)
|
||||
@ -1602,6 +1621,7 @@ PREF_DeleteBranch(const char *branch_name)
|
||||
return PREF_NOERROR;
|
||||
}
|
||||
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
/* LI_STUFF add a function to clear the li pref
|
||||
does anyone use this??
|
||||
*/
|
||||
@ -1624,7 +1644,7 @@ PREF_ClearLIPref(const char *pref_name)
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
PR_IMPLEMENT(PrefResult)
|
||||
@ -1838,6 +1858,7 @@ PrefResult pref_HashPref(const char *key, PrefValue value, PrefType type, PrefAc
|
||||
pref->flags |= PREF_CONFIG;
|
||||
break;
|
||||
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
/* LI_STUFF turn the li stuff on */
|
||||
case PREF_SETLI:
|
||||
if ( !PREF_HAS_LI_VALUE(pref) ||
|
||||
@ -1849,7 +1870,7 @@ PrefResult pref_HashPref(const char *key, PrefValue value, PrefType type, PrefAc
|
||||
result = PREF_VALUECHANGED;
|
||||
}
|
||||
break;
|
||||
|
||||
#endif
|
||||
case PREF_SETUSER:
|
||||
/* If setting to the default value, then un-set the user value.
|
||||
Otherwise, set the user value only if it has changed */
|
||||
@ -1921,6 +1942,7 @@ JSBool PR_CALLBACK pref_NativeDefaultPref
|
||||
return pref_HashJSPref(argc, argv, PREF_SETDEFAULT);
|
||||
}
|
||||
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
/* LI_STUFF here is the hookup with js prefs calls */
|
||||
JSBool PR_CALLBACK pref_NativeLILocalPref
|
||||
(JSContext *cx, JSObject *obj, unsigned int argc, jsval *argv, jsval *rval)
|
||||
@ -1953,6 +1975,7 @@ JSBool PR_CALLBACK pref_NativeLIDefPref
|
||||
{
|
||||
return (JSBool)(pref_HashJSPref(argc, argv, PREF_SETDEFAULT) && pref_HashJSPref(argc, argv, PREF_SETLI));
|
||||
}
|
||||
#endif
|
||||
|
||||
JSBool PR_CALLBACK pref_NativeUserPref
|
||||
(JSContext *cx, JSObject *obj, unsigned int argc, jsval *argv, jsval *rval)
|
||||
|
@ -129,11 +129,14 @@ PR_STATIC_CALLBACK(JSBool) pref_NativeUnlockPref(JSContext *cx, JSObject *obj, u
|
||||
PR_STATIC_CALLBACK(JSBool) pref_NativeSetConfig(JSContext *cx, JSObject *obj, unsigned int argc, jsval *argv, jsval *rval);
|
||||
PR_STATIC_CALLBACK(JSBool) pref_NativeGetPref(JSContext *cx, JSObject *obj, unsigned int argc, jsval *argv, jsval *rval);
|
||||
PR_STATIC_CALLBACK(JSBool) pref_NativeGetLDAPAttr(JSContext *cx, JSObject *obj, unsigned int argc, jsval *argv, jsval *rval);
|
||||
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
/* LI_STUFF add nativelilocalpref */
|
||||
PR_STATIC_CALLBACK(JSBool) pref_NativeLILocalPref(JSContext *cx, JSObject *obj, unsigned int argc, jsval *argv, jsval *rval);
|
||||
/* LI_STUFF add NativeLIUserPref - does both lilocal and user at once */
|
||||
PR_STATIC_CALLBACK(JSBool) pref_NativeLIUserPref(JSContext *cx, JSObject *obj, unsigned int argc, jsval *argv, jsval *rval);
|
||||
PR_STATIC_CALLBACK(JSBool) pref_NativeLIDefPref(JSContext *cx, JSObject *obj, unsigned int argc, jsval *argv, jsval *rval);
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------------------*/
|
||||
#include "prefapi_private_data.h"
|
||||
@ -166,15 +169,23 @@ JSFunctionSpec autoconf_methods[] = {
|
||||
{ "config", pref_NativeSetConfig, 2,0,0 },
|
||||
{ "getPref", pref_NativeGetPref, 1,0,0 },
|
||||
{ "getLDAPAttributes", pref_NativeGetLDAPAttr, 4,0,0 },
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
{ "localPref", pref_NativeLILocalPref, 1,0,0 },
|
||||
{ "localUserPref", pref_NativeLIUserPref, 2,0,0 },
|
||||
{ "localDefPref", pref_NativeLIDefPref, 2,0,0 },
|
||||
#else
|
||||
{ "localPref", pref_NativeDefaultPref, 1,0,0 },
|
||||
{ "localUserPref", pref_NativeUserPref, 2,0,0 },
|
||||
{ "localDefPref", pref_NativeDefaultPref, 2,0,0 },
|
||||
#endif
|
||||
{ NULL, NULL, 0,0,0 }
|
||||
};
|
||||
|
||||
#ifdef PREF_SUPPORT_OLD_PATH_STRINGS
|
||||
char * gFileName = NULL;
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
char * gLIFileName = NULL;
|
||||
#endif
|
||||
#endif /*PREF_SUPPORT_OLD_PATH_STRINGS*/
|
||||
|
||||
struct CallbackNode* gCallbacks = NULL;
|
||||
@ -193,7 +204,9 @@ PLHashAllocOps pref_HashAllocOps = {
|
||||
#define PREF_IS_LOCKED(pref) ((pref)->flags & PREF_LOCKED)
|
||||
#define PREF_IS_CONFIG(pref) ((pref)->flags & PREF_CONFIG)
|
||||
#define PREF_HAS_USER_VALUE(pref) ((pref)->flags & PREF_USERSET)
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
#define PREF_HAS_LI_VALUE(pref) ((pref)->flags & PREF_LILOCAL) /* LI_STUFF */
|
||||
#endif
|
||||
#define PREF_TYPE(pref) (PrefType)((pref)->flags & PREF_VALUETYPE_MASK)
|
||||
|
||||
static JSBool pref_HashJSPref(unsigned int argc, jsval *argv, PrefAction action);
|
||||
@ -346,6 +359,7 @@ PRBool pref_VerifyLockFile(char* buf, long buflen)
|
||||
}
|
||||
|
||||
#ifdef PREF_SUPPORT_OLD_PATH_STRINGS
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
PR_IMPLEMENT(PrefResult) PREF_ReadLIJSFile(const char *filename)
|
||||
{
|
||||
PrefResult ok;
|
||||
@ -360,6 +374,7 @@ PR_IMPLEMENT(PrefResult) PREF_ReadLIJSFile(const char *filename)
|
||||
|
||||
return ok;
|
||||
}
|
||||
#endif
|
||||
#endif /* PREF_SUPPORT_OLD_PATH_STRINGS */
|
||||
|
||||
#ifdef PREF_SUPPORT_OLD_PATH_STRINGS
|
||||
@ -867,6 +882,7 @@ PREF_SetDefaultRectPref(const char *pref_name, PRInt16 left, PRInt16 top, PRInt1
|
||||
}
|
||||
|
||||
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
/* LI_STUFF this does the same as savePref except it omits the lilocal prefs from the file. */
|
||||
PR_IMPLEMENT(PrefResult)
|
||||
pref_saveLIPref(PLHashEntry *he, int i, void *arg)
|
||||
@ -931,7 +947,7 @@ pref_saveLIPref(PLHashEntry *he, int i, void *arg)
|
||||
}
|
||||
return PREF_NOERROR;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
PR_IMPLEMENT(PrefResult)
|
||||
pref_savePref(PLHashEntry *he, int i, void *arg)
|
||||
@ -1126,10 +1142,12 @@ PR_IMPLEMENT(PrefResult) PREF_SavePrefFile()
|
||||
}
|
||||
#endif /* PREF_SUPPORT_OLD_PATH_STRINGS */
|
||||
|
||||
#ifdef PREF_SUPPORT_OLD_PATH_STRINGS
|
||||
/*
|
||||
* We need to flag a bunch of prefs as local that aren't initialized via all.js.
|
||||
* This seems the safest way to do this.
|
||||
*/
|
||||
|
||||
PR_IMPLEMENT(PrefResult)
|
||||
PREF_SetSpecialPrefsLocal(void)
|
||||
{
|
||||
@ -1204,8 +1222,9 @@ PREF_SetSpecialPrefsLocal(void)
|
||||
}
|
||||
return PREF_OK;
|
||||
}
|
||||
#endif /* PREF_SUPPORT_OLD_PATH_STRINGS */
|
||||
|
||||
#ifdef PREF_SUPPORT_OLD_PATH_STRINGS
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
PR_IMPLEMENT(PrefResult) PREF_SaveLIPrefFile(const char *filename)
|
||||
{
|
||||
|
||||
@ -1216,7 +1235,7 @@ PR_IMPLEMENT(PrefResult) PREF_SaveLIPrefFile(const char *filename)
|
||||
(filename ? filename : gLIFileName),
|
||||
(PLHashEnumerator)pref_saveLIPref);
|
||||
}
|
||||
#endif /* PREF_SUPPORT_OLD_PATH_STRINGS*/
|
||||
#endif /* MOZ_OLD_LI_STUFF */
|
||||
|
||||
#ifdef PREF_SUPPORT_OLD_PATH_STRINGS
|
||||
PR_IMPLEMENT(PrefResult) PREF_SavePrefFileAs(const char *filename)
|
||||
@ -1602,6 +1621,7 @@ PREF_DeleteBranch(const char *branch_name)
|
||||
return PREF_NOERROR;
|
||||
}
|
||||
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
/* LI_STUFF add a function to clear the li pref
|
||||
does anyone use this??
|
||||
*/
|
||||
@ -1624,7 +1644,7 @@ PREF_ClearLIPref(const char *pref_name)
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
PR_IMPLEMENT(PrefResult)
|
||||
@ -1838,6 +1858,7 @@ PrefResult pref_HashPref(const char *key, PrefValue value, PrefType type, PrefAc
|
||||
pref->flags |= PREF_CONFIG;
|
||||
break;
|
||||
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
/* LI_STUFF turn the li stuff on */
|
||||
case PREF_SETLI:
|
||||
if ( !PREF_HAS_LI_VALUE(pref) ||
|
||||
@ -1849,7 +1870,7 @@ PrefResult pref_HashPref(const char *key, PrefValue value, PrefType type, PrefAc
|
||||
result = PREF_VALUECHANGED;
|
||||
}
|
||||
break;
|
||||
|
||||
#endif
|
||||
case PREF_SETUSER:
|
||||
/* If setting to the default value, then un-set the user value.
|
||||
Otherwise, set the user value only if it has changed */
|
||||
@ -1921,6 +1942,7 @@ JSBool PR_CALLBACK pref_NativeDefaultPref
|
||||
return pref_HashJSPref(argc, argv, PREF_SETDEFAULT);
|
||||
}
|
||||
|
||||
#ifdef MOZ_OLD_LI_STUFF
|
||||
/* LI_STUFF here is the hookup with js prefs calls */
|
||||
JSBool PR_CALLBACK pref_NativeLILocalPref
|
||||
(JSContext *cx, JSObject *obj, unsigned int argc, jsval *argv, jsval *rval)
|
||||
@ -1953,6 +1975,7 @@ JSBool PR_CALLBACK pref_NativeLIDefPref
|
||||
{
|
||||
return (JSBool)(pref_HashJSPref(argc, argv, PREF_SETDEFAULT) && pref_HashJSPref(argc, argv, PREF_SETLI));
|
||||
}
|
||||
#endif
|
||||
|
||||
JSBool PR_CALLBACK pref_NativeUserPref
|
||||
(JSContext *cx, JSObject *obj, unsigned int argc, jsval *argv, jsval *rval)
|
||||
|
@ -49,7 +49,11 @@ PR_EXTERN(JSBool) PR_CALLBACK pref_BranchCallback(JSContext *cx, JSScript *scrip
|
||||
PR_EXTERN(PrefResult) pref_savePref(PLHashEntry *he, int i, void *arg);
|
||||
PR_EXTERN(PrefResult) pref_saveLIPref(PLHashEntry *he, int i, void *arg);
|
||||
PR_EXTERN(PRBool) pref_VerifyLockFile(char* buf, long buflen);
|
||||
|
||||
#ifdef MOZ_OLD_UI_STUFF
|
||||
PR_EXTERN(PrefResult) PREF_SetSpecialPrefsLocal(void);
|
||||
#endif /* MOZ_OLD_UI_STUFF */
|
||||
|
||||
PR_EXTERN(int) pref_CompareStrings(const void *v1, const void *v2, void* unused);
|
||||
extern JSBool pref_InitInitialObjects(void);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user