From bfca7cdf856cdd6fb99dabb4fc781ac29edc9ed2 Mon Sep 17 00:00:00 2001 From: "varada%netscape.com" Date: Fri, 8 Dec 2000 04:00:29 +0000 Subject: [PATCH] fix for bug#57340; custom components not showing up in build;added additional field git-svn-id: svn://10.0.0.236/trunk@83394 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/cck/ib/comp.cpp | 2 ++ mozilla/cck/ib/comp.h | 1 + mozilla/cck/ib/ib.cpp | 13 +++++++++++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/mozilla/cck/ib/comp.cpp b/mozilla/cck/ib/comp.cpp index d788be40b6a..6f112086e6c 100644 --- a/mozilla/cck/ib/comp.cpp +++ b/mozilla/cck/ib/comp.cpp @@ -49,6 +49,8 @@ int BuildComponentList(COMPONENT *comps, int *compNum, CString iniSrcPath,int in comps[*compNum].selected = (strstr(attr, "SELECTED") != NULL); comps[*compNum].invisible = (strstr(attr, "INVISIBLE") != NULL); comps[*compNum].launchapp = (strstr(attr, "LAUNCHAPP") != NULL); + comps[*compNum].additional = (strstr(attr, "ADDITIONAL") != NULL); + if (!(comps[*compNum].selected && comps[*compNum].invisible && invisibleCount)) { diff --git a/mozilla/cck/ib/comp.h b/mozilla/cck/ib/comp.h index 4e25c930735..f8b69815fd5 100644 --- a/mozilla/cck/ib/comp.h +++ b/mozilla/cck/ib/comp.h @@ -6,6 +6,7 @@ typedef struct s_component { BOOL selected; BOOL invisible; BOOL launchapp; + BOOL additional; } COMPONENT; extern "C" __declspec(dllexport) diff --git a/mozilla/cck/ib/ib.cpp b/mozilla/cck/ib/ib.cpp index d4311be911f..f44d75ae26f 100644 --- a/mozilla/cck/ib/ib.cpp +++ b/mozilla/cck/ib/ib.cpp @@ -545,9 +545,16 @@ void init_components() // Turn off components that aren't selected for (i=0; ivalue, Components[i].name) == NULL) && (!(Components[i].selected && Components[i].invisible))) + { + if ((strstr(w->value, Components[i].name) == NULL)) + { + if (!(Components[i].selected && Components[i].invisible)) Components[i].selected = FALSE; - + } + else + if (Components[i].additional) + Components[i].selected = TRUE; + } } /*Post Beta - we will use the DISABLED key. Now this is implemented the round about way here. @@ -583,6 +590,8 @@ void invisible() Cee.Format("C%d", componentOrder); WritePrivateProfileString("Setup Type0",(LPCTSTR)Cee,(LPCTSTR)component, iniDstPath); WritePrivateProfileString("Setup Type1",(LPCTSTR)Cee,(LPCTSTR)component, iniDstPath); + if (Components[i].additional && !(Components[i].launchapp) && !(Components[i].invisible)) + WritePrivateProfileString(Components[i].compname, "Attributes", "SELECTED|ADDITIONAL", iniDstPath); componentOrder++; } else