From 82335689358c8cb2f0260a970d109782977b3bc6 Mon Sep 17 00:00:00 2001 From: kichik Date: Mon, 24 Mar 2003 15:35:23 +0000 Subject: [PATCH] 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 --- Source/build.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/build.cpp b/Source/build.cpp index 66c72bc5..3ddf9905 100644 --- a/Source/build.cpp +++ b/Source/build.cpp @@ -1405,7 +1405,7 @@ int CEXEBuild::write_output(void) if (p->next == LANG_BTN_NEXT) next_used = true; } (--p)->next=LANG_BTN_CLOSE; - if (!enable_last_page_cancel) { + if (!enable_last_page_cancel && instlog) { p->button_states&=~4; } 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++; + int uninstlog = 0; + if (!add_uninst_pages) { int i=0; page *p=(page *) ubuild_pages.get(); @@ -1433,6 +1435,7 @@ int CEXEBuild::write_output(void) #endif case NSIS_PAGE_INSTFILES: instlog++; + uninstlog++; break; } p++; @@ -1489,7 +1492,7 @@ int CEXEBuild::write_output(void) if (p->next == LANG_BTN_NEXT) next_used = true; } (--p)->next=LANG_BTN_CLOSE; - if (!uenable_last_page_cancel) { + if (!uenable_last_page_cancel && uninstlog) { p->button_states&=~4; } if (p->id==NSIS_PAGE_COMPLETED) (--p)->next=LANG_BTN_CLOSE;