https://git.reactos.org/?p=reactos.git;a=commitdiff;h=acbb73a89def31981801b…
commit acbb73a89def31981801bd78c4d2f58fd7663c16
Author: Stanislav Motylkov <x86corez(a)gmail.com>
AuthorDate: Mon May 22 01:40:56 2023 +0300
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Sat May 27 15:38:01 2023 +0300
[RAPPS] Open "Installed" section in Appwiz-mode when RAPPS already runs
CORE-18981
---
base/applications/rapps/gui.cpp | 7 ++++++-
base/applications/rapps/include/gui.h | 1 +
base/applications/rapps/include/resource.h | 3 +++
base/applications/rapps/unattended.cpp | 2 ++
4 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/base/applications/rapps/gui.cpp b/base/applications/rapps/gui.cpp
index 9073b7bf957..9601a0c4585 100644
--- a/base/applications/rapps/gui.cpp
+++ b/base/applications/rapps/gui.cpp
@@ -94,7 +94,7 @@ CMainWindow::~CMainWindow()
VOID
CMainWindow::InitCategoriesList()
{
- HTREEITEM hRootItemInstalled, hRootItemAvailable;
+ HTREEITEM hRootItemAvailable;
hRootItemInstalled = m_TreeView->AddCategory(TVI_ROOT, IDS_INSTALLED,
IDI_CATEGORY);
m_TreeView->AddCategory(hRootItemInstalled, IDS_APPLICATIONS, IDI_APPS);
@@ -557,6 +557,11 @@ CMainWindow::OnCommand(WPARAM wParam, LPARAM lParam)
case ID_CHECK_ALL:
m_ApplicationView->CheckAll();
break;
+
+ case ID_ACTIVATE_APPWIZ:
+ if (hRootItemInstalled)
+ m_TreeView->SelectItem(hRootItemInstalled);
+ break;
}
}
}
diff --git a/base/applications/rapps/include/gui.h
b/base/applications/rapps/include/gui.h
index 07a07356475..e81b4eb8227 100644
--- a/base/applications/rapps/include/gui.h
+++ b/base/applications/rapps/include/gui.h
@@ -58,6 +58,7 @@ class CMainWindow : public CWindowImpl<CMainWindow, CWindow,
CFrameWinTraits>
BOOL bUpdating = FALSE;
BOOL bAppwizMode;
+ HTREEITEM hRootItemInstalled;
CStringW szSearchPattern;
AppsCategories SelectedEnumType;
diff --git a/base/applications/rapps/include/resource.h
b/base/applications/rapps/include/resource.h
index e85d2d3a024..c8a4e536644 100644
--- a/base/applications/rapps/include/resource.h
+++ b/base/applications/rapps/include/resource.h
@@ -85,6 +85,9 @@
#define ID_CHECK_ALL 562
#define ID_SEARCH 563
+/* Messages */
+#define ID_ACTIVATE_APPWIZ 600
+
/* Strings */
#define IDS_APPTITLE 100
#define IDS_SEARCH_TEXT 101
diff --git a/base/applications/rapps/unattended.cpp
b/base/applications/rapps/unattended.cpp
index a8a21d698aa..1525e4b07b9 100644
--- a/base/applications/rapps/unattended.cpp
+++ b/base/applications/rapps/unattended.cpp
@@ -259,6 +259,8 @@ ParseCmdAndExecute(LPWSTR lpCmdLine, BOOL bIsFirstLaunch, int
nCmdShow)
/* Activate window */
ShowWindow(hWindow, SW_SHOWNORMAL);
SetForegroundWindow(hWindow);
+ if (bAppwizMode)
+ PostMessage(hWindow, WM_COMMAND, ID_ACTIVATE_APPWIZ, 0);
return FALSE;
}