From 220334e70af8b72def7d55c896f6a5f91c09fb0a Mon Sep 17 00:00:00 2001 From: "varada%netscape.com" Date: Wed, 30 Aug 2000 01:26:39 +0000 Subject: [PATCH] Adding customized UserAgent String to the Browser all-ns.js git-svn-id: svn://10.0.0.236/trunk@77544 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/cck/ib/ib.cpp | 50 ++++++++++++++++++++++++++++++++++++++-- mozilla/cck/ib/script.ib | 1 + 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/mozilla/cck/ib/ib.cpp b/mozilla/cck/ib/ib.cpp index 131443c4613..7c4007421e2 100644 --- a/mozilla/cck/ib/ib.cpp +++ b/mozilla/cck/ib/ib.cpp @@ -37,7 +37,7 @@ CString Setup0Short = "&Typical"; CString Setup1Short = "C&ustom"; CString quotes = "\""; CString spaces = " "; - +BOOL prefDoesntExist = TRUE; COMPONENT Components[100]; int numComponents; int componentOrder; @@ -163,6 +163,7 @@ void ModifyPref(char *buffer, CString entity, CString newvalue) buf.Insert(i, newvalue); strcpy(buffer, (char *)(LPCTSTR) buf); + prefDoesntExist = FALSE; } int ModifyProperties(CString xpifile, CString entity, CString newvalue) @@ -202,6 +203,43 @@ int ModifyProperties(CString xpifile, CString entity, CString newvalue) rename(tempFile, xpifile); return rv; } +void AddPref(CString xpifile, CString entity, CString newvalue) +{ + + int rv = TRUE; + CString prefFile = xpifile; + CString tempFile = xpifile + ".temp"; + char properties[400]; + + ofstream tf(tempFile); + if(!tf) + { + rv = FALSE; + cout <<"Cannot open: "<