Author: gedmurphy
Date: Fri Oct 23 13:16:25 2015
New Revision: 69659
URL:
http://svn.reactos.org/svn/reactos?rev=69659&view=rev
Log:
[DEVMGR]
- Force all refreshes to go through the CDeviceManager method instead of calling
CDeviceView directly.
- Fixes missing checked radio item in the view menu on startup
Modified:
trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp
trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.h
trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp
trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.h
Modified: trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/D…
==============================================================================
--- trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp [iso-8859-1] Fri Oct 23 13:16:25
2015
@@ -188,8 +188,7 @@
CDeviceView::Refresh(
_In_ ViewType Type,
_In_ bool ScanForChanges,
- _In_ bool UpdateView,
- _In_opt_ LPWSTR DeviceId
+ _In_ bool UpdateView
)
{
// Enum devices on a seperate thread to keep the gui responsive
@@ -230,8 +229,7 @@
{
Refresh(GetCurrentView(),
true,
- true,
- NULL);
+ true);
break;
}
Modified: trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/D…
==============================================================================
--- trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.h [iso-8859-1] Fri Oct 23 13:16:25
2015
@@ -60,8 +60,7 @@
VOID Refresh(
_In_ ViewType Type,
_In_ bool ScanForChanges,
- _In_ bool UpdateView,
- _In_opt_ LPWSTR DeviceId
+ _In_ bool UpdateView
);
VOID DisplayPropertySheet();
Modified: trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/M…
==============================================================================
--- trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp [iso-8859-1] Fri Oct 23 13:16:25
2015
@@ -245,12 +245,13 @@
}
bool
-CDeviceManager::RefreshView(_In_ ViewType Type)
+CDeviceManager::RefreshView(_In_ ViewType Type,
+ _In_ bool ScanForChanges)
{
UINT CheckId = 0;
// Refreshed the cached view
- m_DeviceView->Refresh(Type, FALSE, TRUE, NULL);
+ m_DeviceView->Refresh(Type, ScanForChanges, true);
// Get the menu item id
switch (Type)
@@ -437,10 +438,7 @@
if (m_DeviceView->Initialize())
{
// Do the initial scan
- m_DeviceView->Refresh(m_DeviceView->GetCurrentView(),
- true,
- true,
- NULL);
+ RefreshView(m_DeviceView->GetCurrentView(), true);
// Display the window according to the user request
ShowWindow(hwnd, m_CmdShow);
@@ -608,13 +606,13 @@
case IDC_DEVBYTYPE:
{
- RefreshView(DevicesByType);
+ RefreshView(DevicesByType, false);
break;
}
case IDC_DEVBYCONN:
{
- RefreshView(DevicesByConnection);
+ RefreshView(DevicesByConnection, false);
break;
}
@@ -633,10 +631,7 @@
CheckMenuItem(m_hMenu, IDC_SHOWHIDDEN, MF_BYCOMMAND | MF_CHECKED);
}
// Refresh the device view
- m_DeviceView->Refresh(m_DeviceView->GetCurrentView(),
- false,
- true,
- NULL);
+ RefreshView(m_DeviceView->GetCurrentView(), false);
break;
}
@@ -798,10 +793,7 @@
if (wParam == REFRESH_TIMER)
{
// Schedule a refresh (this just creates a thread and returns)
-
This->m_DeviceView->Refresh(This->m_DeviceView->GetCurrentView(),
- true,
- true,
- NULL);
+ This->RefreshView(This->m_DeviceView->GetCurrentView(), true);
// Cleanup the timer
KillTimer(hwnd, REFRESH_TIMER);
Modified: trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/M…
==============================================================================
--- trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.h [iso-8859-1] Fri Oct 23 13:16:25
2015
@@ -90,7 +90,8 @@
);
bool RefreshView(
- _In_ ViewType Type
+ _In_ ViewType Type,
+ _In_ bool ScanForChanges
);
};