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:
parent
5f74ac58f9
commit
499fa0e764
6 changed files with 13 additions and 18 deletions
|
@ -669,11 +669,7 @@ LRESULT WINAPI WMCommandProc(HWND hWnd, UINT id, HWND hwndCtl, UINT codeNotify)
|
||||||
if (pField->nFlags & LBS_NOTIFY) {
|
if (pField->nFlags & LBS_NOTIFY) {
|
||||||
// Remember which control was activated then pretend the user clicked Next
|
// Remember which control was activated then pretend the user clicked Next
|
||||||
g_NotifyField = nIdx + 1;
|
g_NotifyField = nIdx + 1;
|
||||||
// the next button must be enabled or nsis will ignore WM_COMMAND
|
mySendMessage(hMainWindow, WM_NOTIFY_OUTER_NEXT, 1, 0);
|
||||||
BOOL bWasDisabled = EnableWindow(hNextButton, TRUE);
|
|
||||||
FORWARD_WM_COMMAND(hMainWindow, IDOK, hNextButton, BN_CLICKED, mySendMessage);
|
|
||||||
if (bWasDisabled)
|
|
||||||
EnableWindow(hNextButton, FALSE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Binary file not shown.
|
@ -50,16 +50,15 @@ int progress_bar_pos, progress_bar_len;
|
||||||
|
|
||||||
static char g_tmp[4096];
|
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;
|
static page *g_this_page;
|
||||||
|
|
||||||
#define NOTIFY_BYE_BYE 'x'
|
#define NOTIFY_BYE_BYE 'x'
|
||||||
|
|
||||||
static void NSISCALL outernotify(char num) {
|
static void NSISCALL outernotify(int delta) {
|
||||||
if (num==NOTIFY_BYE_BYE)
|
if (delta==NOTIFY_BYE_BYE)
|
||||||
g_quit_flag++;
|
g_quit_flag++;
|
||||||
m_delta=num;
|
SendMessage(g_hwnd,WM_NOTIFY_OUTER_NEXT,(WPARAM)delta,0);
|
||||||
SendMessage(g_hwnd,WM_NOTIFY_OUTER_NEXT,(WPARAM)num,0); // it sends num again for plugins - DON'T REMOVE!
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
#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)
|
if (uMsg == WM_INITDIALOG || uMsg == WM_NOTIFY_OUTER_NEXT)
|
||||||
{
|
{
|
||||||
page *this_page;
|
page *this_page;
|
||||||
|
int delta = (int) wParam;
|
||||||
static DLGPROC winprocs[]=
|
static DLGPROC winprocs[]=
|
||||||
{
|
{
|
||||||
#ifdef NSIS_CONFIG_LICENSEPAGE
|
#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);
|
g_quit_flag = ExecuteCodeSegment(g_header->code_onGUIInit,NULL);
|
||||||
#endif
|
#endif
|
||||||
//ShowWindow(hwndDlg, SW_SHOW);
|
//ShowWindow(hwndDlg, SW_SHOW);
|
||||||
|
delta = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
this_page=g_pages+m_page;
|
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
|
#ifdef NSIS_SUPPORT_CODECALLBACKS
|
||||||
// Call leave function. If Abort used don't move to the next page.
|
// Call leave function. If Abort used don't move to the next page.
|
||||||
// But if quit called we must exit now
|
// 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
|
#endif
|
||||||
|
|
||||||
// if the last page was a custom page, wait for it to finish by itself.
|
// 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);
|
NotifyCurWnd(WM_NOTIFY_INIGO_MONTOYA);
|
||||||
|
|
||||||
nextPage:
|
nextPage:
|
||||||
m_page+=m_delta;
|
m_page+=delta;
|
||||||
this_page+=m_delta;
|
this_page+=delta;
|
||||||
|
|
||||||
#ifdef NSIS_SUPPORT_CODECALLBACKS
|
#ifdef NSIS_SUPPORT_CODECALLBACKS
|
||||||
if (m_page==g_blocks[NB_PAGES].num) ExecuteCodeSegment(g_header->code_onInstSuccess,NULL);
|
if (m_page==g_blocks[NB_PAGES].num) ExecuteCodeSegment(g_header->code_onInstSuccess,NULL);
|
||||||
|
|
|
@ -146,8 +146,7 @@ static int NSISCALL ExecuteEntry(entry *entry_)
|
||||||
|
|
||||||
int exec_error = 0;
|
int exec_error = 0;
|
||||||
|
|
||||||
entry lent;
|
entry lent = *entry_;
|
||||||
mini_memcpy(&lent, entry_, sizeof(entry));
|
|
||||||
|
|
||||||
#define which (lent.which)
|
#define which (lent.which)
|
||||||
#define parm0 (lent.offsets[0])
|
#define parm0 (lent.offsets[0])
|
||||||
|
|
|
@ -243,7 +243,7 @@ char * NSISCALL mystrstri(char *a, char *b)
|
||||||
return NULL;
|
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_out=(char*)out;
|
||||||
char *c_in=(char *)in;
|
char *c_in=(char *)in;
|
||||||
|
@ -251,7 +251,6 @@ void * NSISCALL mini_memcpy(void *out, const void *in, int len)
|
||||||
{
|
{
|
||||||
*c_out++=*c_in++;
|
*c_out++=*c_in++;
|
||||||
}
|
}
|
||||||
return out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ char * NSISCALL skip_root(char *path);
|
||||||
int NSISCALL is_valid_instpath(char *s);
|
int NSISCALL is_valid_instpath(char *s);
|
||||||
char * NSISCALL validate_filename(char *fn);
|
char * NSISCALL validate_filename(char *fn);
|
||||||
void NSISCALL MoveFileOnReboot(LPCTSTR pszExisting, LPCTSTR pszNew);
|
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 a pair of chars into a word
|
||||||
// Turn four chars into a dword
|
// Turn four chars into a dword
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue