mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +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;
|
m_Watermark = Text;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
void
|
||||||
CAppsListView::SetCheckboxesVisible(BOOL bIsVisible)
|
CAppsListView::ShowCheckboxes(bool bShow)
|
||||||
{
|
{
|
||||||
if (bIsVisible)
|
SetExtendedListViewStyle((bShow ? LVS_EX_CHECKBOXES : 0) | LVS_EX_FULLROWSELECT);
|
||||||
{
|
bHasCheckboxes = bShow;
|
||||||
SetExtendedListViewStyle(LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SetExtendedListViewStyle(LVS_EX_FULLROWSELECT);
|
|
||||||
}
|
|
||||||
|
|
||||||
bHasCheckboxes = bIsVisible;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
@ -1254,7 +1246,7 @@ CAppsListView::Create(HWND hwndParent)
|
||||||
|
|
||||||
if (hwnd)
|
if (hwnd)
|
||||||
{
|
{
|
||||||
SetCheckboxesVisible(FALSE);
|
ShowCheckboxes(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma push_macro("SubclassWindow")
|
#pragma push_macro("SubclassWindow")
|
||||||
|
@ -1363,8 +1355,8 @@ CAppsListView::SetDisplayAppType(APPLICATION_VIEW_TYPE AppType)
|
||||||
szText.LoadStringW(IDS_APP_DESCRIPTION);
|
szText.LoadStringW(IDS_APP_DESCRIPTION);
|
||||||
AddColumn(ColumnCount++, szText, 300, LVCFMT_LEFT);
|
AddColumn(ColumnCount++, szText, 300, LVCFMT_LEFT);
|
||||||
|
|
||||||
// disable checkboxes
|
// Disable checkboxes
|
||||||
SetCheckboxesVisible(FALSE);
|
ShowCheckboxes(false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AppViewTypeAvailableApps:
|
case AppViewTypeAvailableApps:
|
||||||
|
@ -1379,8 +1371,8 @@ CAppsListView::SetDisplayAppType(APPLICATION_VIEW_TYPE AppType)
|
||||||
szText.LoadStringW(IDS_APP_DESCRIPTION);
|
szText.LoadStringW(IDS_APP_DESCRIPTION);
|
||||||
AddColumn(ColumnCount++, szText, 300, LVCFMT_LEFT);
|
AddColumn(ColumnCount++, szText, 300, LVCFMT_LEFT);
|
||||||
|
|
||||||
// enable checkboxes
|
// Enable checkboxes
|
||||||
SetCheckboxesVisible(TRUE);
|
ShowCheckboxes(true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -195,7 +195,7 @@ class CAppsListView : public CUiWindow<CWindowImpl<CAppsListView, CListView>>
|
||||||
};
|
};
|
||||||
|
|
||||||
BOOL bIsAscending = TRUE;
|
BOOL bIsAscending = TRUE;
|
||||||
BOOL bHasCheckboxes = FALSE;
|
bool bHasCheckboxes = false;
|
||||||
|
|
||||||
INT ItemCount = 0;
|
INT ItemCount = 0;
|
||||||
INT CheckedItemCount = 0;
|
INT CheckedItemCount = 0;
|
||||||
|
@ -224,8 +224,9 @@ class CAppsListView : public CUiWindow<CWindowImpl<CAppsListView, CListView>>
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
SetWatermark(const CStringW &Text);
|
SetWatermark(const CStringW &Text);
|
||||||
VOID
|
|
||||||
SetCheckboxesVisible(BOOL bIsVisible);
|
void
|
||||||
|
ShowCheckboxes(bool bShow);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
ColumnClick(LPNMLISTVIEW pnmv);
|
ColumnClick(LPNMLISTVIEW pnmv);
|
||||||
|
|
Loading…
Reference in a new issue