Added support for URLDisplayLength to DynamicText widgets.
Fixes bug 119400
This commit is contained in:
Родитель
711b8ec900
Коммит
5a4fc11bdc
|
@ -83,6 +83,7 @@ Height=15
|
||||||
[Widget 7]
|
[Widget 7]
|
||||||
Type=DynamicText
|
Type=DynamicText
|
||||||
Name=LargeAnimPath
|
Name=LargeAnimPath
|
||||||
|
URLDisplayLength=78
|
||||||
Value=
|
Value=
|
||||||
Start_x=11
|
Start_x=11
|
||||||
Start_y=93
|
Start_y=93
|
||||||
|
@ -92,6 +93,7 @@ Height=15
|
||||||
[Widget 972]
|
[Widget 972]
|
||||||
Type=DynamicText
|
Type=DynamicText
|
||||||
Name=LargeStillPath
|
Name=LargeStillPath
|
||||||
|
URLDisplayLength=78
|
||||||
Value=
|
Value=
|
||||||
Start_x=11
|
Start_x=11
|
||||||
Start_y=125
|
Start_y=125
|
||||||
|
|
|
@ -81,6 +81,7 @@ Height=20
|
||||||
[Widget 6]
|
[Widget 6]
|
||||||
Type=DynamicText
|
Type=DynamicText
|
||||||
Name=ShellBgBitmap
|
Name=ShellBgBitmap
|
||||||
|
URLDisplayLength=47
|
||||||
Value=
|
Value=
|
||||||
Start_x=12
|
Start_x=12
|
||||||
Start_y=86
|
Start_y=86
|
||||||
|
@ -203,6 +204,7 @@ Height=12
|
||||||
[Widget 15]
|
[Widget 15]
|
||||||
Type=DynamicText
|
Type=DynamicText
|
||||||
Name=ShellInstallTextFile
|
Name=ShellInstallTextFile
|
||||||
|
URLDisplayLength=47
|
||||||
Value=
|
Value=
|
||||||
Start_x=12
|
Start_x=12
|
||||||
Start_y=223
|
Start_y=223
|
||||||
|
|
|
@ -64,6 +64,7 @@ Height=13
|
||||||
[Widget 2]
|
[Widget 2]
|
||||||
Type=DynamicText
|
Type=DynamicText
|
||||||
Name=IntSetupBgBitmap
|
Name=IntSetupBgBitmap
|
||||||
|
URLDisplayLength=47
|
||||||
Value=
|
Value=
|
||||||
Start_x=11
|
Start_x=11
|
||||||
Start_y=86
|
Start_y=86
|
||||||
|
|
|
@ -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);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);SetGlobal(_FromConfigName,%CustomizationList%);wizard.CopyConfig(_NewConfigName);CreateCache();GenerateDirList(CustomizationList,%Root%Configs\*.*);SelectItem(%_NewConfigName%);CopyDir(%Root%Configs\%_FromConfigName%,%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...
|
||||||
|
|
|
@ -122,6 +122,7 @@ Height=8
|
||||||
[Widget 11]
|
[Widget 11]
|
||||||
Type=DynamicText
|
Type=DynamicText
|
||||||
Name=CustomBookmarkFile
|
Name=CustomBookmarkFile
|
||||||
|
URLDisplayLength=47
|
||||||
Value=
|
Value=
|
||||||
Start_x=11
|
Start_x=11
|
||||||
Start_y=126
|
Start_y=126
|
||||||
|
|
|
@ -94,6 +94,7 @@ onInit=DisableWidget(%lPlatform%,Mac OS)
|
||||||
[Widget 1910]
|
[Widget 1910]
|
||||||
Type=DynamicText
|
Type=DynamicText
|
||||||
Name=ReadMeFile
|
Name=ReadMeFile
|
||||||
|
URLDisplayLength=47
|
||||||
Value=
|
Value=
|
||||||
Start_x=11
|
Start_x=11
|
||||||
Start_y=138
|
Start_y=138
|
||||||
|
|
|
@ -1353,6 +1353,10 @@ void CWizardMachineApp::BuildWidget(WIDGET* aWidget, CString iniSection, CString
|
||||||
GetPrivateProfileString(iniSection, "Attrib", "", buffer, MAX_SIZE, iniFile);
|
GetPrivateProfileString(iniSection, "Attrib", "", buffer, MAX_SIZE, iniFile);
|
||||||
aWidget->attrib = buffer;
|
aWidget->attrib = buffer;
|
||||||
|
|
||||||
|
GetPrivateProfileString(iniSection, "URLDisplayLength", "", buffer, MAX_SIZE, iniFile);
|
||||||
|
aWidget->URLDisplayLength = atoi(buffer);;
|
||||||
|
|
||||||
|
|
||||||
GetPrivateProfileString(iniSection, "Options", "", buffer, MAX_SIZE, iniFile);
|
GetPrivateProfileString(iniSection, "Options", "", buffer, MAX_SIZE, iniFile);
|
||||||
aWidget->items = buffer;
|
aWidget->items = buffer;
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,7 @@ typedef struct WIDGET
|
||||||
CString target;
|
CString target;
|
||||||
CString description;
|
CString description;
|
||||||
CString showinsection; // Used in the ShowSection command to show and hide widgets based on selection in a listbox.
|
CString showinsection; // Used in the ShowSection command to show and hide widgets based on selection in a listbox.
|
||||||
|
int URLDisplayLength;
|
||||||
POINT location;
|
POINT location;
|
||||||
DIMENSION size;
|
DIMENSION size;
|
||||||
FIELDLEN fieldlen;
|
FIELDLEN fieldlen;
|
||||||
|
|
|
@ -678,7 +678,7 @@ void CWizardUI::CreateControls()
|
||||||
|
|
||||||
else if (widgetType == "DynamicText") {
|
else if (widgetType == "DynamicText") {
|
||||||
curWidget->control = new CStatic;
|
curWidget->control = new CStatic;
|
||||||
curWidget->display = theInterpreter->GetTrimFile(curWidget->value);
|
curWidget->display = theInterpreter->GetTrimFile(curWidget->value,curWidget->URLDisplayLength);
|
||||||
rv = ((CStatic*)curWidget->control)->Create(curWidget->display, SS_LEFT, tmpRect, this, ID);
|
rv = ((CStatic*)curWidget->control)->Create(curWidget->display, SS_LEFT, tmpRect, this, ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -153,7 +153,7 @@ BOOL CInterpret::BrowseFile(WIDGET *curWidget)
|
||||||
if (tmpWidget->type == "EditBox")
|
if (tmpWidget->type == "EditBox")
|
||||||
tmpWidget->display = fullFileName;
|
tmpWidget->display = fullFileName;
|
||||||
else
|
else
|
||||||
tmpWidget->display = GetTrimFile(fullFileName);
|
tmpWidget->display = GetTrimFile(fullFileName,tmpWidget->URLDisplayLength);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
((CEdit*)tmpWidget->control)->SetWindowText(tmpWidget->display);
|
((CEdit*)tmpWidget->control)->SetWindowText(tmpWidget->display);
|
||||||
|
@ -624,15 +624,15 @@ BOOL CInterpret::CallDLL(char *dll, char *proc, char *parms, WIDGET *curWidget)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
CString CInterpret::GetTrimFile(CString filePath)
|
CString CInterpret::GetTrimFile(CString filePath, int URLDisplayLength)
|
||||||
{
|
{
|
||||||
int fileLength=0;
|
int fileLength=0;
|
||||||
int findSlash=0;
|
int findSlash=0;
|
||||||
fileLength = filePath.GetLength();
|
fileLength = filePath.GetLength();
|
||||||
if (fileLength > FILEPATHLENGTH)
|
if (fileLength > URLDisplayLength)
|
||||||
{
|
{
|
||||||
findSlash = filePath.Find('\\');
|
findSlash = filePath.Find('\\');
|
||||||
filePath.Delete(findSlash+1,(fileLength - FILEPATHLENGTH));
|
filePath.Delete(findSlash+1,(fileLength - URLDisplayLength));
|
||||||
filePath.Insert(findSlash+1,"...");
|
filePath.Insert(findSlash+1,"...");
|
||||||
}
|
}
|
||||||
return filePath;
|
return filePath;
|
||||||
|
@ -891,6 +891,7 @@ BOOL CInterpret::interpret(CString cmds, WIDGET *curWidget)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (strcmp(pcmd, "IsNonAscii") == 0)
|
else if (strcmp(pcmd, "IsNonAscii") == 0)
|
||||||
{
|
{
|
||||||
// check if user agent string contains non-ascii characters
|
// check if user agent string contains non-ascii characters
|
||||||
|
@ -1231,6 +1232,7 @@ BOOL CInterpret::interpret(CString cmds, WIDGET *curWidget)
|
||||||
{
|
{
|
||||||
if (curWidget)
|
if (curWidget)
|
||||||
NewConfig(curWidget, CString(parms),"Create Copy");
|
NewConfig(curWidget, CString(parms),"Create Copy");
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
// Delete a configuration
|
// Delete a configuration
|
||||||
|
|
|
@ -53,7 +53,7 @@ public:
|
||||||
BOOL CInterpret::GetRegistryKey( HKEY key, const char *subkey, char *retdata );
|
BOOL CInterpret::GetRegistryKey( HKEY key, const char *subkey, char *retdata );
|
||||||
BOOL CInterpret::OpenBrowser(const char *url);
|
BOOL CInterpret::OpenBrowser(const char *url);
|
||||||
BOOL CInterpret::OpenViewer(const char *url);
|
BOOL CInterpret::OpenViewer(const char *url);
|
||||||
CString CInterpret::GetTrimFile(CString filePath);
|
CString CInterpret::GetTrimFile(CString filePath, int URLDisplayLength);
|
||||||
|
|
||||||
// Overrides
|
// Overrides
|
||||||
// ClassWizard generated virtual function overrides
|
// ClassWizard generated virtual function overrides
|
||||||
|
|
|
@ -55,6 +55,7 @@ typedef struct WIDGET
|
||||||
CString target;
|
CString target;
|
||||||
CString description;
|
CString description;
|
||||||
CString showinsection; // Used in the ShowSection command to show and hide widgets based on selection in a listbox.
|
CString showinsection; // Used in the ShowSection command to show and hide widgets based on selection in a listbox.
|
||||||
|
int URLDisplayLength;
|
||||||
POINT location;
|
POINT location;
|
||||||
DIMENSION size;
|
DIMENSION size;
|
||||||
FIELDLEN fieldlen;
|
FIELDLEN fieldlen;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче