mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:42:57 +00:00
[SHELL32]
- CControlPanelFolder: Fix showing the description in control panel. Patch with improvements by me. CORE-8827 svn path=/trunk/; revision=68745
This commit is contained in:
parent
28e828a038
commit
bf1b6fbcc5
1 changed files with 20 additions and 6 deletions
|
@ -55,8 +55,8 @@ class CControlPanelEnum :
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const shvheader ControlPanelSFHeader[] = {
|
static const shvheader ControlPanelSFHeader[] = {
|
||||||
{IDS_SHV_COLUMN8, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},/*FIXME*/
|
{IDS_SHV_COLUMN8, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 15},/*FIXME*/
|
||||||
{IDS_SHV_COLUMN9, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 200},/*FIXME*/
|
{IDS_SHV_COLUMN9, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 80},/*FIXME*/
|
||||||
};
|
};
|
||||||
|
|
||||||
#define CONROLPANELSHELLVIEWCOLUMNS 2
|
#define CONROLPANELSHELLVIEWCOLUMNS 2
|
||||||
|
@ -154,11 +154,11 @@ BOOL CControlPanelEnum::RegisterCPanelApp(LPCSTR path)
|
||||||
{
|
{
|
||||||
for (i = 0; i < applet->count; ++i)
|
for (i = 0; i < applet->count; ++i)
|
||||||
{
|
{
|
||||||
WideCharToMultiByte(CP_ACP, 0, applet->info[i].szName, -1, displayName, MAX_PATH, 0, 0);
|
|
||||||
WideCharToMultiByte(CP_ACP, 0, applet->info[i].szInfo, -1, comment, MAX_PATH, 0, 0);
|
|
||||||
|
|
||||||
applet->proc(0, CPL_INQUIRE, i, (LPARAM)&info);
|
applet->proc(0, CPL_INQUIRE, i, (LPARAM)&info);
|
||||||
|
|
||||||
|
LoadStringA(applet->hModule, info.idName, displayName, MAX_PATH);
|
||||||
|
LoadStringA(applet->hModule, info.idInfo, comment, MAX_PATH);
|
||||||
|
|
||||||
if (info.idIcon > 0)
|
if (info.idIcon > 0)
|
||||||
iconIdx = -info.idIcon; /* negative icon index instead of icon number */
|
iconIdx = -info.idIcon; /* negative icon index instead of icon number */
|
||||||
else
|
else
|
||||||
|
@ -671,9 +671,23 @@ HRESULT WINAPI CControlPanelFolder::GetDetailsOf(PCUITEMID_CHILD pidl, UINT iCol
|
||||||
hr = GetDisplayNameOf(pidl, SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str);
|
hr = GetDisplayNameOf(pidl, SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str);
|
||||||
break;
|
break;
|
||||||
case 1: /* comment */
|
case 1: /* comment */
|
||||||
_ILGetFileType(pidl, psd->str.cStr, MAX_PATH);
|
{
|
||||||
|
PIDLCPanelStruct* pCPanel = _ILGetCPanelPointer(pidl);
|
||||||
|
if (pCPanel)
|
||||||
|
lstrcpyA(psd->str.cStr, pCPanel->szName + pCPanel->offsComment);
|
||||||
|
if (_ILIsSpecialFolder(pidl))
|
||||||
|
{
|
||||||
|
HKEY hKey;
|
||||||
|
GUID *pGuid = _ILGetGUIDPointer(pidl);
|
||||||
|
if (HCR_RegOpenClassIDKey(*pGuid, &hKey))
|
||||||
|
{
|
||||||
|
RegLoadMUIStringA(hKey, "InfoTip", psd->str.cStr, MAX_PATH, NULL, 0, NULL);
|
||||||
|
RegCloseKey(hKey);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
hr = S_OK;
|
hr = S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue