fix for bug #17011 create copy (for config)invokes a window with text relevant to copy in it

This commit is contained in:
varada%netscape.com 1999-10-25 03:26:48 +00:00
Родитель 834fa26854
Коммит 5e9df119dd
7 изменённых файлов: 37 добавлений и 7 удалений

Просмотреть файл

@ -208,7 +208,7 @@ Start_y=218
Width=77
Height=17
onInit=Enable2(%CustomizationList%)
onCommand=VerifySet(%CustomizationList%,Choose an existing configuration or create a new one);SetGlobal(_FromConfigName,%CustomizationList%);NewConfigDialog(_NewConfigName);CopyDir(%Root%Configs\%_FromConfigName%,%Root%Configs\%_NewConfigName%);Reload(%Root%Configs\%_NewConfigName%)
onCommand=VerifySet(%CustomizationList%,Choose an existing configuration or create a new one);SetGlobal(_FromConfigName,%CustomizationList%);CopyConfig(_NewConfigName);CopyDir(%Root%Configs\%_FromConfigName%,%Root%Configs\%_NewConfigName%);Reload(%Root%Configs\%_NewConfigName%)
; GenerateFileList not required due to the way NewConfigDialog works,
; but this should be changed at some point...

Просмотреть файл

@ -23,6 +23,7 @@
#include "stdafx.h"
#include "WizardMachine.h"
#include "NewConfigDialog.h"
#include "globals.h"
#ifdef _DEBUG
#define new DEBUG_NEW
@ -76,6 +77,24 @@ END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CNewConfigDialog message handlers
BOOL CNewConfigDialog::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
CString DlgTitle = GetGlobal("DialogTitle");
if (!DlgTitle.IsEmpty())
{
SetWindowText(DlgTitle);
GetDlgItem(IDC_STATIC1)->SetWindowText("");
GetDlgItem(IDC_STATIC2)->SetWindowText("");
GetDlgItem(IDOK)->SetWindowText(DlgTitle);
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CNewConfigDialog::OnOK()
{
// TODO: Add extra validation here

Просмотреть файл

@ -51,6 +51,7 @@ protected:
// Generated message map functions
//{{AFX_MSG(CNewConfigDialog)
virtual BOOL OnInitDialog();
virtual void OnOK();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()

Просмотреть файл

@ -140,9 +140,9 @@ BEGIN
PUSHBUTTON "Cancel",IDCANCEL,209,98,50,14
LTEXT "Name of new configuration:",IDC_STATIC,7,7,173,13
LTEXT "The CCK tool creates a new configuration directory in C:\\CCK\\Configs. Within your new configuration directory, the CCK tool creates a \\Workspace directory, for example, C:\\CCK\\Configs\\CustomBuild01\\Workspace.",
IDC_STATIC,7,39,253,26
IDC_STATIC1,7,39,253,26
LTEXT "You can use the Workspace directory as a convenient place in which to store your custom files.",
IDC_STATIC,7,69,248,17
IDC_STATIC2,7,69,248,17
END
IDD_DIALOG112 DIALOG DISCARDABLE 0, 0, 187, 95

Просмотреть файл

@ -66,13 +66,15 @@ BOOL CInterpret::InitInstance()
//----------------------------------------------------------
BOOL CInterpret::NewConfig(WIDGET *curWidget, CString globalsName)
BOOL CInterpret::NewConfig(WIDGET *curWidget, CString globalsName, CString DialogTitle)
{
// This doesn't really belong here...
WIN32_FIND_DATA data;
HANDLE d;
CNewConfigDialog newDlg;
if (!DialogTitle.IsEmpty())
SetGlobal("DialogTitle", "CreateCopy");
newDlg.DoModal();
CString configField = newDlg.GetConfigName();
CString newDir = CString(customizationPath);
@ -685,7 +687,13 @@ BOOL CInterpret::interpret(CString cmds, WIDGET *curWidget)
else if (strcmp(pcmd, "NewConfigDialog") == 0)
{
if (curWidget)
NewConfig(curWidget, CString(parms));
NewConfig(curWidget, CString(parms),"");
}
else if (strcmp(pcmd, "CopyConfig") == 0)
{
if (curWidget)
NewConfig(curWidget, CString(parms),"Create Copy");
}
else if (strcmp(pcmd, "CopyDir") == 0)

Просмотреть файл

@ -33,7 +33,7 @@ class CInterpret
public:
CInterpret();
~CInterpret();
BOOL NewConfig(WIDGET *curWidget, CString globalsName);
BOOL NewConfig(WIDGET *curWidget, CString globalsName, CString DialogTitle);
BOOL BrowseFile(WIDGET *curWidget);
BOOL BrowseDir(WIDGET *curWidget);
BOOL Progress(); // Not actually used right now

Просмотреть файл

@ -25,6 +25,8 @@
#define IDC_HELP_BUTTON 1005
#define IDC_BUTTON1 1007
#define ID_HELP_EDIT 1007
#define IDC_STATIC1 1008
#define IDC_STATIC2 1009
#define IDC_PROGRESS1 1036
#define IDC_PROGESSTEXT_STATIC 1037
#define IDD_HELP_DLG 1537
@ -37,7 +39,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 142
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1008
#define _APS_NEXT_CONTROL_VALUE 1010
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif