fixed bug #1440636 - invalid folder names returned by StartMenu plug-in
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4555 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
615ad474cb
commit
c07998b48c
1 changed files with 8 additions and 3 deletions
|
@ -23,16 +23,20 @@ int rtl = 0;
|
||||||
|
|
||||||
void *lpWndProcOld;
|
void *lpWndProcOld;
|
||||||
|
|
||||||
|
void (__stdcall *validate_filename)(char *);
|
||||||
|
|
||||||
BOOL CALLBACK dlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
BOOL CALLBACK dlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||||
static BOOL CALLBACK ParentWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
static BOOL CALLBACK ParentWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||||
void AddFolderFromReg(int nFolder);
|
void AddFolderFromReg(int nFolder);
|
||||||
|
|
||||||
void __declspec(dllexport) Init(HWND hwndParent, int string_size, char *variables, stack_t **stacktop)
|
void __declspec(dllexport) Init(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
|
||||||
{
|
{
|
||||||
HWND hwStartMenuSelect;
|
HWND hwStartMenuSelect;
|
||||||
|
|
||||||
hwParent = hwndParent;
|
hwParent = hwndParent;
|
||||||
|
|
||||||
|
validate_filename = extra->validate_filename;
|
||||||
|
|
||||||
EXDLL_INIT();
|
EXDLL_INIT();
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -120,9 +124,9 @@ void __declspec(dllexport) Show(HWND hwndParent, int string_size, char *variable
|
||||||
SetWindowLong(hwndParent, DWL_DLGPROC, (long) lpWndProcOld);
|
SetWindowLong(hwndParent, DWL_DLGPROC, (long) lpWndProcOld);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __declspec(dllexport) Select(HWND hwndParent, int string_size, char *variables, stack_t **stacktop)
|
void __declspec(dllexport) Select(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
|
||||||
{
|
{
|
||||||
Init(hwndParent, string_size, variables, stacktop);
|
Init(hwndParent, string_size, variables, stacktop, extra);
|
||||||
if (g_hwStartMenuSelect)
|
if (g_hwStartMenuSelect)
|
||||||
{
|
{
|
||||||
popstring(buf);
|
popstring(buf);
|
||||||
|
@ -359,6 +363,7 @@ BOOL CALLBACK dlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GetWindowText(hwLocation, buf + 1, MAX_PATH);
|
GetWindowText(hwLocation, buf + 1, MAX_PATH);
|
||||||
|
validate_filename(buf);
|
||||||
if (IsDlgButtonChecked(hwndDlg, IDC_CHECK) == BST_CHECKED)
|
if (IsDlgButtonChecked(hwndDlg, IDC_CHECK) == BST_CHECKED)
|
||||||
{
|
{
|
||||||
buf[0] = '>';
|
buf[0] = '>';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue