fixed bug #1209843 - $INSTDIR is empty in directory page show callback function
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4476 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
2296afc187
commit
a1f2413942
1 changed files with 16 additions and 0 deletions
|
@ -900,6 +900,22 @@ static BOOL CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
|
||||||
#endif
|
#endif
|
||||||
if (validpathspec(dir) && !skip_root(dir))
|
if (validpathspec(dir) && !skip_root(dir))
|
||||||
addtrailingslash(dir);
|
addtrailingslash(dir);
|
||||||
|
|
||||||
|
// workaround for bug #1209843
|
||||||
|
//
|
||||||
|
// m_curwnd is only updated once WM_INITDIALOG returns.
|
||||||
|
// my_SetWindowText triggers an EN_CHANGE message that
|
||||||
|
// triggers a WM_IN_UPDATEMSG message that uses m_curwnd
|
||||||
|
// to get the selected directory (GetUIText).
|
||||||
|
// because m_curwnd is still outdated, dir varialble is
|
||||||
|
// filled with an empty string. by default, dir points
|
||||||
|
// to $INSTDIR.
|
||||||
|
//
|
||||||
|
// to solve this, m_curwnd is manually set to the correct
|
||||||
|
// window handle.
|
||||||
|
|
||||||
|
m_curwnd=hwndDlg;
|
||||||
|
|
||||||
my_SetWindowText(hDir,dir);
|
my_SetWindowText(hDir,dir);
|
||||||
SetUITextFromLang(IDC_BROWSE,this_page->parms[2]);
|
SetUITextFromLang(IDC_BROWSE,this_page->parms[2]);
|
||||||
SetUITextFromLang(IDC_SELDIRTEXT,this_page->parms[1]);
|
SetUITextFromLang(IDC_SELDIRTEXT,this_page->parms[1]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue