Disable last cancel button only if instfiles used

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2356 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2003-03-24 15:35:23 +00:00
parent 603dcbe239
commit 8233568935

View file

@ -1405,7 +1405,7 @@ int CEXEBuild::write_output(void)
if (p->next == LANG_BTN_NEXT) next_used = true; if (p->next == LANG_BTN_NEXT) next_used = true;
} }
(--p)->next=LANG_BTN_CLOSE; (--p)->next=LANG_BTN_CLOSE;
if (!enable_last_page_cancel) { if (!enable_last_page_cancel && instlog) {
p->button_states&=~4; p->button_states&=~4;
} }
if (p->id==NSIS_PAGE_COMPLETED) (--p)->next=LANG_BTN_CLOSE; if (p->id==NSIS_PAGE_COMPLETED) (--p)->next=LANG_BTN_CLOSE;
@ -1421,6 +1421,8 @@ int CEXEBuild::write_output(void)
{ {
if (!IsNotSet(uninstall.uninstalltext)) uninst++; if (!IsNotSet(uninstall.uninstalltext)) uninst++;
int uninstlog = 0;
if (!add_uninst_pages) { if (!add_uninst_pages) {
int i=0; int i=0;
page *p=(page *) ubuild_pages.get(); page *p=(page *) ubuild_pages.get();
@ -1433,6 +1435,7 @@ int CEXEBuild::write_output(void)
#endif #endif
case NSIS_PAGE_INSTFILES: case NSIS_PAGE_INSTFILES:
instlog++; instlog++;
uninstlog++;
break; break;
} }
p++; p++;
@ -1489,7 +1492,7 @@ int CEXEBuild::write_output(void)
if (p->next == LANG_BTN_NEXT) next_used = true; if (p->next == LANG_BTN_NEXT) next_used = true;
} }
(--p)->next=LANG_BTN_CLOSE; (--p)->next=LANG_BTN_CLOSE;
if (!uenable_last_page_cancel) { if (!uenable_last_page_cancel && uninstlog) {
p->button_states&=~4; p->button_states&=~4;
} }
if (p->id==NSIS_PAGE_COMPLETED) (--p)->next=LANG_BTN_CLOSE; if (p->id==NSIS_PAGE_COMPLETED) (--p)->next=LANG_BTN_CLOSE;