mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 15:39:05 +00:00
comctl32: Don't ignore page creation error for a non-modal propery sheet.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ca41fd8904
commit
4ee173dfdd
|
@ -2012,6 +2012,13 @@ static BOOL PROPSHEET_SetCurSel(HWND hwndDlg,
|
||||||
if (!psInfo->proppage[index].hwndPage) {
|
if (!psInfo->proppage[index].hwndPage) {
|
||||||
if(!PROPSHEET_CreatePage(hwndDlg, index, psInfo, ppshpage)) {
|
if(!PROPSHEET_CreatePage(hwndDlg, index, psInfo, ppshpage)) {
|
||||||
PROPSHEET_RemovePage(hwndDlg, index, NULL);
|
PROPSHEET_RemovePage(hwndDlg, index, NULL);
|
||||||
|
|
||||||
|
if (!psInfo->isModeless)
|
||||||
|
{
|
||||||
|
DestroyWindow(hwndDlg);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if(index >= psInfo->nPages)
|
if(index >= psInfo->nPages)
|
||||||
index--;
|
index--;
|
||||||
if(index < 0)
|
if(index < 0)
|
||||||
|
@ -2754,7 +2761,7 @@ static void PROPSHEET_CleanUp(HWND hwndDlg)
|
||||||
static INT do_loop(const PropSheetInfo *psInfo)
|
static INT do_loop(const PropSheetInfo *psInfo)
|
||||||
{
|
{
|
||||||
MSG msg;
|
MSG msg;
|
||||||
INT ret = -1;
|
INT ret = 0;
|
||||||
HWND hwnd = psInfo->hwnd;
|
HWND hwnd = psInfo->hwnd;
|
||||||
HWND parent = psInfo->ppshheader.hwndParent;
|
HWND parent = psInfo->ppshheader.hwndParent;
|
||||||
|
|
||||||
|
@ -2771,10 +2778,7 @@ static INT do_loop(const PropSheetInfo *psInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ret == 0)
|
if(ret == 0)
|
||||||
{
|
|
||||||
PostQuitMessage(msg.wParam);
|
PostQuitMessage(msg.wParam);
|
||||||
ret = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(ret != -1)
|
if(ret != -1)
|
||||||
ret = psInfo->result;
|
ret = psInfo->result;
|
||||||
|
|
|
@ -276,7 +276,6 @@ static void test_disableowner(void)
|
||||||
psh.pfnCallback = disableowner_callback;
|
psh.pfnCallback = disableowner_callback;
|
||||||
|
|
||||||
p = pPropertySheetA(&psh);
|
p = pPropertySheetA(&psh);
|
||||||
todo_wine
|
|
||||||
ok(p == 0, "Expected 0, got %ld\n", p);
|
ok(p == 0, "Expected 0, got %ld\n", p);
|
||||||
ok(IsWindowEnabled(parenthwnd) != 0, "parent window should be enabled\n");
|
ok(IsWindowEnabled(parenthwnd) != 0, "parent window should be enabled\n");
|
||||||
DestroyWindow(parenthwnd);
|
DestroyWindow(parenthwnd);
|
||||||
|
@ -1165,11 +1164,8 @@ static void test_bad_control_class(void)
|
||||||
psh.hwndParent = GetDesktopWindow();
|
psh.hwndParent = GetDesktopWindow();
|
||||||
U3(psh).phpage = &hpsp;
|
U3(psh).phpage = &hpsp;
|
||||||
|
|
||||||
if (!strcmp(winetest_platform, "windows")) /* FIXME: enable once Wine is fixed */
|
|
||||||
{
|
|
||||||
ret = pPropertySheetA(&psh);
|
ret = pPropertySheetA(&psh);
|
||||||
ok(ret == 0, "got %ld\n", ret);
|
ok(ret == 0, "got %ld\n", ret);
|
||||||
}
|
|
||||||
|
|
||||||
/* Need to recreate hpsp otherwise the test fails under Windows */
|
/* Need to recreate hpsp otherwise the test fails under Windows */
|
||||||
hpsp = pCreatePropertySheetPageA(&psp);
|
hpsp = pCreatePropertySheetPageA(&psp);
|
||||||
|
|
Loading…
Reference in a new issue