зеркало из https://github.com/mozilla/pjs.git
Bug 147978 - The copy of an existing config should use its own Workspace
r=mitchf@netscape.com, shrutiv@netscape.com
This commit is contained in:
Родитель
7bf8d62ff3
Коммит
a1e1702ae7
|
@ -213,7 +213,7 @@ Start_y=218
|
||||||
Width=47
|
Width=47
|
||||||
Height=17
|
Height=17
|
||||||
onInit=Enable2(%CustomizationList%)
|
onInit=Enable2(%CustomizationList%)
|
||||||
onCommand=VerifySet(%CustomizationList%,Choose an existing configuration or create a new one);SetGlobal(_FromConfigName,%CustomizationList%);wizard.CopyConfig(_NewConfigName);CreateCache();GenerateDirList(CustomizationList,%Root%Configs\*.*);SelectItem(%_NewConfigName%);CopyDir(%Root%Configs\%_FromConfigName%,%Root%Configs\%_NewConfigName%)
|
onCommand=VerifySet(%CustomizationList%,Choose an existing configuration or create a new one);FillArray(%Root%Configs\%CustomizationList%);SetGlobal(_FromConfigName,%CustomizationList%);wizard.CopyConfig(_NewConfigName);GenerateDirList(CustomizationList,%Root%Configs\*.*);SelectItem(%_NewConfigName%);CopyDir(%Root%Configs\%_FromConfigName%,%Root%Configs\%_NewConfigName%);CreateCache(%Root%Configs\%_NewConfigName%)
|
||||||
|
|
||||||
; GenerateFileList not required due to the way NewConfigDialog works,
|
; GenerateFileList not required due to the way NewConfigDialog works,
|
||||||
; but this should be changed at some point...
|
; but this should be changed at some point...
|
||||||
|
|
|
@ -1230,14 +1230,19 @@ BOOL CWizardMachineApp::FillGlobalWidgetArray()
|
||||||
|
|
||||||
void CWizardMachineApp::CreateNewCache()
|
void CWizardMachineApp::CreateNewCache()
|
||||||
{
|
{
|
||||||
globs = fopen(CachePath, "w");
|
CreateNewCache(CachePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CWizardMachineApp::CreateNewCache(CString CPath)
|
||||||
|
{
|
||||||
|
globs = fopen(CPath, "w");
|
||||||
if (!globs)
|
if (!globs)
|
||||||
{
|
{
|
||||||
fprintf(out, "--------------** TERMINATED - Can't open cache file **----------------\n");
|
fprintf(out, "--------------** TERMINATED - Can't open cache file **----------------\n");
|
||||||
exit( 3 );
|
exit( 3 );
|
||||||
}
|
}
|
||||||
CString RootCache = Root + CacheFile;
|
CString RootCache = Root + CacheFile;
|
||||||
int CompareValue = RootCache.CompareNoCase(CachePath);
|
int CompareValue = RootCache.CompareNoCase(CPath);
|
||||||
|
|
||||||
for(int i=0; i< GlobalArrayIndex; i++)
|
for(int i=0; i< GlobalArrayIndex; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -67,6 +67,7 @@ public:
|
||||||
BOOL FillGlobalWidgetArray(CString file);
|
BOOL FillGlobalWidgetArray(CString file);
|
||||||
BOOL FillGlobalWidgetArray();
|
BOOL FillGlobalWidgetArray();
|
||||||
void CreateNewCache();
|
void CreateNewCache();
|
||||||
|
void CreateNewCache(CString CPath);
|
||||||
BOOL IsLastNode(NODE* treeNode);
|
BOOL IsLastNode(NODE* treeNode);
|
||||||
BOOL IsFirstNode(NODE* treeNode);
|
BOOL IsFirstNode(NODE* treeNode);
|
||||||
CString GetGlobalOptions(CString theName);
|
CString GetGlobalOptions(CString theName);
|
||||||
|
|
|
@ -963,7 +963,7 @@ BOOL CInterpret::interpret(CString cmds, WIDGET *curWidget)
|
||||||
"Information", MB_OK);
|
"Information", MB_OK);
|
||||||
exit(-30);
|
exit(-30);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write out the current cache
|
// Write out the current cache
|
||||||
if (!IsSameCache)
|
if (!IsSameCache)
|
||||||
theApp.CreateNewCache();
|
theApp.CreateNewCache();
|
||||||
|
@ -974,6 +974,20 @@ BOOL CInterpret::interpret(CString cmds, WIDGET *curWidget)
|
||||||
theApp.FillGlobalWidgetArray(CachePath); // Ignore failure, we'll write one out later
|
theApp.FillGlobalWidgetArray(CachePath); // Ignore failure, we'll write one out later
|
||||||
IsSameCache = FALSE;
|
IsSameCache = FALSE;
|
||||||
}
|
}
|
||||||
|
else if (strcmp(pcmd, "FillArray") == 0)
|
||||||
|
{
|
||||||
|
//Just FillGlobalWidgetArray from specified cache
|
||||||
|
CString arrayDir = replaceVars(parms, NULL);
|
||||||
|
CString ArrayPath = arrayDir + "\\" + CacheFile;
|
||||||
|
theApp.FillGlobalWidgetArray(ArrayPath);
|
||||||
|
IsSameCache = FALSE;
|
||||||
|
}
|
||||||
|
else if (strcmp(pcmd, "CreateCache") == 0)
|
||||||
|
{
|
||||||
|
CString cdir = replaceVars(parms, NULL);
|
||||||
|
CString cpath = cdir + "\\" + CacheFile;
|
||||||
|
theApp.CreateNewCache(cpath);
|
||||||
|
}
|
||||||
else if (strcmp(pcmd, "WriteCache") ==0)
|
else if (strcmp(pcmd, "WriteCache") ==0)
|
||||||
{
|
{
|
||||||
WIDGET *w = findWidget(parms);
|
WIDGET *w = findWidget(parms);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче