[2/2] comctl32: determine if PSH_PROPSHEETPAGE is set once
Lei Zhang
thestig at google.com
Tue Jun 26 02:33:27 CDT 2007
Hi,
This is just a small optimization to calculate if PSH_PROPSHEETPAGE is
set just once, rather than for ever page.
-------------- next part --------------
From a152290a7486e10d88c4e3a7942f5d158f005861 Mon Sep 17 00:00:00 2001
From: Lei Zhang <thestig at google.com>
Date: Tue, 26 Jun 2007 00:22:19 -0700
Subject: [PATCH 2/2] comctl32: determine if PSH_PROPSHEETPAGE is set once
---
dlls/comctl32/propsheet.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
index b8e156c..d5142a8 100644
--- a/dlls/comctl32/propsheet.c
+++ b/dlls/comctl32/propsheet.c
@@ -120,6 +120,7 @@ typedef struct tagPropSheetInfo
BOOL hasHelp;
BOOL hasApply;
BOOL hasFinish;
+ BOOL usePropPage;
BOOL useCallback;
BOOL activeValid;
PropPageInfo* proppage;
@@ -298,6 +299,7 @@ static void PROPSHEET_CollectSheetInfoCo
psInfo->hasApply = !(dwFlags & PSH_NOAPPLYNOW);
psInfo->hasFinish = dwFlags & PSH_WIZARDHASFINISH;
psInfo->isModeless = dwFlags & PSH_MODELESS;
+ psInfo->usePropPage = dwFlags & PSH_PROPSHEETPAGE;
if (psInfo->active_page < 0 || psInfo->active_page >= psInfo->nPages)
psInfo->active_page = 0;
@@ -2829,7 +2831,7 @@ INT_PTR WINAPI PropertySheetA(LPCPROPSHE
for (n = i = 0; i < lppsh->nPages; i++, n++)
{
- if (!(lppsh->dwFlags & PSH_PROPSHEETPAGE))
+ if (!psInfo->usePropPage)
psInfo->proppage[n].hpage = psInfo->ppshheader.u3.phpage[i];
else
{
@@ -2840,7 +2842,7 @@ INT_PTR WINAPI PropertySheetA(LPCPROPSHE
if (!PROPSHEET_CollectPageInfo((LPCPROPSHEETPAGEW)psInfo->proppage[n].hpage,
psInfo, n))
{
- if (lppsh->dwFlags & PSH_PROPSHEETPAGE)
+ if (psInfo->usePropPage)
DestroyPropertySheetPage(psInfo->proppage[n].hpage);
n--;
psInfo->nPages--;
@@ -2872,7 +2874,7 @@ INT_PTR WINAPI PropertySheetW(LPCPROPSHE
for (n = i = 0; i < lppsh->nPages; i++, n++)
{
- if (!(lppsh->dwFlags & PSH_PROPSHEETPAGE))
+ if (!psInfo->usePropPage)
psInfo->proppage[n].hpage = psInfo->ppshheader.u3.phpage[i];
else
{
@@ -2883,7 +2885,7 @@ INT_PTR WINAPI PropertySheetW(LPCPROPSHE
if (!PROPSHEET_CollectPageInfo((LPCPROPSHEETPAGEW)psInfo->proppage[n].hpage,
psInfo, n))
{
- if (lppsh->dwFlags & PSH_PROPSHEETPAGE)
+ if (psInfo->usePropPage)
DestroyPropertySheetPage(psInfo->proppage[n].hpage);
n--;
psInfo->nPages--;
--
1.4.1
More information about the wine-patches
mailing list