mirror of
https://github.com/reactos/reactos.git
synced 2025-04-04 04:26:32 +00:00
Merge 8e111c22bd
into 81d845fb2c
This commit is contained in:
commit
d9fd8bf778
15 changed files with 205 additions and 71 deletions
|
@ -49,6 +49,31 @@ static VOID InitializeAtlModule(HINSTANCE hInstance, BOOL bInitialize)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
InitializeServerAdminUI()
|
||||
{
|
||||
HKEY hKey = SHGetShellKey(SHKEY_Root_HKCU | SHKEY_Key_Explorer, L"Advanced", TRUE);
|
||||
if (!hKey)
|
||||
return;
|
||||
|
||||
DWORD value, size = sizeof(value), type;
|
||||
DWORD error = SHGetValueW(hKey, NULL, L"ServerAdminUI", &type, &value, &size);
|
||||
if (error || type != REG_DWORD || size != sizeof(value))
|
||||
{
|
||||
// The value doesn't exist or is invalid, calculate and apply a default value
|
||||
value = IsOS(OS_ANYSERVER) && IsUserAnAdmin();
|
||||
SHSetValueW(hKey, NULL, L"ServerAdminUI", REG_DWORD, &value, sizeof(value));
|
||||
if (value)
|
||||
{
|
||||
// TODO: Apply registry tweaks with RegInstallW; RegServerAdmin in the REGINST resource in shell32.
|
||||
#if !ROSPOLICY_SHELL_NODEFKEYBOARDCUES
|
||||
SystemParametersInfo(SPI_SETKEYBOARDCUES, 0, IntToPtr(TRUE), SPIF_SENDCHANGE | SPIF_UPDATEINIFILE);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
|
||||
#if !WIN7_DEBUG_MODE
|
||||
static BOOL
|
||||
SetShellReadyEvent(IN LPCWSTR lpEventName)
|
||||
|
@ -179,6 +204,8 @@ StartWithDesktop(IN HINSTANCE hInstance)
|
|||
/* Initialize CLSID_ShellWindows class */
|
||||
_WinList_Init();
|
||||
|
||||
InitializeServerAdminUI();
|
||||
|
||||
CComPtr<ITrayWindow> Tray;
|
||||
CreateTrayWindow(&Tray);
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
#define WIN32_NO_STATUS
|
||||
#include "pstypes.h" /* SharedUserData */
|
||||
#define NTOS_MODE_USER
|
||||
#include <ndk/pstypes.h> /* For SharedUserData */
|
||||
|
||||
static TCHAR BugLink[] = _T("http://jira.reactos.org/");
|
||||
static TCHAR ReportAsWorkstationKey[] = _T("SYSTEM\\CurrentControlSet\\Control\\ReactOS\\Settings\\Version");
|
||||
|
@ -56,7 +56,7 @@ OnInitSysSettingsDialog(HWND hwndDlg)
|
|||
DWORD dwVal = 0;
|
||||
DWORD dwType = REG_DWORD;
|
||||
DWORD cbData = sizeof(DWORD);
|
||||
BOOL ReportAsWorkstation = SharedUserData->NtProductType == VER_NT_WORKSTATION;
|
||||
BOOL ReportAsWorkstation = SharedUserData->NtProductType == NtProductWinNt;
|
||||
|
||||
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
|
||||
ReportAsWorkstationKey,
|
||||
|
@ -71,7 +71,7 @@ OnInitSysSettingsDialog(HWND hwndDlg)
|
|||
(LPBYTE)&dwVal,
|
||||
&cbData) == ERROR_SUCCESS)
|
||||
{
|
||||
if (cbData == sizeof(DWORD))
|
||||
if (dwType == REG_DWORD && cbData == sizeof(DWORD))
|
||||
ReportAsWorkstation = dwVal != FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -53,11 +53,11 @@ SetRosSpecificInfo(IN OUT PRTL_OSVERSIONINFOEXW VersionInformation)
|
|||
(kvpInfo->Type == REG_DWORD) &&
|
||||
(kvpInfo->DataLength == sizeof(ULONG)))
|
||||
{
|
||||
ULONG IsWorkstation = SharedUserData->NtProductType == NtProductWinNt;
|
||||
ULONG ReportAsWorkstation = (*(PULONG)kvpInfo->Data) != 0;
|
||||
BOOLEAN IsWorkstation = SharedUserData->NtProductType == NtProductWinNt;
|
||||
BOOLEAN ReportAsWorkstation = (*(PULONG)kvpInfo->Data) != 0;
|
||||
if (IsWorkstation != ReportAsWorkstation)
|
||||
{
|
||||
g_ReportProductType = ReportAsWorkstation ? NtProductWinNt : NtProductServer;
|
||||
g_ReportProductType = ReportAsWorkstation ? VER_NT_WORKSTATION : VER_NT_SERVER;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ SetRosSpecificInfo(IN OUT PRTL_OSVERSIONINFOEXW VersionInformation)
|
|||
}
|
||||
else
|
||||
{
|
||||
g_ReportProductType = -1;
|
||||
g_ReportProductType = -1; /* No override, caller gets the real value */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -886,27 +886,18 @@ HRESULT CShellBrowser::CreateRelativeBrowsePIDL(LPCITEMIDLIST relative, UINT Sbs
|
|||
|
||||
HRESULT CShellBrowser::BrowseToPIDL(LPCITEMIDLIST pidl, long flags)
|
||||
{
|
||||
// Called by shell view to browse to new folder
|
||||
// also called by explorer band to navigate to new folder
|
||||
CComPtr<IShellFolder> newFolder;
|
||||
FOLDERSETTINGS newFolderSettings = m_deffoldersettings.FolderSettings;
|
||||
HRESULT hResult;
|
||||
CLSID clsid;
|
||||
BOOL HasIconViewType;
|
||||
|
||||
// called by shell view to browse to new folder
|
||||
// also called by explorer band to navigate to new folder
|
||||
hResult = SHBindToFolder(pidl, &newFolder);
|
||||
if (FAILED_UNEXPECTEDLY(hResult))
|
||||
return hResult;
|
||||
// HACK & FIXME: Get view mode from shellbag when fully implemented.
|
||||
IUnknown_GetClassID(newFolder, &clsid);
|
||||
HasIconViewType = clsid == CLSID_MyComputer || clsid == CLSID_ControlPanel ||
|
||||
clsid == CLSID_ShellDesktop;
|
||||
HRESULT hr = SHBindToFolder(pidl, &newFolder);
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
return hr;
|
||||
|
||||
if (HasIconViewType)
|
||||
newFolderSettings.ViewMode = FVM_ICON;
|
||||
hResult = BrowseToPath(newFolder, pidl, &newFolderSettings, flags);
|
||||
if (FAILED_UNEXPECTEDLY(hResult))
|
||||
return hResult;
|
||||
hr = BrowseToPath(newFolder, pidl, &newFolderSettings, flags);
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
return hr;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -1095,8 +1086,22 @@ HRESULT CShellBrowser::BrowseToPath(IShellFolder *newShellFolder,
|
|||
absolutePIDL = fCurrentDirectoryPIDL;
|
||||
|
||||
// create view window
|
||||
hResult = newShellView->CreateViewWindow(saveCurrentShellView, folderSettings,
|
||||
this, &shellViewWindowBounds, &newShellViewWindow);
|
||||
SHELLVIEWID vid;
|
||||
SV2CVW2_PARAMS cvw2 = { sizeof(cvw2), saveCurrentShellView, folderSettings, this, &shellViewWindowBounds, NULL };
|
||||
|
||||
CComPtr<IShellView2> newShellView2;
|
||||
if (SUCCEEDED(newShellView->QueryInterface(IID_PPV_ARG(IShellView2, &newShellView2))))
|
||||
{
|
||||
if (SUCCEEDED(newShellView2->GetView(&vid, SV2GV_DEFAULTVIEW)))
|
||||
cvw2.pvid = &vid;
|
||||
hResult = newShellView2->CreateViewWindow2(&cvw2);
|
||||
}
|
||||
else
|
||||
{
|
||||
hResult = newShellView->CreateViewWindow(cvw2.psvPrev, cvw2.pfs, this, cvw2.prcView, &cvw2.hwndView);
|
||||
}
|
||||
newShellViewWindow = cvw2.hwndView;
|
||||
|
||||
if (FAILED_UNEXPECTEDLY(hResult) || newShellViewWindow == NULL)
|
||||
{
|
||||
fCurrentShellView = saveCurrentShellView;
|
||||
|
|
|
@ -217,6 +217,10 @@ static inline COLORREF GetViewColor(COLORREF Clr, UINT SysFallback)
|
|||
return Clr != CLR_INVALID ? Clr : GetSysColor(SysFallback);
|
||||
}
|
||||
|
||||
#define VID_Default ( *(const SHELLVIEWID*)&IID_CDefView )
|
||||
extern HRESULT ShellViewIdToFolderViewMode(const SHELLVIEWID *pVid);
|
||||
extern const SHELLVIEWID* FolderViewModeToShellViewId(UINT FVM);
|
||||
|
||||
class CDefView :
|
||||
public CWindowImpl<CDefView, CWindow, CControlWinTraits>,
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
|
@ -370,6 +374,11 @@ public:
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline bool IsSupportedFolderViewMode(int Mode)
|
||||
{
|
||||
return Mode >= FVM_FIRST && Mode <= FVM_DETAILS; // We don't support Tile nor Thumbstrip
|
||||
}
|
||||
|
||||
// *** IOleWindow methods ***
|
||||
STDMETHOD(GetWindow)(HWND *lphwnd) override;
|
||||
STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override;
|
||||
|
@ -388,7 +397,7 @@ public:
|
|||
STDMETHOD(GetItemObject)(UINT uItem, REFIID riid, void **ppv) override;
|
||||
|
||||
// *** IShellView2 methods ***
|
||||
STDMETHOD(GetView)(SHELLVIEWID *view_guid, ULONG view_type) override;
|
||||
STDMETHOD(GetView)(SHELLVIEWID *pVid, ULONG view_type) override;
|
||||
STDMETHOD(CreateViewWindow2)(LPSV2CVW2_PARAMS view_params) override;
|
||||
STDMETHOD(HandleRename)(LPCITEMIDLIST new_pidl) override;
|
||||
STDMETHOD(SelectAndPositionItem)(LPCITEMIDLIST item, UINT flags, POINT *point) override;
|
||||
|
@ -839,10 +848,7 @@ LRESULT CDefView::OnUpdateStatusbar(UINT uMsg, WPARAM wParam, LPARAM lParam, BOO
|
|||
// creates the list view window
|
||||
BOOL CDefView::CreateList()
|
||||
{
|
||||
HRESULT hr;
|
||||
DWORD dwStyle, dwExStyle, ListExStyle;
|
||||
UINT ViewMode;
|
||||
|
||||
TRACE("%p\n", this);
|
||||
|
||||
dwStyle = WS_TABSTOP | WS_VISIBLE | WS_CHILDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN |
|
||||
|
@ -865,16 +871,6 @@ BOOL CDefView::CreateList()
|
|||
#endif
|
||||
}
|
||||
|
||||
ViewMode = m_FolderSettings.ViewMode;
|
||||
hr = _DoFolderViewCB(SFVM_DEFVIEWMODE, 0, (LPARAM)&ViewMode);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
if (ViewMode >= FVM_FIRST && ViewMode <= FVM_LAST)
|
||||
m_FolderSettings.ViewMode = ViewMode;
|
||||
else
|
||||
ERR("Ignoring invalid ViewMode from SFVM_DEFVIEWMODE: %u (was: %u)\n", ViewMode, m_FolderSettings.ViewMode);
|
||||
}
|
||||
|
||||
switch (m_FolderSettings.ViewMode)
|
||||
{
|
||||
case FVM_ICON:
|
||||
|
@ -3578,7 +3574,7 @@ FOLDERVIEWMODE CDefView::GetDefaultViewMode()
|
|||
{
|
||||
FOLDERVIEWMODE mode = ((m_FolderSettings.fFlags & FWF_DESKTOP) || !IsOS(OS_SERVERADMINUI)) ? FVM_ICON : FVM_DETAILS;
|
||||
FOLDERVIEWMODE temp = mode;
|
||||
if (SUCCEEDED(_DoFolderViewCB(SFVM_DEFVIEWMODE, 0, (LPARAM)&temp)) && temp >= FVM_FIRST && temp <= FVM_LAST)
|
||||
if (SUCCEEDED(_DoFolderViewCB(SFVM_DEFVIEWMODE, 0, (LPARAM)&temp)) && IsSupportedFolderViewMode(temp))
|
||||
mode = temp;
|
||||
return mode;
|
||||
}
|
||||
|
@ -3803,10 +3799,22 @@ HRESULT STDMETHODCALLTYPE CDefView::SelectAndPositionItems(UINT cidl, PCUITEMID_
|
|||
|
||||
// IShellView2 implementation
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CDefView::GetView(SHELLVIEWID *view_guid, ULONG view_type)
|
||||
HRESULT STDMETHODCALLTYPE CDefView::GetView(SHELLVIEWID *pVid, ULONG view_type)
|
||||
{
|
||||
FIXME("(%p)->(%p, %lu) stub\n", this, view_guid, view_type);
|
||||
return E_NOTIMPL;
|
||||
if (view_type == SV2GV_DEFAULTVIEW)
|
||||
{
|
||||
*pVid = VID_Default;
|
||||
return S_OK;
|
||||
}
|
||||
if (view_type == SV2GV_CURRENTVIEW)
|
||||
view_type = m_FolderSettings.ViewMode;
|
||||
if ((int)view_type < 0)
|
||||
return E_UNEXPECTED;
|
||||
|
||||
if (!IsSupportedFolderViewMode(view_type += FVM_FIRST))
|
||||
return E_INVALIDARG;
|
||||
*pVid = *FolderViewModeToShellViewId(view_type);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CDefView::CreateViewWindow2(LPSV2CVW2_PARAMS view_params)
|
||||
|
@ -3835,9 +3843,6 @@ HRESULT STDMETHODCALLTYPE CDefView::CreateViewWindow3(IShellBrowser *psb, IShell
|
|||
if (view_flags & ~SUPPORTED_SV3CVW3)
|
||||
FIXME("unsupported view flags 0x%08x\n", view_flags & ~SUPPORTED_SV3CVW3);
|
||||
|
||||
if (mode == FVM_AUTO)
|
||||
mode = GetDefaultViewMode();
|
||||
|
||||
/* Set up the member variables */
|
||||
m_pShellBrowser = psb;
|
||||
m_FolderSettings.ViewMode = mode;
|
||||
|
@ -3845,23 +3850,23 @@ HRESULT STDMETHODCALLTYPE CDefView::CreateViewWindow3(IShellBrowser *psb, IShell
|
|||
|
||||
if (view_id)
|
||||
{
|
||||
if (IsEqualIID(*view_id, VID_LargeIcons))
|
||||
m_FolderSettings.ViewMode = FVM_ICON;
|
||||
else if (IsEqualIID(*view_id, VID_SmallIcons))
|
||||
m_FolderSettings.ViewMode = FVM_SMALLICON;
|
||||
else if (IsEqualIID(*view_id, VID_List))
|
||||
m_FolderSettings.ViewMode = FVM_LIST;
|
||||
else if (IsEqualIID(*view_id, VID_Details))
|
||||
m_FolderSettings.ViewMode = FVM_DETAILS;
|
||||
else if (IsEqualIID(*view_id, VID_Thumbnails))
|
||||
m_FolderSettings.ViewMode = FVM_THUMBNAIL;
|
||||
else if (IsEqualIID(*view_id, VID_Tile))
|
||||
m_FolderSettings.ViewMode = FVM_TILE;
|
||||
else if (IsEqualIID(*view_id, VID_ThumbStrip))
|
||||
m_FolderSettings.ViewMode = FVM_THUMBSTRIP;
|
||||
FOLDERVIEWMODE temp = (FOLDERVIEWMODE)ShellViewIdToFolderViewMode(view_id);
|
||||
if (IsSupportedFolderViewMode(temp))
|
||||
mode = temp;
|
||||
else if (*view_id == VID_Default)
|
||||
mode = FVM_AUTO;
|
||||
else
|
||||
FIXME("Ignoring unrecognized VID %s\n", debugstr_guid(view_id));
|
||||
}
|
||||
if (mode == FVM_AUTO)
|
||||
m_FolderSettings.ViewMode = GetDefaultViewMode();
|
||||
|
||||
if (!IsSupportedFolderViewMode(m_FolderSettings.ViewMode))
|
||||
{
|
||||
ERR("Ignoring %s FVM %u\n", FolderViewModeToShellViewId(m_FolderSettings.ViewMode)
|
||||
? "unsupported" : "invalid", m_FolderSettings.ViewMode);
|
||||
m_FolderSettings.ViewMode = FVM_ICON;
|
||||
}
|
||||
const UINT requestedViewMode = m_FolderSettings.ViewMode;
|
||||
|
||||
/* Get our parent window */
|
||||
|
|
|
@ -31,6 +31,38 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
HRESULT
|
||||
ShellViewIdToFolderViewMode(const SHELLVIEWID *pVid)
|
||||
{
|
||||
if (IsEqualIID(*pVid, VID_LargeIcons))
|
||||
return FVM_ICON;
|
||||
else if (IsEqualIID(*pVid, VID_SmallIcons))
|
||||
return FVM_SMALLICON;
|
||||
else if (IsEqualIID(*pVid, VID_List))
|
||||
return FVM_LIST;
|
||||
else if (IsEqualIID(*pVid, VID_Details))
|
||||
return FVM_DETAILS;
|
||||
else if (IsEqualIID(*pVid, VID_Thumbnails))
|
||||
return FVM_THUMBNAIL;
|
||||
else if (IsEqualIID(*pVid, VID_Tile))
|
||||
return FVM_TILE;
|
||||
else if (IsEqualIID(*pVid, VID_ThumbStrip))
|
||||
return FVM_THUMBSTRIP;
|
||||
return E_UNEXPECTED;
|
||||
}
|
||||
|
||||
const SHELLVIEWID *
|
||||
FolderViewModeToShellViewId(UINT FVM)
|
||||
{
|
||||
static const SHELLVIEWID *vids[] = {
|
||||
&VID_LargeIcons, &VID_SmallIcons,
|
||||
&VID_Details, &VID_Thumbnails,
|
||||
&VID_Tile, &VID_ThumbStrip,
|
||||
};
|
||||
FVM -= FVM_FIRST;
|
||||
return FVM < _countof(vids) ? vids[FVM] : NULL;
|
||||
}
|
||||
|
||||
// This class adapts the legacy function callback to work as an IShellFolderViewCB
|
||||
class CShellFolderViewCBWrapper :
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
|
|
|
@ -378,7 +378,7 @@ HRESULT WINAPI CControlPanelFolder::CreateViewObject(HWND hwndOwner, REFIID riid
|
|||
WARN("IContextMenu not implemented\n");
|
||||
hr = E_NOTIMPL;
|
||||
} else if (IsEqualIID(riid, IID_IShellView)) {
|
||||
SFV_CREATE sfvparams = {sizeof(SFV_CREATE), this};
|
||||
SFV_CREATE sfvparams = { sizeof(SFV_CREATE), this , NULL, this };
|
||||
hr = SHCreateShellFolderView(&sfvparams, (IShellView**)ppvOut);
|
||||
}
|
||||
}
|
||||
|
@ -660,6 +660,23 @@ HRESULT WINAPI CControlPanelFolder::GetCurFolder(PIDLIST_ABSOLUTE * pidl)
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CControlPanelFolder::MessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (uMsg)
|
||||
{
|
||||
case SFVM_DEFVIEWMODE:
|
||||
{
|
||||
#if ROSPOLICY_SHELLFOLDER_DEFLARGEICONS & ( 1 << (PT_CONTROLS_NEWREGITEM >> 4) )
|
||||
*((FOLDERVIEWMODE*)lParam) = FVM_ICON;
|
||||
#else
|
||||
*((FOLDERVIEWMODE*)lParam) = IsOS(OS_SERVERADMINUI) ? FVM_LIST : FVM_ICON;
|
||||
#endif
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
CCPLItemMenu::CCPLItemMenu()
|
||||
{
|
||||
m_apidl = NULL;
|
||||
|
|
|
@ -26,7 +26,8 @@ class CControlPanelFolder :
|
|||
public CComCoClass<CControlPanelFolder, &CLSID_ControlPanel>,
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
public IShellFolder2,
|
||||
public IPersistFolder2
|
||||
public IPersistFolder2,
|
||||
public IShellFolderViewCB
|
||||
{
|
||||
private:
|
||||
/* both paths are parsible from the desktop */
|
||||
|
@ -70,6 +71,9 @@ class CControlPanelFolder :
|
|||
// IPersistFolder2
|
||||
STDMETHOD(GetCurFolder)(PIDLIST_ABSOLUTE * pidl) override;
|
||||
|
||||
// IShellFolderViewCB
|
||||
STDMETHODIMP MessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam) override;
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_CONTROLPANEL)
|
||||
DECLARE_NOT_AGGREGATABLE(CControlPanelFolder)
|
||||
|
||||
|
@ -81,6 +85,7 @@ class CControlPanelFolder :
|
|||
COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IShellFolderViewCB, IShellFolderViewCB)
|
||||
END_COM_MAP()
|
||||
};
|
||||
|
||||
|
|
|
@ -1092,6 +1092,11 @@ HRESULT WINAPI CDesktopFolderViewCB::MessageSFVCB(UINT uMsg, WPARAM wParam, LPAR
|
|||
{
|
||||
switch (uMsg)
|
||||
{
|
||||
#if ROSPOLICY_SHELLFOLDER_DEFLARGEICONS & ( 1 << (PT_DESKTOP_REGITEM >> 4) )
|
||||
case SFVM_DEFVIEWMODE: // CDesktopBrowser always forces FVM_ICON.
|
||||
*((FOLDERVIEWMODE*)lParam) = FVM_ICON; // This sets the default for generic browsers.
|
||||
return S_OK;
|
||||
#endif
|
||||
case SFVM_VIEWRELEASE:
|
||||
m_pShellView = NULL;
|
||||
return S_OK;
|
||||
|
|
|
@ -867,8 +867,8 @@ HRESULT WINAPI CDrivesFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPVO
|
|||
}
|
||||
else if (IsEqualIID(riid, IID_IShellView))
|
||||
{
|
||||
SFV_CREATE sfvparams = { sizeof(SFV_CREATE), this, NULL, static_cast<IShellFolderViewCB*>(this) };
|
||||
hr = SHCreateShellFolderView(&sfvparams, (IShellView**)ppvOut);
|
||||
SFV_CREATE sfvparams = { sizeof(SFV_CREATE), this, NULL, this };
|
||||
hr = SHCreateShellFolderView(&sfvparams, (IShellView**)ppvOut);
|
||||
}
|
||||
TRACE("-- (%p)->(interface=%p)\n", this, ppvOut);
|
||||
return hr;
|
||||
|
@ -1284,6 +1284,21 @@ HRESULT WINAPI CDrivesFolder::ShouldShow(IShellFolder *psf, PCIDLIST_ABSOLUTE pi
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CDrivesFolder::MessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
#if ROSPOLICY_SHELLFOLDER_DEFLARGEICONS & ( 1 << (PT_COMPUTER_REGITEM >> 4) )
|
||||
switch (uMsg)
|
||||
{
|
||||
case SFVM_DEFVIEWMODE:
|
||||
{
|
||||
*((FOLDERVIEWMODE*)lParam) = FVM_ICON;
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* IContextMenuCB interface */
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ class CDrivesFolder :
|
|||
STDMETHOD(CallBack)(IShellFolder *psf, HWND hwndOwner, IDataObject *pdtobj, UINT uMsg, WPARAM wParam, LPARAM lParam) override;
|
||||
|
||||
// IShellFolderViewCB
|
||||
STDMETHODIMP MessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam) override { return E_NOTIMPL; }
|
||||
STDMETHODIMP MessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam) override;
|
||||
|
||||
// IFolderFilter
|
||||
STDMETHOD(ShouldShow)(IShellFolder *psf, PCIDLIST_ABSOLUTE pidlFolder, PCUITEMID_CHILD pidlItem) override;
|
||||
|
|
|
@ -4225,8 +4225,21 @@ BOOL WINAPI IsOS(DWORD feature)
|
|||
FIXME("(OS_TABLETPC) What should we return here?\n");
|
||||
return FALSE;
|
||||
case OS_SERVERADMINUI:
|
||||
#ifdef __REACTOS__
|
||||
{
|
||||
DWORD value = FALSE, size = sizeof(value);
|
||||
HKEY hKey = SHGetShellKey(SHKEY_Root_HKCU | SHKEY_Key_Explorer, L"Advanced", FALSE);
|
||||
if (hKey)
|
||||
{
|
||||
SHQueryValueExW(hKey, L"ServerAdminUI", NULL, NULL, &value, &size);
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
ISOS_RETURN(value);
|
||||
}
|
||||
#else
|
||||
FIXME("(OS_SERVERADMINUI) What should we return here?\n");
|
||||
return FALSE;
|
||||
#endif
|
||||
case OS_MEDIACENTER:
|
||||
FIXME("(OS_MEDIACENTER) What should we return here?\n");
|
||||
return FALSE;
|
||||
|
|
|
@ -135,8 +135,8 @@ START_TEST(RtlGetNtProductType)
|
|||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\ReactOS\\Settings\\Version",
|
||||
0, KEY_READ | KEY_WRITE, &hKey) == ERROR_SUCCESS)
|
||||
{
|
||||
DWORD cb = sizeof(DWORD);
|
||||
if (RegQueryValueExW(hKey, L"ReportAsWorkstation", NULL, NULL, (PBYTE)&ReportAsWorkstation, &cb))
|
||||
DWORD cb = sizeof(ReportAsWorkstation);
|
||||
if (RegQueryValueExW(hKey, L"ReportAsWorkstation", NULL, NULL, (PBYTE)&ReportAsWorkstation, &cb) != ERROR_SUCCESS)
|
||||
ReportAsWorkstation = 0xbaadf00d;
|
||||
RegDeleteValueW(hKey, L"ReportAsWorkstation");
|
||||
RegCloseKey(hKey);
|
||||
|
@ -178,13 +178,12 @@ START_TEST(RtlGetNtProductType)
|
|||
|
||||
ok_char(ChangeNtProductType(ProductType), TRUE);
|
||||
|
||||
|
||||
/* Restore ReportAsWorkstation */
|
||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\ReactOS\\Settings\\Version",
|
||||
0, KEY_WRITE, &hKey) == ERROR_SUCCESS)
|
||||
{
|
||||
if (ReportAsWorkstation != 0xbaadf00d)
|
||||
RegSetValueExW(hKey, L"ReportAsWorkstation", 0, REG_DWORD, (PBYTE)&ReportAsWorkstation, sizeof(DWORD));
|
||||
RegSetValueExW(hKey, L"ReportAsWorkstation", 0, REG_DWORD, (PBYTE)&ReportAsWorkstation, sizeof(ReportAsWorkstation));
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -793,6 +793,9 @@ interface IShellView : IOleWindow
|
|||
interface IShellView2 : IShellView
|
||||
{
|
||||
typedef GUID SHELLVIEWID;
|
||||
cpp_quote("#define SV2GV_CURRENTVIEW ((UINT)-1)")
|
||||
cpp_quote("#define SV2GV_DEFAULTVIEW ((UINT)-2)")
|
||||
|
||||
cpp_quote("#include <pshpack8.h>")
|
||||
typedef struct _SV2CVW2_PARAMS
|
||||
{
|
||||
|
|
|
@ -19,6 +19,14 @@
|
|||
#ifndef __WINE_UNDOCSHELL_H
|
||||
#define __WINE_UNDOCSHELL_H
|
||||
|
||||
// Because ReactOS installs as Server by default, we ignore OS_SERVERADMINUI
|
||||
// in certain places to present a Client/Server hybrid UI.
|
||||
|
||||
// Windows defaults to FVM_DETAILS for Administrators on OS_ANYSERVER (instead of FVM_ICON).
|
||||
#define ROSPOLICY_SHELLFOLDER_DEFLARGEICONS ( ~0UL )
|
||||
|
||||
#define ROSPOLICY_SHELL_NODEFKEYBOARDCUES 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* defined(__cplusplus) */
|
||||
|
|
Loading…
Reference in a new issue