- .onVerifyInstDir is now used in the browse dialog too

- Fixed problems with SHFileOperation, OleUninitialize and ICopyHook (and possibly XPlay)


git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2947 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2003-09-22 16:06:53 +00:00
parent abbab23ae4
commit 2a6894ebc8
2 changed files with 19 additions and 11 deletions

View file

@ -335,12 +335,20 @@ static int CALLBACK WINAPI BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lPara
{
if (uMsg==BFFM_INITIALIZED)
{
my_GetDialogItemText(m_curwnd,IDC_DIR,(char*)lpData,sizeof(g_tmp));
my_GetDialogItemText(m_curwnd,IDC_DIR,(char*)lpData,NSIS_MAX_STRLEN);
SendMessage(hwnd,BFFM_SETSELECTION,(WPARAM)1,lpData);
}
if (uMsg==BFFM_SELCHANGED)
{
SendMessage(hwnd,BFFM_ENABLEOK,0,SHGetPathFromIDList((LPITEMIDLIST)lParam,(char*)lpData));
SendMessage(
hwnd,
BFFM_ENABLEOK,
0,
SHGetPathFromIDList((LPITEMIDLIST)lParam,(char*)lpData)
#ifdef NSIS_SUPPORT_CODECALLBACKS
&& !ExecuteCodeSegment(g_header->code_onVerifyInstDir,NULL)
#endif
);
}
return 0;
}
@ -747,7 +755,7 @@ static BOOL CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
bi.hwndOwner = hwndDlg;
bi.pszDisplayName = name;
bi.lpfn = BrowseCallbackProc;
bi.lParam = (LPARAM)g_tmp;
bi.lParam = (LPARAM)dir;
bi.lpszTitle = GetNSISStringTT(browse_text);
#ifndef BIF_NEWDIALOGSTYLE
#define BIF_NEWDIALOGSTYLE 0x0040
@ -771,11 +779,11 @@ static BOOL CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
// name gives just the folder name
if (lstrcmpi(post_str,name))
{
lstrcat(addtrailingslash(g_tmp),post_str);
lstrcat(addtrailingslash(dir),post_str);
}
}
SetUITextNT(IDC_DIR,g_tmp);
SetUITextNT(IDC_DIR,dir);
}
}
}
@ -829,7 +837,7 @@ static BOOL CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
#ifdef NSIS_SUPPORT_CODECALLBACKS
&& !ExecuteCodeSegment(g_header->code_onVerifyInstDir,NULL)
#endif
);
);
}
return HandleStaticBkColor();
}