Now ignores WM_COMMAND messages received while the dialog is in the process of being created.
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3388 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
b4a76d1585
commit
6429ab2452
2 changed files with 15 additions and 11 deletions
|
@ -30,15 +30,16 @@
|
||||||
void *WINAPI MALLOC(int len) { return (void*)GlobalAlloc(GPTR,len); }
|
void *WINAPI MALLOC(int len) { return (void*)GlobalAlloc(GPTR,len); }
|
||||||
void WINAPI FREE(void *d) { if (d) GlobalFree((HGLOBAL)d); }
|
void WINAPI FREE(void *d) { if (d) GlobalFree((HGLOBAL)d); }
|
||||||
|
|
||||||
static int WINAPI popstring(char *str)
|
void WINAPI popstring(char *str)
|
||||||
{
|
{
|
||||||
stack_t *th;
|
if (g_stacktop && *g_stacktop)
|
||||||
if (!g_stacktop || !*g_stacktop) return 1;
|
{
|
||||||
th=(*g_stacktop);
|
stack_t *th = *g_stacktop;
|
||||||
if (str) lstrcpy(str,th->text);
|
*g_stacktop = th->next;
|
||||||
*g_stacktop = th->next;
|
if (str)
|
||||||
FREE(th);
|
lstrcpy(str, th->text);
|
||||||
return 0;
|
FREE(th);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define strcpy(x,y) lstrcpy(x,y)
|
#define strcpy(x,y) lstrcpy(x,y)
|
||||||
|
@ -558,7 +559,8 @@ LRESULT WINAPI WMCommandProc(HWND hWnd, UINT id, HWND hwndCtl, UINT codeNotify)
|
||||||
{
|
{
|
||||||
char szBrowsePath[MAX_PATH];
|
char szBrowsePath[MAX_PATH];
|
||||||
int nIdx = FindControlIdx(id);
|
int nIdx = FindControlIdx(id);
|
||||||
if (nIdx < 0)
|
// Ignore if the dialog is in the process of being created
|
||||||
|
if (g_done || nIdx < 0)
|
||||||
break;
|
break;
|
||||||
if (pFields[nIdx].nType == FIELD_BROWSEBUTTON)
|
if (pFields[nIdx].nType == FIELD_BROWSEBUTTON)
|
||||||
--nIdx;
|
--nIdx;
|
||||||
|
@ -870,6 +872,9 @@ int WINAPI createCfgDlg()
|
||||||
|
|
||||||
HFONT hFont = (HFONT)mySendMessage(mainwnd, WM_GETFONT, 0, 0);
|
HFONT hFont = (HFONT)mySendMessage(mainwnd, WM_GETFONT, 0, 0);
|
||||||
|
|
||||||
|
// Prevent WM_COMMANDs from being processed while we are building
|
||||||
|
g_done = 1;
|
||||||
|
|
||||||
RECT dialog_r;
|
RECT dialog_r;
|
||||||
int mainWndWidth, mainWndHeight;
|
int mainWndWidth, mainWndHeight;
|
||||||
hConfigWindow=CreateDialog(m_hInstance,MAKEINTRESOURCE(IDD_DIALOG1),mainwnd,cfgDlgProc);
|
hConfigWindow=CreateDialog(m_hInstance,MAKEINTRESOURCE(IDD_DIALOG1),mainwnd,cfgDlgProc);
|
||||||
|
@ -1268,8 +1273,7 @@ void WINAPI showCfgDlg()
|
||||||
// quit soon, which means the ini might get flushed late and cause crap. :) anwyay.
|
// quit soon, which means the ini might get flushed late and cause crap. :) anwyay.
|
||||||
if (!g_is_cancel) SaveSettings();
|
if (!g_is_cancel) SaveSettings();
|
||||||
|
|
||||||
if (lpWndProcOld)
|
SetWindowLong(hMainWindow,DWL_DLGPROC,(long)lpWndProcOld);
|
||||||
SetWindowLong(hMainWindow,DWL_DLGPROC,(long)lpWndProcOld);
|
|
||||||
DestroyWindow(hConfigWindow);
|
DestroyWindow(hConfigWindow);
|
||||||
|
|
||||||
// by ORTIM: 13-August-2002
|
// by ORTIM: 13-August-2002
|
||||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue