mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 12:02:02 +00:00
[RAPPS] Make selection global
- Added a 'Selected for installation' category that shows what was selected. Selection is now kept between categories. - New string is added to resources. ru-RU.rc and uk-UA.rc strings are translated. CORE-13789
This commit is contained in:
parent
06abd3b480
commit
58f8fa9ec8
27 changed files with 92 additions and 19 deletions
|
@ -19,12 +19,9 @@
|
|||
|
||||
// CAvailableApplicationInfo
|
||||
CAvailableApplicationInfo::CAvailableApplicationInfo(const ATL::CStringW& sFileNameParam)
|
||||
: m_IsInstalled(FALSE), m_HasLanguageInfo(FALSE), m_HasInstalledVersion(FALSE)
|
||||
: m_IsSelected(FALSE), m_LicenseType(LICENSE_NONE), m_sFileName(sFileNameParam),
|
||||
m_IsInstalled(FALSE), m_HasLanguageInfo(FALSE), m_HasInstalledVersion(FALSE)
|
||||
{
|
||||
m_LicenseType = LICENSE_NONE;
|
||||
|
||||
m_sFileName = sFileNameParam;
|
||||
|
||||
RetrieveGeneralInfo();
|
||||
}
|
||||
|
||||
|
@ -355,17 +352,15 @@ BOOL CAvailableApps::Enum(INT EnumType, AVAILENUMPROC lpEnumProc)
|
|||
m_InfoList.AddTail(Info);
|
||||
|
||||
skip_if_cached:
|
||||
if (Info->m_Category == FALSE)
|
||||
continue;
|
||||
|
||||
if (EnumType != Info->m_Category && EnumType != ENUM_ALL_AVAILABLE)
|
||||
continue;
|
||||
|
||||
Info->RefreshAppInfo();
|
||||
|
||||
if (lpEnumProc)
|
||||
lpEnumProc(Info, m_Strings.szAppsPath.GetString());
|
||||
if (EnumType == Info->m_Category
|
||||
|| EnumType == ENUM_ALL_AVAILABLE
|
||||
|| (EnumType == ENUM_CAT_SELECTED && Info->m_IsSelected))
|
||||
{
|
||||
Info->RefreshAppInfo();
|
||||
|
||||
if (lpEnumProc)
|
||||
lpEnumProc(Info, m_Strings.szAppsPath.GetString());
|
||||
}
|
||||
} while (FindNextFileW(hFind, &FindFileData) != 0);
|
||||
|
||||
FindClose(hFind);
|
||||
|
@ -407,6 +402,23 @@ ATL::CSimpleArray<CAvailableApplicationInfo> CAvailableApps::FindInfoList(const
|
|||
return result;
|
||||
}
|
||||
|
||||
ATL::CSimpleArray<CAvailableApplicationInfo> CAvailableApps::GetSelected() const
|
||||
{
|
||||
ATL::CSimpleArray<CAvailableApplicationInfo> result;
|
||||
POSITION CurrentListPosition = m_InfoList.GetHeadPosition();
|
||||
CAvailableApplicationInfo* Info;
|
||||
|
||||
while (CurrentListPosition != NULL)
|
||||
{
|
||||
Info = m_InfoList.GetNext(CurrentListPosition);
|
||||
if (Info->m_IsSelected)
|
||||
{
|
||||
result.Add(*Info);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
const ATL::CStringW& CAvailableApps::GetFolderPath() const
|
||||
{
|
||||
return m_Strings.szPath;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue