зеркало из https://github.com/mozilla/pjs.git
Bug fix for #15327 - determination of length of edit fields
This commit is contained in:
Родитель
b6e8a79746
Коммит
73d6bbb1f3
|
@ -1147,8 +1147,6 @@ BOOL CWizardMachineApp::GoToNextNode()
|
|||
if (!CurrentNode)
|
||||
0; /* ??? */
|
||||
|
||||
if (!interpret(CurrentNode->navControls->onEnter, NULL))
|
||||
return FALSE;
|
||||
|
||||
BOOL isAContainerNode;
|
||||
BOOL haveChildNodes = TRUE;
|
||||
|
@ -1192,6 +1190,10 @@ BOOL CWizardMachineApp::GoToNextNode()
|
|||
fprintf(out, "------------** TERMINATED - Can't go past the last page **----------------\n");
|
||||
exit(10);
|
||||
}
|
||||
|
||||
if (!interpret(CurrentNode->navControls->onEnter, NULL))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -1601,13 +1603,26 @@ void CWizardMachineApp::BuildWidget(WIDGET* aWidget, CString iniSection, CString
|
|||
|
||||
GetPrivateProfileString(iniSection, "Start_y", "", buffer, MAX_SIZE, iniFile);
|
||||
aWidget->location.y = atoi(buffer);
|
||||
|
||||
|
||||
//aWidget->size = new DIMENSION;
|
||||
GetPrivateProfileString(iniSection, "Width", "", buffer, MAX_SIZE, iniFile);
|
||||
aWidget->size.width = atoi(buffer);
|
||||
GetPrivateProfileString(iniSection, "Height", "", buffer, MAX_SIZE, iniFile);
|
||||
aWidget->size.height = atoi(buffer);
|
||||
|
||||
//Fieldlen is of struct FIELDLEN - containing min,max,and length.
|
||||
GetPrivateProfileString(iniSection, "MaxLen", "", buffer, MAX_SIZE, iniFile);
|
||||
aWidget->fieldlen.max_len = atoi(buffer);
|
||||
GetPrivateProfileString(iniSection, "MinLen", "", buffer, MAX_SIZE, iniFile);
|
||||
aWidget->fieldlen.min_len = atoi(buffer);
|
||||
|
||||
if (aWidget->fieldlen.max_len)
|
||||
aWidget->fieldlen.length = aWidget->fieldlen.max_len;
|
||||
else if (aWidget->fieldlen.min_len)
|
||||
aWidget->fieldlen.length = aWidget->fieldlen.min_len;
|
||||
else
|
||||
aWidget->fieldlen.length = MAX_SIZE;
|
||||
|
||||
GetPrivateProfileString(iniSection, "dll", "", buffer, MAX_SIZE, iniFile);
|
||||
aWidget->action.dll = buffer;
|
||||
GetPrivateProfileString(iniSection, "function", "", buffer, MAX_SIZE, iniFile);
|
||||
|
|
|
@ -29,6 +29,12 @@ typedef struct DIMENSION
|
|||
int height;
|
||||
}DIMENSION;
|
||||
|
||||
typedef struct FIELDLEN
|
||||
{
|
||||
int length;
|
||||
int max_len;
|
||||
int min_len;
|
||||
}FIELDLEN;
|
||||
typedef struct OPTIONS
|
||||
{
|
||||
char* name[25];
|
||||
|
@ -46,6 +52,7 @@ typedef struct WIDGET
|
|||
CString description;
|
||||
POINT location;
|
||||
DIMENSION size;
|
||||
FIELDLEN fieldlen;
|
||||
ACTIONSET action;
|
||||
int numOfOptions;
|
||||
OPTIONS options;
|
||||
|
|
|
@ -844,7 +844,7 @@ void CWizardUI::CreateControls()
|
|||
curWidget->size.height,
|
||||
m_hWnd, 0, 0 );
|
||||
//Set maximum number of characters allowed per line - limit set to 200
|
||||
((CEdit*)curWidget->control)->SetLimitText(200);
|
||||
((CEdit*)curWidget->control)->SetLimitText(int(curWidget->fieldlen.length));
|
||||
((CEdit*)curWidget->control)->SetWindowText(curWidget->value);
|
||||
}
|
||||
else if (widgetType == "Button") {
|
||||
|
|
Загрузка…
Ссылка в новой задаче