fixed the next/back buttons bug caused by the last fix
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3548 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
b99616bf03
commit
73ba4f376b
1 changed files with 7 additions and 6 deletions
|
@ -50,7 +50,7 @@ int progress_bar_pos, progress_bar_len;
|
|||
|
||||
static char g_tmp[4096];
|
||||
|
||||
static int m_page=-1,m_retcode;
|
||||
static int m_page=-1,m_retcode,m_delta;
|
||||
static page *g_this_page;
|
||||
|
||||
#define NOTIFY_BYE_BYE 'x'
|
||||
|
@ -403,7 +403,6 @@ 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
|
||||
|
@ -419,6 +418,8 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
#endif
|
||||
};
|
||||
|
||||
m_delta = wParam;
|
||||
|
||||
if (uMsg == WM_INITDIALOG)
|
||||
{
|
||||
g_hwnd=hwndDlg;
|
||||
|
@ -430,7 +431,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;
|
||||
m_delta = 1;
|
||||
}
|
||||
|
||||
this_page=g_pages+m_page;
|
||||
|
@ -439,7 +440,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 (delta==1) if (ExecuteCodeSegment(this_page->leavefunc,NULL)) return !g_quit_flag;
|
||||
if (m_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.
|
||||
|
@ -451,8 +452,8 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
NotifyCurWnd(WM_NOTIFY_INIGO_MONTOYA);
|
||||
|
||||
nextPage:
|
||||
m_page+=delta;
|
||||
this_page+=delta;
|
||||
m_page+=m_delta;
|
||||
this_page+=m_delta;
|
||||
|
||||
#ifdef NSIS_SUPPORT_CODECALLBACKS
|
||||
if (m_page==g_blocks[NB_PAGES].num) ExecuteCodeSegment(g_header->code_onInstSuccess,NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue