Author: ashaposhnikov
Date: Sat Aug 26 19:41:09 2017
New Revision: 75681
URL:
http://svn.reactos.org/svn/reactos?rev=75681&view=rev
Log:
[RAPPS]
- Fixed switching between "Installed" and "Available"
- Added default icon to "Installed"
Modified:
branches/GSoC_2017/rapps/reactos/base/applications/rapps/available.cpp
branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/available.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
==============================================================================
--- branches/GSoC_2017/rapps/reactos/base/applications/rapps/available.cpp [iso-8859-1]
(original)
+++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/available.cpp [iso-8859-1]
Sat Aug 26 19:41:09 2017
@@ -240,12 +240,11 @@
/* loop and deallocate all the cached app infos in the list */
while (InfoListPosition)
{
- CAvailableApplicationInfo* Info = m_InfoList.GetAt(InfoListPosition);
- m_InfoList.RemoveHead();
+ CAvailableApplicationInfo* Info = m_InfoList.GetNext(InfoListPosition);
delete Info;
-
- InfoListPosition = m_InfoList.GetHeadPosition();
- }
+ }
+
+ m_InfoList.RemoveAll();
}
VOID CAvailableApps::DeleteCurrentAppsDB()
@@ -317,6 +316,7 @@
BOOL CAvailableApps::EnumAvailableApplications(INT EnumType, AVAILENUMPROC lpEnumProc)
{
+
HANDLE hFind = INVALID_HANDLE_VALUE;
WIN32_FIND_DATAW FindFileData;
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
==============================================================================
--- branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp [iso-8859-1]
(original)
+++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp [iso-8859-1] Sat Aug
26 19:41:09 2017
@@ -1396,14 +1396,12 @@
return TRUE;
}
- ItemInfo = (PINSTALLED_INFO) HeapAlloc(GetProcessHeap(), 0,
sizeof(INSTALLED_INFO));
+ ItemInfo = new INSTALLED_INFO(*Info);
if (!ItemInfo)
{
RegCloseKey(Info->hSubKey);
return FALSE;
}
-
- RtlCopyMemory(ItemInfo, Info, sizeof(INSTALLED_INFO));
Index = ListViewAddItem(ItemIndex, 0, szName, (LPARAM) ItemInfo);
@@ -1481,7 +1479,7 @@
nSelectedApps = 0;
if (EnumType < 0) EnumType = SelectedEnumType;
- if (IS_INSTALLED_ENUM(EnumType))
+ if (IS_INSTALLED_ENUM(SelectedEnumType))
{
FreeInstalledAppList();
}
@@ -1501,6 +1499,9 @@
if (IS_INSTALLED_ENUM(EnumType))
{
+ HICON hIcon = (HICON) LoadIconW(hInst, MAKEINTRESOURCEW(IDI_MAIN));
+ ImageList_AddIcon(hImageListView, hIcon);
+ DestroyIcon(hIcon);
/* Enum installed applications and updates */
EnumInstalledApplications(EnumType, TRUE, s_EnumInstalledAppProc);
EnumInstalledApplications(EnumType, FALSE, s_EnumInstalledAppProc);