LicenseBkColor now supports /windows (default = white) and /grey (default = grey)
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2570 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
3c29d31593
commit
0568d17ef7
3 changed files with 21 additions and 4 deletions
|
@ -317,6 +317,8 @@ CEXEBuild::CEXEBuild()
|
||||||
uDefCodePage=CP_ACP;
|
uDefCodePage=CP_ACP;
|
||||||
|
|
||||||
use_first_insttype=true;
|
use_first_insttype=true;
|
||||||
|
|
||||||
|
build_header.license_bg=-COLOR_BTNFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CEXEBuild::getcurdbsize() { return cur_datablock->getlen(); }
|
int CEXEBuild::getcurdbsize() { return cur_datablock->getlen(); }
|
||||||
|
|
|
@ -573,7 +573,9 @@ static BOOL CALLBACK LicenseProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
|
||||||
|
|
||||||
hwLicense=GetUIItem(IDC_EDIT1);
|
hwLicense=GetUIItem(IDC_EDIT1);
|
||||||
SendMessage(hwLicense,EM_AUTOURLDETECT,TRUE,0);
|
SendMessage(hwLicense,EM_AUTOURLDETECT,TRUE,0);
|
||||||
SendMessage(hwLicense,EM_SETBKGNDCOLOR,0,g_inst_header->license_bg>=0?g_inst_header->license_bg:GetSysColor(COLOR_BTNFACE));
|
#define lbg g_inst_header->license_bg
|
||||||
|
SendMessage(hwLicense,EM_SETBKGNDCOLOR,0,lbg>=0?lbg:GetSysColor(-lbg));
|
||||||
|
#undef lbg
|
||||||
SendMessage(hwLicense,EM_SETEVENTMASK,0,ENM_LINK|ENM_KEYEVENTS); //XGE 8th September 2002 Or'd in ENM_KEYEVENTS
|
SendMessage(hwLicense,EM_SETEVENTMASK,0,ENM_LINK|ENM_KEYEVENTS); //XGE 8th September 2002 Or'd in ENM_KEYEVENTS
|
||||||
dwRead=0;
|
dwRead=0;
|
||||||
SendMessage(hwLicense,EM_EXLIMITTEXT,0,mystrlen((char*)es.dwCookie));
|
SendMessage(hwLicense,EM_EXLIMITTEXT,0,mystrlen((char*)es.dwCookie));
|
||||||
|
|
|
@ -1206,9 +1206,22 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char
|
||||||
case TOK_LICENSEBKCOLOR:
|
case TOK_LICENSEBKCOLOR:
|
||||||
{
|
{
|
||||||
char *p = line.gettoken_str(1);
|
char *p = line.gettoken_str(1);
|
||||||
int v=strtoul(p,&p,16);
|
if (!strcmpi(p,"/windows"))
|
||||||
build_header.license_bg=((v&0xff)<<16)|(v&0xff00)|((v&0xff0000)>>16);
|
{
|
||||||
SCRIPT_MSG("LicenseBkColor: %06X\n",v);
|
build_header.license_bg=-COLOR_WINDOW;
|
||||||
|
SCRIPT_MSG("LicenseBkColor: /windows\n");
|
||||||
|
}
|
||||||
|
else if (!strcmpi(p,"/grey") || !strcmpi(p,"/gray"))
|
||||||
|
{
|
||||||
|
build_header.license_bg=-COLOR_BTNFACE;
|
||||||
|
SCRIPT_MSG("LicenseBkColor: /grey\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int v=strtoul(p,&p,16);
|
||||||
|
build_header.license_bg=((v&0xff)<<16)|(v&0xff00)|((v&0xff0000)>>16);
|
||||||
|
SCRIPT_MSG("LicenseBkColor: %06X\n",v);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return make_sure_not_in_secorfunc(line.gettoken_str(0));
|
return make_sure_not_in_secorfunc(line.gettoken_str(0));
|
||||||
#else//!NSIS_CONFIG_LICENSEPAGE
|
#else//!NSIS_CONFIG_LICENSEPAGE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue