mirror of
https://github.com/reactos/reactos.git
synced 2025-04-28 01:11:35 +00:00
[RAPPS] Style-addendum, no functional change (#5091)
* Just rename the 4 new files. Absolutely no other change. * CMakeLists.txt, adapt the filenames * Adapt all includes to make it compile * CApplicationDB->CAppDB * CApplicationInfo->CAppInfo * Follow Mark Jansens good example and antipad the headers
This commit is contained in:
parent
60851914a8
commit
a9b1e059f4
21 changed files with 133 additions and 133 deletions
|
@ -5,8 +5,8 @@ include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
|
|||
include_directories(include)
|
||||
|
||||
list(APPEND SOURCE
|
||||
applicationdb.cpp
|
||||
applicationinfo.cpp
|
||||
appdb.cpp
|
||||
appinfo.cpp
|
||||
appview.cpp
|
||||
asyncinet.cpp
|
||||
cabinet.cpp
|
||||
|
@ -19,8 +19,8 @@ list(APPEND SOURCE
|
|||
settingsdlg.cpp
|
||||
unattended.cpp
|
||||
winmain.cpp
|
||||
include/applicationdb.h
|
||||
include/applicationinfo.h
|
||||
include/appdb.h
|
||||
include/appinfo.h
|
||||
include/appview.h
|
||||
include/asyncinet.h
|
||||
include/configparser.h
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
* PROJECT: ReactOS Applications Manager
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Classes for working with available applications
|
||||
* COPYRIGHT: Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org)
|
||||
* Copyright 2020 He Yang (1160386205@qq.com)
|
||||
* COPYRIGHT: Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org)
|
||||
* Copyright 2020 He Yang (1160386205@qq.com)
|
||||
* Copyright 2021-2023 Mark Jansen <mark.jansen@reactos.org>
|
||||
*/
|
||||
|
||||
#include "rapps.h"
|
||||
#include "applicationdb.h"
|
||||
#include "appdb.h"
|
||||
#include "configparser.h"
|
||||
#include "settings.h"
|
||||
|
||||
|
@ -18,29 +18,29 @@ static REGSAM g_RegSamEnum[3] = {KEY_WOW64_32KEY, KEY_WOW64_32KEY, KEY_WOW64_64K
|
|||
#define UNINSTALL_SUBKEY L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall"
|
||||
|
||||
static VOID
|
||||
ClearList(CAtlList<CApplicationInfo *> &list)
|
||||
ClearList(CAtlList<CAppInfo *> &list)
|
||||
{
|
||||
POSITION InfoListPosition = list.GetHeadPosition();
|
||||
while (InfoListPosition)
|
||||
{
|
||||
CApplicationInfo *Info = list.GetNext(InfoListPosition);
|
||||
CAppInfo *Info = list.GetNext(InfoListPosition);
|
||||
delete Info;
|
||||
}
|
||||
list.RemoveAll();
|
||||
}
|
||||
|
||||
CApplicationDB::CApplicationDB(const CStringW &path) : m_BasePath(path)
|
||||
CAppDB::CAppDB(const CStringW &path) : m_BasePath(path)
|
||||
{
|
||||
m_BasePath.Canonicalize();
|
||||
}
|
||||
|
||||
CApplicationInfo *
|
||||
CApplicationDB::FindByPackageName(const CStringW &name)
|
||||
CAppInfo *
|
||||
CAppDB::FindByPackageName(const CStringW &name)
|
||||
{
|
||||
POSITION CurrentListPosition = m_Available.GetHeadPosition();
|
||||
while (CurrentListPosition)
|
||||
{
|
||||
CApplicationInfo *Info = m_Available.GetNext(CurrentListPosition);
|
||||
CAppInfo *Info = m_Available.GetNext(CurrentListPosition);
|
||||
if (Info->szIdentifier == name)
|
||||
{
|
||||
return Info;
|
||||
|
@ -50,16 +50,16 @@ CApplicationDB::FindByPackageName(const CStringW &name)
|
|||
}
|
||||
|
||||
void
|
||||
CApplicationDB::GetApps(CAtlList<CApplicationInfo *> &List, AppsCategories Type) const
|
||||
CAppDB::GetApps(CAtlList<CAppInfo *> &List, AppsCategories Type) const
|
||||
{
|
||||
const BOOL UseInstalled = IsInstalledEnum(Type);
|
||||
const CAtlList<CApplicationInfo *> &list = UseInstalled ? m_Installed : m_Available;
|
||||
const CAtlList<CAppInfo *> &list = UseInstalled ? m_Installed : m_Available;
|
||||
const BOOL IncludeAll = UseInstalled ? (Type == ENUM_ALL_INSTALLED) : (Type == ENUM_ALL_AVAILABLE);
|
||||
|
||||
POSITION CurrentListPosition = list.GetHeadPosition();
|
||||
while (CurrentListPosition)
|
||||
{
|
||||
CApplicationInfo *Info = list.GetNext(CurrentListPosition);
|
||||
CAppInfo *Info = list.GetNext(CurrentListPosition);
|
||||
|
||||
if (IncludeAll || Type == Info->iCategory)
|
||||
{
|
||||
|
@ -69,7 +69,7 @@ CApplicationDB::GetApps(CAtlList<CApplicationInfo *> &List, AppsCategories Type)
|
|||
}
|
||||
|
||||
BOOL
|
||||
CApplicationDB::EnumerateFiles()
|
||||
CAppDB::EnumerateFiles()
|
||||
{
|
||||
ClearList(m_Available);
|
||||
|
||||
|
@ -91,7 +91,7 @@ CApplicationDB::EnumerateFiles()
|
|||
PathRemoveExtensionW(szPkgName.GetBuffer(MAX_PATH));
|
||||
szPkgName.ReleaseBuffer();
|
||||
|
||||
CApplicationInfo *Info = FindByPackageName(szPkgName);
|
||||
CAppInfo *Info = FindByPackageName(szPkgName);
|
||||
ATLASSERT(Info == NULL);
|
||||
if (!Info)
|
||||
{
|
||||
|
@ -118,7 +118,7 @@ CApplicationDB::EnumerateFiles()
|
|||
}
|
||||
|
||||
VOID
|
||||
CApplicationDB::UpdateAvailable()
|
||||
CAppDB::UpdateAvailable()
|
||||
{
|
||||
if (!CreateDirectoryW(m_BasePath, NULL) && GetLastError() != ERROR_ALREADY_EXISTS)
|
||||
return;
|
||||
|
@ -142,7 +142,7 @@ CApplicationDB::UpdateAvailable()
|
|||
}
|
||||
|
||||
VOID
|
||||
CApplicationDB::UpdateInstalled()
|
||||
CAppDB::UpdateInstalled()
|
||||
{
|
||||
// Remove all old entries
|
||||
ClearList(m_Installed);
|
||||
|
@ -239,7 +239,7 @@ DeleteWithWildcard(const CPathW &Dir, const CStringW &Filter)
|
|||
}
|
||||
|
||||
VOID
|
||||
CApplicationDB::RemoveCached()
|
||||
CAppDB::RemoveCached()
|
||||
{
|
||||
// Delete icons
|
||||
CPathW AppsPath = m_BasePath;
|
||||
|
@ -263,7 +263,7 @@ CApplicationDB::RemoveCached()
|
|||
}
|
||||
|
||||
BOOL
|
||||
CApplicationDB::RemoveInstalledAppFromRegistry(const CApplicationInfo *Info)
|
||||
CAppDB::RemoveInstalledAppFromRegistry(const CAppInfo *Info)
|
||||
{
|
||||
// Validate that this is actually an installed app / update
|
||||
ATLASSERT(Info->iCategory == ENUM_INSTALLED_APPLICATIONS || Info->iCategory == ENUM_UPDATES);
|
|
@ -2,20 +2,20 @@
|
|||
* PROJECT: ReactOS Applications Manager
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Classes for working with available applications
|
||||
* COPYRIGHT: Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org)
|
||||
* Copyright 2020 He Yang (1160386205@qq.com)
|
||||
* COPYRIGHT: Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org)
|
||||
* Copyright 2020 He Yang (1160386205@qq.com)
|
||||
* Copyright 2021-2023 Mark Jansen <mark.jansen@reactos.org>
|
||||
*/
|
||||
|
||||
#include "rapps.h"
|
||||
#include "appview.h"
|
||||
|
||||
CApplicationInfo::CApplicationInfo(const CStringW &Identifier, AppsCategories Category)
|
||||
CAppInfo::CAppInfo(const CStringW &Identifier, AppsCategories Category)
|
||||
: szIdentifier(Identifier), iCategory(Category)
|
||||
{
|
||||
}
|
||||
|
||||
CApplicationInfo::~CApplicationInfo()
|
||||
CAppInfo::~CAppInfo()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ CAvailableApplicationInfo::CAvailableApplicationInfo(
|
|||
const CStringW &PkgName,
|
||||
AppsCategories Category,
|
||||
const CPathW &BasePath)
|
||||
: CApplicationInfo(PkgName, Category), m_Parser(Parser), m_ScrnshotRetrieved(false), m_LanguagesLoaded(false)
|
||||
: CAppInfo(PkgName, Category), m_Parser(Parser), m_ScrnshotRetrieved(false), m_LanguagesLoaded(false)
|
||||
{
|
||||
m_Parser->GetString(L"Name", szDisplayName);
|
||||
m_Parser->GetString(L"Version", szDisplayVersion);
|
||||
|
@ -369,7 +369,7 @@ CInstalledApplicationInfo::CInstalledApplicationInfo(
|
|||
const CStringW &KeyName,
|
||||
AppsCategories Category,
|
||||
int KeyIndex)
|
||||
: CApplicationInfo(KeyName, Category), m_hKey(Key), iKeyIndex(KeyIndex)
|
||||
: CAppInfo(KeyName, Category), m_hKey(Key), iKeyIndex(KeyIndex)
|
||||
{
|
||||
if (GetApplicationRegString(L"DisplayName", szDisplayName))
|
||||
{
|
|
@ -914,7 +914,7 @@ CAppInfoDisplay::Create(HWND hwndParent)
|
|||
}
|
||||
|
||||
VOID
|
||||
CAppInfoDisplay::ShowAppInfo(CApplicationInfo *Info)
|
||||
CAppInfoDisplay::ShowAppInfo(CAppInfo *Info)
|
||||
{
|
||||
CStringW ScrnshotLocation;
|
||||
if (Info->RetrieveScreenshot(ScrnshotLocation))
|
||||
|
@ -1280,7 +1280,7 @@ CAppsListView::SetViewMode(DWORD ViewMode)
|
|||
}
|
||||
|
||||
BOOL
|
||||
CAppsListView::AddApplication(CApplicationInfo *AppInfo, BOOL InitialCheckState)
|
||||
CAppsListView::AddApplication(CAppInfo *AppInfo, BOOL InitialCheckState)
|
||||
{
|
||||
if (ApplicationViewType == AppViewTypeInstalledApps)
|
||||
{
|
||||
|
@ -1474,7 +1474,7 @@ CApplicationView::ProcessWindowMessage(
|
|||
if (ApplicationViewType == AppViewTypeAvailableApps)
|
||||
{
|
||||
m_MainWindow->InstallApplication(
|
||||
(CApplicationInfo *)m_ListView->GetItemData(Item->iItem));
|
||||
(CAppInfo *)m_ListView->GetItemData(Item->iItem));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1851,7 +1851,7 @@ CApplicationView::SetDisplayAppType(APPLICATION_VIEW_TYPE AppType)
|
|||
}
|
||||
|
||||
BOOL
|
||||
CApplicationView::AddApplication(CApplicationInfo *AppInfo, BOOL InitialCheckState)
|
||||
CApplicationView::AddApplication(CAppInfo *AppInfo, BOOL InitialCheckState)
|
||||
{
|
||||
return m_ListView->AddApplication(AppInfo, InitialCheckState);
|
||||
}
|
||||
|
@ -1897,7 +1897,7 @@ CApplicationView::ItemGetFocus(LPVOID CallbackParam)
|
|||
{
|
||||
if (CallbackParam)
|
||||
{
|
||||
CApplicationInfo *Info = static_cast<CApplicationInfo *>(CallbackParam);
|
||||
CAppInfo *Info = static_cast<CAppInfo *>(CallbackParam);
|
||||
m_AppsInfo->ShowAppInfo(Info);
|
||||
|
||||
if (ApplicationViewType == AppViewTypeInstalledApps)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* PROJECT: ReactOS Applications Manager
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Async Internet operation using WinINet
|
||||
* COPYRIGHT: Copyright 2020 He Yang (1160386205@qq.com)
|
||||
* COPYRIGHT: Copyright 2020 He Yang (1160386205@qq.com)
|
||||
*/
|
||||
|
||||
#include "rapps.h"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* PROJECT: ReactOS Applications Manager
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Cabinet extraction using FDI API
|
||||
* COPYRIGHT: Copyright 2018 Alexander Shaposhnikov (sanchaez@reactos.org)
|
||||
* COPYRIGHT: Copyright 2018 Alexander Shaposhnikov (sanchaez@reactos.org)
|
||||
*/
|
||||
#include "rapps.h"
|
||||
#include <debug.h>
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
* PROJECT: ReactOS Applications Manager
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: GUI classes for RAPPS
|
||||
* COPYRIGHT: Copyright 2015 David Quintana (gigaherz@gmail.com)
|
||||
* Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org)
|
||||
* Copyright 2020 He Yang (1160386205@qq.com)
|
||||
* COPYRIGHT: Copyright 2015 David Quintana (gigaherz@gmail.com)
|
||||
* Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org)
|
||||
* Copyright 2020 He Yang (1160386205@qq.com)
|
||||
*/
|
||||
|
||||
#include "rapps.h"
|
||||
|
@ -86,7 +86,7 @@ CSideTreeView::~CSideTreeView()
|
|||
|
||||
// **** CMainWindow ****
|
||||
|
||||
CMainWindow::CMainWindow(CApplicationDB *db) : m_ClientPanel(NULL), m_Db(db), SelectedEnumType(ENUM_ALL_INSTALLED)
|
||||
CMainWindow::CMainWindow(CAppDB *db) : m_ClientPanel(NULL), m_Db(db), SelectedEnumType(ENUM_ALL_INSTALLED)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -276,7 +276,7 @@ CMainWindow::RemoveSelectedAppFromRegistry()
|
|||
|
||||
if (MessageBoxW(szMsgText, szMsgTitle, MB_YESNO | MB_ICONQUESTION) == IDYES)
|
||||
{
|
||||
CApplicationInfo *InstalledApp = (CApplicationInfo *)m_ApplicationView->GetFocusedItemData();
|
||||
CAppInfo *InstalledApp = (CAppInfo *)m_ApplicationView->GetFocusedItemData();
|
||||
if (!InstalledApp)
|
||||
return FALSE;
|
||||
|
||||
|
@ -292,7 +292,7 @@ CMainWindow::UninstallSelectedApp(BOOL bModify)
|
|||
if (!IsInstalledEnum(SelectedEnumType))
|
||||
return FALSE;
|
||||
|
||||
CApplicationInfo *InstalledApp = (CApplicationInfo *)m_ApplicationView->GetFocusedItemData();
|
||||
CAppInfo *InstalledApp = (CAppInfo *)m_ApplicationView->GetFocusedItemData();
|
||||
if (!InstalledApp)
|
||||
return FALSE;
|
||||
|
||||
|
@ -517,7 +517,7 @@ CMainWindow::OnCommand(WPARAM wParam, LPARAM lParam)
|
|||
}
|
||||
else
|
||||
{
|
||||
CApplicationInfo *App = (CApplicationInfo *)m_ApplicationView->GetFocusedItemData();
|
||||
CAppInfo *App = (CAppInfo *)m_ApplicationView->GetFocusedItemData();
|
||||
if (App)
|
||||
{
|
||||
InstallApplication(App);
|
||||
|
@ -578,12 +578,12 @@ CMainWindow::UpdateStatusBarText()
|
|||
}
|
||||
|
||||
VOID
|
||||
CMainWindow::AddApplicationsToView(CAtlList<CApplicationInfo *> &List)
|
||||
CMainWindow::AddApplicationsToView(CAtlList<CAppInfo *> &List)
|
||||
{
|
||||
POSITION CurrentListPosition = List.GetHeadPosition();
|
||||
while (CurrentListPosition)
|
||||
{
|
||||
CApplicationInfo *Info = List.GetNext(CurrentListPosition);
|
||||
CAppInfo *Info = List.GetNext(CurrentListPosition);
|
||||
if (szSearchPattern.IsEmpty() || SearchPatternMatch(Info->szDisplayName, szSearchPattern) ||
|
||||
SearchPatternMatch(Info->szComments, szSearchPattern))
|
||||
{
|
||||
|
@ -613,7 +613,7 @@ CMainWindow::UpdateApplicationsList(AppsCategories EnumType, BOOL bReload)
|
|||
// set the display type of application-view. this will remove all the item in application-view too.
|
||||
m_ApplicationView->SetDisplayAppType(AppViewTypeInstalledApps);
|
||||
|
||||
CAtlList<CApplicationInfo *> List;
|
||||
CAtlList<CAppInfo *> List;
|
||||
m_Db->GetApps(List, EnumType);
|
||||
AddApplicationsToView(List);
|
||||
}
|
||||
|
@ -632,7 +632,7 @@ CMainWindow::UpdateApplicationsList(AppsCategories EnumType, BOOL bReload)
|
|||
}
|
||||
else
|
||||
{
|
||||
CAtlList<CApplicationInfo *> List;
|
||||
CAtlList<CAppInfo *> List;
|
||||
m_Db->GetApps(List, EnumType);
|
||||
AddApplicationsToView(List);
|
||||
}
|
||||
|
@ -697,7 +697,7 @@ CMainWindow::ItemCheckStateChanged(BOOL bChecked, LPVOID CallbackParam)
|
|||
if (bUpdating)
|
||||
return;
|
||||
|
||||
CApplicationInfo *Info = (CApplicationInfo *)CallbackParam;
|
||||
CAppInfo *Info = (CAppInfo *)CallbackParam;
|
||||
|
||||
if (bChecked)
|
||||
{
|
||||
|
@ -720,7 +720,7 @@ CMainWindow::ItemCheckStateChanged(BOOL bChecked, LPVOID CallbackParam)
|
|||
// this function is called when one or more application(s) should be installed
|
||||
// if Info is not zero, this app should be installed. otherwise those checked apps should be installed
|
||||
BOOL
|
||||
CMainWindow::InstallApplication(CApplicationInfo *Info)
|
||||
CMainWindow::InstallApplication(CAppInfo *Info)
|
||||
{
|
||||
if (Info)
|
||||
{
|
||||
|
@ -785,7 +785,7 @@ CMainWindow::HandleTabOrder(int direction)
|
|||
// **** CMainWindow ****
|
||||
|
||||
VOID
|
||||
MainWindowLoop(CApplicationDB *db, INT nShowCmd)
|
||||
MainWindowLoop(CAppDB *db, INT nShowCmd)
|
||||
{
|
||||
HACCEL KeyBrd;
|
||||
MSG Msg;
|
||||
|
|
35
base/applications/rapps/include/appdb.h
Normal file
35
base/applications/rapps/include/appdb.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
#pragma once
|
||||
|
||||
#include <atlcoll.h>
|
||||
#include <atlpath.h>
|
||||
|
||||
#include "appinfo.h"
|
||||
|
||||
class CAppDB
|
||||
{
|
||||
private:
|
||||
CPathW m_BasePath;
|
||||
CAtlList<CAppInfo *> m_Available;
|
||||
CAtlList<CAppInfo *> m_Installed;
|
||||
|
||||
BOOL
|
||||
EnumerateFiles();
|
||||
|
||||
public:
|
||||
CAppDB(const CStringW &path);
|
||||
|
||||
VOID
|
||||
GetApps(CAtlList<CAppInfo *> &List, AppsCategories Type) const;
|
||||
CAppInfo *
|
||||
FindByPackageName(const CStringW &name);
|
||||
|
||||
VOID
|
||||
UpdateAvailable();
|
||||
VOID
|
||||
UpdateInstalled();
|
||||
VOID
|
||||
RemoveCached();
|
||||
|
||||
BOOL
|
||||
RemoveInstalledAppFromRegistry(const CAppInfo *Info);
|
||||
};
|
|
@ -65,11 +65,11 @@ IsInstalledEnum(INT x)
|
|||
|
||||
class CAppRichEdit;
|
||||
|
||||
class CApplicationInfo
|
||||
class CAppInfo
|
||||
{
|
||||
public:
|
||||
CApplicationInfo(const CStringW &Identifier, AppsCategories Category);
|
||||
virtual ~CApplicationInfo();
|
||||
CAppInfo(const CStringW &Identifier, AppsCategories Category);
|
||||
virtual ~CAppInfo();
|
||||
|
||||
const CStringW szIdentifier; // PkgName or KeyName
|
||||
const AppsCategories iCategory;
|
||||
|
@ -97,7 +97,7 @@ class CApplicationInfo
|
|||
UninstallApplication(BOOL bModify) = 0;
|
||||
};
|
||||
|
||||
class CAvailableApplicationInfo : public CApplicationInfo
|
||||
class CAvailableApplicationInfo : public CAppInfo
|
||||
{
|
||||
class CConfigParser *m_Parser;
|
||||
CSimpleArray<CStringW> m_szScrnshotLocation;
|
||||
|
@ -143,7 +143,7 @@ class CAvailableApplicationInfo : public CApplicationInfo
|
|||
UninstallApplication(BOOL bModify) override;
|
||||
};
|
||||
|
||||
class CInstalledApplicationInfo : public CApplicationInfo
|
||||
class CInstalledApplicationInfo : public CAppInfo
|
||||
{
|
||||
CRegKey m_hKey;
|
||||
CStringW m_szInstallDate;
|
|
@ -1,35 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <atlcoll.h>
|
||||
#include <atlpath.h>
|
||||
|
||||
#include "applicationinfo.h"
|
||||
|
||||
class CApplicationDB
|
||||
{
|
||||
private:
|
||||
CPathW m_BasePath;
|
||||
CAtlList<CApplicationInfo *> m_Available;
|
||||
CAtlList<CApplicationInfo *> m_Installed;
|
||||
|
||||
BOOL
|
||||
EnumerateFiles();
|
||||
|
||||
public:
|
||||
CApplicationDB(const CStringW &path);
|
||||
|
||||
VOID
|
||||
GetApps(CAtlList<CApplicationInfo *> &List, AppsCategories Type) const;
|
||||
CApplicationInfo *
|
||||
FindByPackageName(const CStringW &name);
|
||||
|
||||
VOID
|
||||
UpdateAvailable();
|
||||
VOID
|
||||
UpdateInstalled();
|
||||
VOID
|
||||
RemoveCached();
|
||||
|
||||
BOOL
|
||||
RemoveInstalledAppFromRegistry(const CApplicationInfo *Info);
|
||||
};
|
|
@ -177,7 +177,7 @@ class CAppInfoDisplay : public CUiWindow<CWindowImpl<CAppInfoDisplay>>
|
|||
Create(HWND hwndParent);
|
||||
|
||||
VOID
|
||||
ShowAppInfo(CApplicationInfo *Info);
|
||||
ShowAppInfo(CAppInfo *Info);
|
||||
VOID
|
||||
SetWelcomeText();
|
||||
VOID
|
||||
|
@ -263,7 +263,7 @@ class CAppsListView : public CUiWindow<CWindowImpl<CAppsListView, CListView>>
|
|||
SetViewMode(DWORD ViewMode);
|
||||
|
||||
BOOL
|
||||
AddApplication(CApplicationInfo *AppInfo, BOOL InitialCheckState);
|
||||
AddApplication(CAppInfo *AppInfo, BOOL InitialCheckState);
|
||||
|
||||
// this function is called when parent window receiving an notification about checkstate changing
|
||||
VOID
|
||||
|
@ -397,7 +397,7 @@ class CApplicationView : public CUiWindow<CWindowImpl<CApplicationView>>
|
|||
SetDisplayAppType(APPLICATION_VIEW_TYPE AppType);
|
||||
|
||||
BOOL
|
||||
AddApplication(CApplicationInfo *InstAppInfo, BOOL InitialCheckState);
|
||||
AddApplication(CAppInfo *InstAppInfo, BOOL InitialCheckState);
|
||||
VOID
|
||||
SetWatermark(const CStringW &Text);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "applicationinfo.h"
|
||||
#include "appinfo.h"
|
||||
|
||||
#include <windef.h>
|
||||
#include <atlsimpcoll.h>
|
||||
|
@ -11,12 +11,12 @@ CreateSettingsDlg(HWND hwnd);
|
|||
|
||||
// Main window
|
||||
VOID
|
||||
MainWindowLoop(class CApplicationDB *db, INT nShowCmd);
|
||||
MainWindowLoop(class CAppDB *db, INT nShowCmd);
|
||||
|
||||
// Download dialogs
|
||||
VOID
|
||||
DownloadApplicationsDB(LPCWSTR lpUrl, BOOL IsOfficial);
|
||||
BOOL
|
||||
DownloadApplication(CApplicationInfo *pAppInfo);
|
||||
DownloadApplication(CAppInfo *pAppInfo);
|
||||
BOOL
|
||||
DownloadListOfApplications(const CAtlList<CApplicationInfo *> &AppsList, BOOL bIsModal);
|
||||
DownloadListOfApplications(const CAtlList<CAppInfo *> &AppsList, BOOL bIsModal);
|
||||
|
|
|
@ -54,8 +54,8 @@ class CMainWindow : public CWindowImpl<CMainWindow, CWindow, CFrameWinTraits>
|
|||
|
||||
CApplicationView *m_ApplicationView = NULL;
|
||||
|
||||
CApplicationDB *m_Db;
|
||||
CAtlList<CApplicationInfo *> m_Selected;
|
||||
CAppDB *m_Db;
|
||||
CAtlList<CAppInfo *> m_Selected;
|
||||
|
||||
BOOL bUpdating = FALSE;
|
||||
|
||||
|
@ -63,7 +63,7 @@ class CMainWindow : public CWindowImpl<CMainWindow, CWindow, CFrameWinTraits>
|
|||
AppsCategories SelectedEnumType;
|
||||
|
||||
public:
|
||||
CMainWindow(CApplicationDB *db);
|
||||
CMainWindow(CAppDB *db);
|
||||
|
||||
~CMainWindow();
|
||||
|
||||
|
@ -106,7 +106,7 @@ class CMainWindow : public CWindowImpl<CMainWindow, CWindow, CFrameWinTraits>
|
|||
VOID
|
||||
UpdateApplicationsList(AppsCategories EnumType, BOOL bReload = FALSE);
|
||||
VOID
|
||||
AddApplicationsToView(CAtlList<CApplicationInfo *> &List);
|
||||
AddApplicationsToView(CAtlList<CAppInfo *> &List);
|
||||
|
||||
public:
|
||||
static ATL::CWndClassInfo &
|
||||
|
@ -123,7 +123,7 @@ class CMainWindow : public CWindowImpl<CMainWindow, CWindow, CFrameWinTraits>
|
|||
// this function is called when application-view is asked to install an application
|
||||
// if Info is not zero, this app should be installed. otherwise those checked apps should be installed
|
||||
BOOL
|
||||
InstallApplication(CApplicationInfo *Info);
|
||||
InstallApplication(CAppInfo *Info);
|
||||
|
||||
// this function is called when search text is changed
|
||||
BOOL
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
#include "defines.h"
|
||||
|
||||
#include "dialogs.h"
|
||||
#include "applicationinfo.h"
|
||||
#include "applicationdb.h"
|
||||
#include "appinfo.h"
|
||||
#include "appdb.h"
|
||||
#include "misc.h"
|
||||
#include "configparser.h"
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
||||
* FILE: base/applications/rapps/include/rosui.h
|
||||
* PURPOSE: ATL Layout engine for RAPPS
|
||||
* COPYRIGHT: Copyright 2015 David Quintana (gigaherz@gmail.com)
|
||||
* COPYRIGHT: Copyright 2015 David Quintana (gigaherz@gmail.com)
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
* PROJECT: ReactOS Applications Manager
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Displaying a download dialog
|
||||
* COPYRIGHT: Copyright 2001 John R. Sheets (for CodeWeavers)
|
||||
* Copyright 2004 Mike McCormack (for CodeWeavers)
|
||||
* Copyright 2005 Ge van Geldorp (gvg@reactos.org)
|
||||
* Copyright 2009 Dmitry Chapyshev (dmitry@reactos.org)
|
||||
* COPYRIGHT: Copyright 2001 John R. Sheets (for CodeWeavers)
|
||||
* Copyright 2004 Mike McCormack (for CodeWeavers)
|
||||
* Copyright 2005 Ge van Geldorp (gvg@reactos.org)
|
||||
* Copyright 2009 Dmitry Chapyshev (dmitry@reactos.org)
|
||||
* Copyright 2015 Ismael Ferreras Morezuelas (swyterzone+ros@gmail.com)
|
||||
* Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org)
|
||||
* Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org)
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -85,7 +85,7 @@ struct DownloadInfo
|
|||
DownloadInfo()
|
||||
{
|
||||
}
|
||||
DownloadInfo(const CApplicationInfo &AppInfo) : DLType(DLTYPE_APPLICATION)
|
||||
DownloadInfo(const CAppInfo &AppInfo) : DLType(DLTYPE_APPLICATION)
|
||||
{
|
||||
AppInfo.GetDownloadInfo(szUrl, szSHA1, SizeInBytes);
|
||||
szName = AppInfo.szDisplayName;
|
||||
|
@ -1052,7 +1052,7 @@ CDownloadManager::LaunchDownloadDialog(BOOL bIsModal)
|
|||
// CDownloadManager
|
||||
|
||||
BOOL
|
||||
DownloadListOfApplications(const CAtlList<CApplicationInfo *> &AppsList, BOOL bIsModal)
|
||||
DownloadListOfApplications(const CAtlList<CAppInfo *> &AppsList, BOOL bIsModal)
|
||||
{
|
||||
if (AppsList.IsEmpty())
|
||||
return FALSE;
|
||||
|
@ -1060,7 +1060,7 @@ DownloadListOfApplications(const CAtlList<CApplicationInfo *> &AppsList, BOOL bI
|
|||
POSITION CurrentListPosition = AppsList.GetHeadPosition();
|
||||
while (CurrentListPosition)
|
||||
{
|
||||
const CApplicationInfo *Info = AppsList.GetNext(CurrentListPosition);
|
||||
const CAppInfo *Info = AppsList.GetNext(CurrentListPosition);
|
||||
CDownloadManager::Add(DownloadInfo(*Info));
|
||||
}
|
||||
|
||||
|
@ -1071,7 +1071,7 @@ DownloadListOfApplications(const CAtlList<CApplicationInfo *> &AppsList, BOOL bI
|
|||
}
|
||||
|
||||
BOOL
|
||||
DownloadApplication(CApplicationInfo *pAppInfo)
|
||||
DownloadApplication(CAppInfo *pAppInfo)
|
||||
{
|
||||
if (!pAppInfo)
|
||||
return FALSE;
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
* PROJECT: ReactOS Applications Manager
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Misc functions
|
||||
* COPYRIGHT: Copyright 2009 Dmitry Chapyshev (dmitry@reactos.org)
|
||||
* COPYRIGHT: Copyright 2009 Dmitry Chapyshev (dmitry@reactos.org)
|
||||
* 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"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* PROJECT: ReactOS Applications Manager
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Functions to load / save settings from reg.
|
||||
* COPYRIGHT: Copyright 2020 He Yang (1160386205@qq.com)
|
||||
* COPYRIGHT: Copyright 2020 He Yang (1160386205@qq.com)
|
||||
*/
|
||||
|
||||
#include "rapps.h"
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
* PROJECT: ReactOS Applications Manager
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Settings Dialog
|
||||
* COPYRIGHT: Copyright 2009 Dmitry Chapyshev (dmitry@reactos.org)
|
||||
* Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org)
|
||||
* COPYRIGHT: Copyright 2009 Dmitry Chapyshev (dmitry@reactos.org)
|
||||
* Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org)
|
||||
*/
|
||||
#include "rapps.h"
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Functions to parse command-line flags and process them
|
||||
* COPYRIGHT: Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org)
|
||||
* Copyright 2020 He Yang (1160386205@qq.com)
|
||||
* Copyright 2020 He Yang (1160386205@qq.com)
|
||||
*/
|
||||
|
||||
#include "rapps.h"
|
||||
|
@ -44,7 +44,7 @@ InitRappsConsole()
|
|||
}
|
||||
|
||||
static BOOL
|
||||
HandleInstallCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft)
|
||||
HandleInstallCommand(CAppDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft)
|
||||
{
|
||||
if (argcLeft < 1)
|
||||
{
|
||||
|
@ -53,11 +53,11 @@ HandleInstallCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
CAtlList<CApplicationInfo *> Applications;
|
||||
CAtlList<CAppInfo *> Applications;
|
||||
for (int i = 0; i < argcLeft; i++)
|
||||
{
|
||||
LPCWSTR PackageName = argvLeft[i];
|
||||
CApplicationInfo *AppInfo = db->FindByPackageName(PackageName);
|
||||
CAppInfo *AppInfo = db->FindByPackageName(PackageName);
|
||||
if (AppInfo)
|
||||
{
|
||||
Applications.AddTail(AppInfo);
|
||||
|
@ -68,7 +68,7 @@ HandleInstallCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR
|
|||
}
|
||||
|
||||
static BOOL
|
||||
HandleSetupCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft)
|
||||
HandleSetupCommand(CAppDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft)
|
||||
{
|
||||
if (argcLeft != 1)
|
||||
{
|
||||
|
@ -77,7 +77,7 @@ HandleSetupCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *a
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
CAtlList<CApplicationInfo *> Applications;
|
||||
CAtlList<CAppInfo *> Applications;
|
||||
HINF InfHandle = SetupOpenInfFileW(argvLeft[0], NULL, INF_STYLE_WIN4, NULL);
|
||||
if (InfHandle == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
|
@ -92,7 +92,7 @@ HandleSetupCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *a
|
|||
{
|
||||
if (SetupGetStringFieldW(&Context, 1, szPkgName, _countof(szPkgName), NULL))
|
||||
{
|
||||
CApplicationInfo *AppInfo = db->FindByPackageName(szPkgName);
|
||||
CAppInfo *AppInfo = db->FindByPackageName(szPkgName);
|
||||
if (AppInfo)
|
||||
{
|
||||
Applications.AddTail(AppInfo);
|
||||
|
@ -106,7 +106,7 @@ HandleSetupCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *a
|
|||
}
|
||||
|
||||
static BOOL
|
||||
HandleFindCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft)
|
||||
HandleFindCommand(CAppDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft)
|
||||
{
|
||||
if (argcLeft < 1)
|
||||
{
|
||||
|
@ -114,7 +114,7 @@ HandleFindCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *ar
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
CAtlList<CApplicationInfo *> List;
|
||||
CAtlList<CAppInfo *> List;
|
||||
db->GetApps(List, ENUM_ALL_AVAILABLE);
|
||||
|
||||
for (int i = 0; i < argcLeft; i++)
|
||||
|
@ -125,7 +125,7 @@ HandleFindCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *ar
|
|||
POSITION CurrentListPosition = List.GetHeadPosition();
|
||||
while (CurrentListPosition)
|
||||
{
|
||||
CApplicationInfo *Info = List.GetNext(CurrentListPosition);
|
||||
CAppInfo *Info = List.GetNext(CurrentListPosition);
|
||||
|
||||
if (SearchPatternMatch(Info->szDisplayName, lpszSearch) || SearchPatternMatch(Info->szComments, lpszSearch))
|
||||
{
|
||||
|
@ -140,7 +140,7 @@ HandleFindCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *ar
|
|||
}
|
||||
|
||||
static BOOL
|
||||
HandleInfoCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft)
|
||||
HandleInfoCommand(CAppDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft)
|
||||
{
|
||||
if (argcLeft < 1)
|
||||
{
|
||||
|
@ -151,7 +151,7 @@ HandleInfoCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *ar
|
|||
for (int i = 0; i < argcLeft; i++)
|
||||
{
|
||||
LPCWSTR PackageName = argvLeft[i];
|
||||
CApplicationInfo *AppInfo = db->FindByPackageName(PackageName);
|
||||
CAppInfo *AppInfo = db->FindByPackageName(PackageName);
|
||||
if (!AppInfo)
|
||||
{
|
||||
ConResMsgPrintf(StdOut, NULL, IDS_CMD_PACKAGE_NOT_FOUND, PackageName);
|
||||
|
@ -231,7 +231,7 @@ ParseCmdAndExecute(LPWSTR lpCmdLine, BOOL bIsFirstLaunch, int nCmdShow)
|
|||
|
||||
CStringW Directory;
|
||||
GetStorageDirectory(Directory);
|
||||
CApplicationDB db(Directory);
|
||||
CAppDB db(Directory);
|
||||
|
||||
if (SettingsInfo.bUpdateAtStart || bIsFirstLaunch)
|
||||
{
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
* PROJECT: ReactOS Applications Manager
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Main program
|
||||
* COPYRIGHT: Copyright 2009 Dmitry Chapyshev (dmitry@reactos.org)
|
||||
* COPYRIGHT: Copyright 2009 Dmitry Chapyshev (dmitry@reactos.org)
|
||||
* 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 "unattended.h"
|
||||
|
|
Loading…
Reference in a new issue