fixed a bug which prevented enabling the next button from the leave function of InstallOptions pages

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3544 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2004-05-08 16:07:22 +00:00
parent 5f74ac58f9
commit 499fa0e764
6 changed files with 13 additions and 18 deletions

View file

@ -669,11 +669,7 @@ LRESULT WINAPI WMCommandProc(HWND hWnd, UINT id, HWND hwndCtl, UINT codeNotify)
if (pField->nFlags & LBS_NOTIFY) {
// Remember which control was activated then pretend the user clicked Next
g_NotifyField = nIdx + 1;
// the next button must be enabled or nsis will ignore WM_COMMAND
BOOL bWasDisabled = EnableWindow(hNextButton, TRUE);
FORWARD_WM_COMMAND(hMainWindow, IDOK, hNextButton, BN_CLICKED, mySendMessage);
if (bWasDisabled)
EnableWindow(hNextButton, FALSE);
mySendMessage(hMainWindow, WM_NOTIFY_OUTER_NEXT, 1, 0);
}
}
break;

Binary file not shown.

View file

@ -50,16 +50,15 @@ int progress_bar_pos, progress_bar_len;
static char g_tmp[4096];
static int m_page=-1,m_retcode,m_delta=1;
static int m_page=-1,m_retcode;
static page *g_this_page;
#define NOTIFY_BYE_BYE 'x'
static void NSISCALL outernotify(char num) {
if (num==NOTIFY_BYE_BYE)
static void NSISCALL outernotify(int delta) {
if (delta==NOTIFY_BYE_BYE)
g_quit_flag++;
m_delta=num;
SendMessage(g_hwnd,WM_NOTIFY_OUTER_NEXT,(WPARAM)num,0); // it sends num again for plugins - DON'T REMOVE!
SendMessage(g_hwnd,WM_NOTIFY_OUTER_NEXT,(WPARAM)delta,0);
}
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
@ -404,6 +403,7 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
if (uMsg == WM_INITDIALOG || uMsg == WM_NOTIFY_OUTER_NEXT)
{
page *this_page;
int delta = (int) wParam;
static DLGPROC winprocs[]=
{
#ifdef NSIS_CONFIG_LICENSEPAGE
@ -430,6 +430,7 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
g_quit_flag = ExecuteCodeSegment(g_header->code_onGUIInit,NULL);
#endif
//ShowWindow(hwndDlg, SW_SHOW);
delta = 1;
}
this_page=g_pages+m_page;
@ -438,7 +439,7 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
#ifdef NSIS_SUPPORT_CODECALLBACKS
// Call leave function. If Abort used don't move to the next page.
// But if quit called we must exit now
if (m_delta==1) if (ExecuteCodeSegment(this_page->leavefunc,NULL)) return !g_quit_flag;
if (delta==1) if (ExecuteCodeSegment(this_page->leavefunc,NULL)) return !g_quit_flag;
#endif
// if the last page was a custom page, wait for it to finish by itself.
@ -450,8 +451,8 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
NotifyCurWnd(WM_NOTIFY_INIGO_MONTOYA);
nextPage:
m_page+=m_delta;
this_page+=m_delta;
m_page+=delta;
this_page+=delta;
#ifdef NSIS_SUPPORT_CODECALLBACKS
if (m_page==g_blocks[NB_PAGES].num) ExecuteCodeSegment(g_header->code_onInstSuccess,NULL);

View file

@ -146,8 +146,7 @@ static int NSISCALL ExecuteEntry(entry *entry_)
int exec_error = 0;
entry lent;
mini_memcpy(&lent, entry_, sizeof(entry));
entry lent = *entry_;
#define which (lent.which)
#define parm0 (lent.offsets[0])

View file

@ -243,7 +243,7 @@ char * NSISCALL mystrstri(char *a, char *b)
return NULL;
}
void * NSISCALL mini_memcpy(void *out, const void *in, int len)
void NSISCALL mini_memcpy(void *out, const void *in, int len)
{
char *c_out=(char*)out;
char *c_in=(char *)in;
@ -251,7 +251,6 @@ void * NSISCALL mini_memcpy(void *out, const void *in, int len)
{
*c_out++=*c_in++;
}
return out;
}

View file

@ -67,7 +67,7 @@ char * NSISCALL skip_root(char *path);
int NSISCALL is_valid_instpath(char *s);
char * NSISCALL validate_filename(char *fn);
void NSISCALL MoveFileOnReboot(LPCTSTR pszExisting, LPCTSTR pszNew);
void * NSISCALL mini_memcpy(void *out, const void *in, int len);
void NSISCALL mini_memcpy(void *out, const void *in, int len);
// Turn a pair of chars into a word
// Turn four chars into a dword