mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[RAPPS] Simplify CAppsListView::SetCheckboxesVisible() into ShowCheckboxes()
This commit is contained in:
parent
385274e2dd
commit
2a2df969b0
2 changed files with 13 additions and 20 deletions
|
@ -1109,19 +1109,11 @@ CAppsListView::SetWatermark(const CStringW &Text)
|
|||
m_Watermark = Text;
|
||||
}
|
||||
|
||||
VOID
|
||||
CAppsListView::SetCheckboxesVisible(BOOL bIsVisible)
|
||||
void
|
||||
CAppsListView::ShowCheckboxes(bool bShow)
|
||||
{
|
||||
if (bIsVisible)
|
||||
{
|
||||
SetExtendedListViewStyle(LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetExtendedListViewStyle(LVS_EX_FULLROWSELECT);
|
||||
}
|
||||
|
||||
bHasCheckboxes = bIsVisible;
|
||||
SetExtendedListViewStyle((bShow ? LVS_EX_CHECKBOXES : 0) | LVS_EX_FULLROWSELECT);
|
||||
bHasCheckboxes = bShow;
|
||||
}
|
||||
|
||||
VOID
|
||||
|
@ -1254,7 +1246,7 @@ CAppsListView::Create(HWND hwndParent)
|
|||
|
||||
if (hwnd)
|
||||
{
|
||||
SetCheckboxesVisible(FALSE);
|
||||
ShowCheckboxes(false);
|
||||
}
|
||||
|
||||
#pragma push_macro("SubclassWindow")
|
||||
|
@ -1363,8 +1355,8 @@ CAppsListView::SetDisplayAppType(APPLICATION_VIEW_TYPE AppType)
|
|||
szText.LoadStringW(IDS_APP_DESCRIPTION);
|
||||
AddColumn(ColumnCount++, szText, 300, LVCFMT_LEFT);
|
||||
|
||||
// disable checkboxes
|
||||
SetCheckboxesVisible(FALSE);
|
||||
// Disable checkboxes
|
||||
ShowCheckboxes(false);
|
||||
break;
|
||||
|
||||
case AppViewTypeAvailableApps:
|
||||
|
@ -1379,8 +1371,8 @@ CAppsListView::SetDisplayAppType(APPLICATION_VIEW_TYPE AppType)
|
|||
szText.LoadStringW(IDS_APP_DESCRIPTION);
|
||||
AddColumn(ColumnCount++, szText, 300, LVCFMT_LEFT);
|
||||
|
||||
// enable checkboxes
|
||||
SetCheckboxesVisible(TRUE);
|
||||
// Enable checkboxes
|
||||
ShowCheckboxes(true);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -195,7 +195,7 @@ class CAppsListView : public CUiWindow<CWindowImpl<CAppsListView, CListView>>
|
|||
};
|
||||
|
||||
BOOL bIsAscending = TRUE;
|
||||
BOOL bHasCheckboxes = FALSE;
|
||||
bool bHasCheckboxes = false;
|
||||
|
||||
INT ItemCount = 0;
|
||||
INT CheckedItemCount = 0;
|
||||
|
@ -224,8 +224,9 @@ class CAppsListView : public CUiWindow<CWindowImpl<CAppsListView, CListView>>
|
|||
|
||||
VOID
|
||||
SetWatermark(const CStringW &Text);
|
||||
VOID
|
||||
SetCheckboxesVisible(BOOL bIsVisible);
|
||||
|
||||
void
|
||||
ShowCheckboxes(bool bShow);
|
||||
|
||||
VOID
|
||||
ColumnClick(LPNMLISTVIEW pnmv);
|
||||
|
|
Loading…
Reference in a new issue