Fix PropertySheet return value for modal sheets
Nikolay Sivov
bunglehead at gmail.com
Sat May 23 10:34:54 CDT 2009
---
dlls/comctl32/propsheet.c | 5 +----
dlls/comctl32/tests/propsheet.c | 14 +++++++-------
2 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
index 44151e4..7d337bd 100644
--- a/dlls/comctl32/propsheet.c
+++ b/dlls/comctl32/propsheet.c
@@ -1703,7 +1703,7 @@ static BOOL PROPSHEET_Finish(HWND hwndDlg)
if (msgResult != 0)
return FALSE;
- if (psInfo->result == 0)
+ if (psInfo->result == 0 && psInfo->isModeless)
psInfo->result = IDOK;
if (psInfo->isModeless)
psInfo->activeValid = FALSE;
@@ -2742,10 +2742,7 @@ static INT do_loop(const PropSheetInfo *psInfo)
}
if(ret == 0)
- {
PostQuitMessage(msg.wParam);
- ret = -1;
- }
if(ret != -1)
ret = psInfo->result;
diff --git a/dlls/comctl32/tests/propsheet.c b/dlls/comctl32/tests/propsheet.c
index 37b89fd..b7a97cd 100644
--- a/dlls/comctl32/tests/propsheet.c
+++ b/dlls/comctl32/tests/propsheet.c
@@ -310,19 +310,19 @@ static void test_singlepressbutton(INT id, INT expected, BOOL modal, BOOL todo,
static void test_psmpressbutton(void)
{
- test_singlepressbutton(PSBTN_BACK, 0, TRUE, TRUE, __LINE__);
+ test_singlepressbutton(PSBTN_BACK, 0, TRUE, FALSE, __LINE__);
test_singlepressbutton(PSBTN_BACK, IDOK, FALSE, FALSE, __LINE__);
- test_singlepressbutton(PSBTN_NEXT, 0, TRUE, TRUE, __LINE__);
+ test_singlepressbutton(PSBTN_NEXT, 0, TRUE, FALSE, __LINE__);
test_singlepressbutton(PSBTN_NEXT, IDOK, FALSE, FALSE, __LINE__);
- test_singlepressbutton(PSBTN_FINISH, 0, TRUE, TRUE, __LINE__);
+ test_singlepressbutton(PSBTN_FINISH, 0, TRUE, FALSE, __LINE__);
test_singlepressbutton(PSBTN_FINISH, IDOK, FALSE, FALSE, __LINE__);
- test_singlepressbutton(PSBTN_OK, 0, TRUE, TRUE, __LINE__);
+ test_singlepressbutton(PSBTN_OK, 0, TRUE, FALSE, __LINE__);
test_singlepressbutton(PSBTN_OK, IDOK, FALSE, FALSE, __LINE__);
- test_singlepressbutton(PSBTN_CANCEL, 0, TRUE, TRUE, __LINE__);
+ test_singlepressbutton(PSBTN_CANCEL, 0, TRUE, FALSE, __LINE__);
test_singlepressbutton(PSBTN_CANCEL, IDOK, FALSE, FALSE, __LINE__);
- test_singlepressbutton(PSBTN_APPLYNOW, 0, TRUE, TRUE, __LINE__);
+ test_singlepressbutton(PSBTN_APPLYNOW, 0, TRUE, FALSE, __LINE__);
test_singlepressbutton(PSBTN_APPLYNOW, IDOK, FALSE, FALSE, __LINE__);
- test_singlepressbutton(PSBTN_HELP, 0, TRUE, TRUE, __LINE__);
+ test_singlepressbutton(PSBTN_HELP, 0, TRUE, FALSE, __LINE__);
test_singlepressbutton(PSBTN_HELP, IDOK, FALSE, FALSE, __LINE__);
}
--
1.5.6.5
--------------070608080904080408050409--
More information about the wine-devel
mailing list