[RAPPS] Minor formatting.

This commit is contained in:
Hermès Bélusca-Maïto 2021-12-29 01:16:42 +01:00
parent d30e5eb51c
commit 35efa2b9c7
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
3 changed files with 15 additions and 17 deletions

View file

@ -1414,7 +1414,7 @@ BOOL CAppsListView::AddInstalledApplication(CInstalledApplicationInfo *InstAppIn
if (!hIcon) if (!hIcon)
{ {
/* Load default icon */ /* Load the default icon */
hIcon = LoadIconW(hInst, MAKEINTRESOURCEW(IDI_MAIN)); hIcon = LoadIconW(hInst, MAKEINTRESOURCEW(IDI_MAIN));
} }
@ -1442,17 +1442,17 @@ BOOL CAppsListView::AddAvailableApplication(CAvailableApplicationInfo *AvlbAppIn
if (AvlbAppInfo->RetrieveIcon(szIconPath)) if (AvlbAppInfo->RetrieveIcon(szIconPath))
{ {
hIcon = (HICON)LoadImageW(NULL, hIcon = (HICON)LoadImageW(NULL,
szIconPath.GetString(), szIconPath.GetString(),
IMAGE_ICON, IMAGE_ICON,
LISTVIEW_ICON_SIZE, LISTVIEW_ICON_SIZE,
LISTVIEW_ICON_SIZE, LISTVIEW_ICON_SIZE,
LR_LOADFROMFILE); LR_LOADFROMFILE);
} }
if (!hIcon || GetLastError() != ERROR_SUCCESS) if (!hIcon || GetLastError() != ERROR_SUCCESS)
{ {
/* Load default icon */ /* Load the default icon */
hIcon = (HICON)LoadIconW(hInst, MAKEINTRESOURCEW(IDI_MAIN)); hIcon = LoadIconW(hInst, MAKEINTRESOURCEW(IDI_MAIN));
} }
int IconIndex = ImageList_AddIcon(m_hImageListView, hIcon); int IconIndex = ImageList_AddIcon(m_hImageListView, hIcon);

View file

@ -15,7 +15,7 @@
#include "dialogs.h" #include "dialogs.h"
// CAvailableApplicationInfo // CAvailableApplicationInfo
CAvailableApplicationInfo::CAvailableApplicationInfo(const ATL::CStringW& sFileNameParam, AvailableStrings& AvlbStrings) CAvailableApplicationInfo::CAvailableApplicationInfo(const ATL::CStringW& sFileNameParam, AvailableStrings& AvlbStrings)
: m_LicenseType(LICENSE_NONE), m_SizeBytes(0), m_sFileName(sFileNameParam), : m_LicenseType(LICENSE_NONE), m_SizeBytes(0), m_sFileName(sFileNameParam),
m_IsInstalled(FALSE), m_HasLanguageInfo(FALSE), m_HasInstalledVersion(FALSE) m_IsInstalled(FALSE), m_HasLanguageInfo(FALSE), m_HasInstalledVersion(FALSE)
@ -38,7 +38,8 @@ VOID CAvailableApplicationInfo::RetrieveGeneralInfo(AvailableStrings& AvlbString
// TODO: I temporarily use the file name (without suffix) as package name. // TODO: I temporarily use the file name (without suffix) as package name.
// It should be better to put this in a field of ini file. // It should be better to put this in a field of ini file.
// consider write a converter to do this and write a github action for rapps-db to ensure package_name is unique. // Consider writing a converter to do this and write a github action for
// rapps-db to ensure package_name is unique.
m_szPkgName = m_sFileName; m_szPkgName = m_sFileName;
PathRemoveExtensionW(m_szPkgName.GetBuffer(MAX_PATH)); PathRemoveExtensionW(m_szPkgName.GetBuffer(MAX_PATH));
m_szPkgName.ReleaseBuffer(); m_szPkgName.ReleaseBuffer();
@ -72,7 +73,6 @@ VOID CAvailableApplicationInfo::RetrieveGeneralInfo(AvailableStrings& AvlbString
break; break;
} }
if (PathIsURLW(ScrnshotLocation.GetString())) if (PathIsURLW(ScrnshotLocation.GetString()))
{ {
m_szScrnshotLocation.Add(ScrnshotLocation); m_szScrnshotLocation.Add(ScrnshotLocation);
@ -416,7 +416,7 @@ BOOL CAvailableApps::UpdateAppsDB()
return FALSE; return FALSE;
} }
//if there are some files in the db folder - we're good // If there are some files in the db folder, we're good
hFind = FindFirstFileW(m_Strings.szSearchPath, &FindFileData); hFind = FindFirstFileW(m_Strings.szSearchPath, &FindFileData);
if (hFind != INVALID_HANDLE_VALUE) if (hFind != INVALID_HANDLE_VALUE)
{ {
@ -425,7 +425,7 @@ BOOL CAvailableApps::UpdateAppsDB()
} }
DownloadApplicationsDB(SettingsInfo.bUseSource ? SettingsInfo.szSourceURL : APPLICATION_DATABASE_URL, DownloadApplicationsDB(SettingsInfo.bUseSource ? SettingsInfo.szSourceURL : APPLICATION_DATABASE_URL,
!SettingsInfo.bUseSource); !SettingsInfo.bUseSource);
if (!ExtractFilesFromCab(m_Strings.szCabName, if (!ExtractFilesFromCab(m_Strings.szCabName,
m_Strings.szCabDir, m_Strings.szCabDir,

View file

@ -6,8 +6,8 @@
* Copyright 2015 Ismael Ferreras Morezuelas (swyterzone+ros@gmail.com) * Copyright 2015 Ismael Ferreras Morezuelas (swyterzone+ros@gmail.com)
* Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org) * Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org)
*/ */
#include "rapps.h"
#include "rapps.h"
#include "misc.h" #include "misc.h"
static HANDLE hLog = NULL; static HANDLE hLog = NULL;
@ -197,7 +197,7 @@ VOID InitLogs()
} }
dwData = EVENTLOG_ERROR_TYPE | EVENTLOG_WARNING_TYPE | dwData = EVENTLOG_ERROR_TYPE | EVENTLOG_WARNING_TYPE |
EVENTLOG_INFORMATION_TYPE; EVENTLOG_INFORMATION_TYPE;
if ((key.SetStringValue(L"EventMessageFile", if ((key.SetStringValue(L"EventMessageFile",
szPath, szPath,
@ -215,7 +215,6 @@ VOID InitLogs()
} }
} }
VOID FreeLogs() VOID FreeLogs()
{ {
if (hLog) if (hLog)
@ -224,7 +223,6 @@ VOID FreeLogs()
} }
} }
BOOL WriteLogMessage(WORD wType, DWORD dwEventID, LPCWSTR lpMsg) BOOL WriteLogMessage(WORD wType, DWORD dwEventID, LPCWSTR lpMsg)
{ {
if (!SettingsInfo.bLogEnabled) if (!SettingsInfo.bLogEnabled)