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: "<