From 67ff9222221afacaea9ff4a47e9911754af5f1f8 Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 23 Sep 2006 08:28:07 +0000 Subject: [PATCH] implemented RFE #1547844 - default button of the abort warning git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4757 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/Modern UI/Changelog.txt | 3 +++ Contrib/Modern UI/Readme.html | 13 ++++++++----- Contrib/Modern UI/System.nsh | 12 ++++++++++-- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/Contrib/Modern UI/Changelog.txt b/Contrib/Modern UI/Changelog.txt index 56394f66..cc4e3982 100644 --- a/Contrib/Modern UI/Changelog.txt +++ b/Contrib/Modern UI/Changelog.txt @@ -1,5 +1,8 @@ NSIS Modern User Interface - VERSION HISTORY +1.76 - September 23, 2006 +* Added MUI_ABORTWARNING_CANCEL_DEFAULT + 1.75 - April 1, 2006 * Added show function for the start menu page * Added MUI_HEADER_TRANSPARENT_TEXT for transparent header texts diff --git a/Contrib/Modern UI/Readme.html b/Contrib/Modern UI/Readme.html index 8546fe40..b4d922f7 100644 --- a/Contrib/Modern UI/Readme.html +++ b/Contrib/Modern UI/Readme.html @@ -514,7 +514,9 @@ installer.

MUI_ABORTWARNING_TEXT text
-Text to display on the abort warning messagebox.

+Text to display on the abort warning message box.

+

MUI_ABORTWARNING_CANCEL_DEFAULT
+Set the Cancel button as the default button on the message box.

Open/Close section

MUI_UNABORTWARNING_TEXT text
-Text to display on the abort warning messagebox.

+Text to display on the abort warning message box.

+

MUI_UNABORTWARNING_CANCEL_DEFAULT
+Set the Cancel button as the default button on the message box.

@@ -1216,10 +1220,9 @@ Start Menu Folder page: Version History

    -
  • 1.75 - April 1, 2006 +
  • 1.76 - September 23, 2006
      -
    • Added show function for the start menu page
    • -
    • Added MUI_HEADER_TRANSPARENT_TEXT for transparent header texts
    • +
    • Added MUI_ABORTWARNING_CANCEL_DEFAULT
diff --git a/Contrib/Modern UI/System.nsh b/Contrib/Modern UI/System.nsh index 357835d1..19b0c41d 100644 --- a/Contrib/Modern UI/System.nsh +++ b/Contrib/Modern UI/System.nsh @@ -312,7 +312,11 @@ Var /GLOBAL MUI_TEMP2 StrCmp $MUI_NOABORTWARNING "1" mui.quit !endif - MessageBox MB_YESNO|MB_ICONEXCLAMATION "${MUI_ABORTWARNING_TEXT}" IDYES mui.quit + !ifdef MUI_ABORTWARNING_CANCEL_DEFAULT + MessageBox MB_YESNO|MB_ICONEXCLAMATION|MB_DEFBUTTON2 "${MUI_ABORTWARNING_TEXT}" IDYES mui.quit + !else + MessageBox MB_YESNO|MB_ICONEXCLAMATION "${MUI_ABORTWARNING_TEXT}" IDYES mui.quit + !endif Abort mui.quit: @@ -321,7 +325,11 @@ Var /GLOBAL MUI_TEMP2 !macro MUI_UNABORTWARNING - MessageBox MB_YESNO|MB_ICONEXCLAMATION "${MUI_UNABORTWARNING_TEXT}" IDYES mui.quit + !ifdef MUI_UNABORTWARNING_CANCEL_DEFAULT + MessageBox MB_YESNO|MB_ICONEXCLAMATION|MB_DEFBUTTON2 "${MUI_UNABORTWARNING_TEXT}" IDYES mui.quit + !else + MessageBox MB_YESNO|MB_ICONEXCLAMATION "${MUI_UNABORTWARNING_TEXT}" IDYES mui.quit + !endif Abort mui.quit: