mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 17:52:56 +00:00
[UXTHEME] EnumThemes: Don't fail if a theme doesn't have a tooltip. CORE-13732
This commit is contained in:
parent
3dbd44fde1
commit
3a68bebf87
1 changed files with 14 additions and 8 deletions
|
@ -1259,14 +1259,20 @@ HRESULT WINAPI EnumThemes(LPCWSTR pszThemePath, ENUMTHEMEPROC callback,
|
||||||
wsprintfW(szPath, szFormat, szDir, wfd.cFileName, wfd.cFileName);
|
wsprintfW(szPath, szFormat, szDir, wfd.cFileName, wfd.cFileName);
|
||||||
|
|
||||||
hr = GetThemeDocumentationProperty(szPath, szDisplayName, szName, sizeof(szName)/sizeof(szName[0]));
|
hr = GetThemeDocumentationProperty(szPath, szDisplayName, szName, sizeof(szName)/sizeof(szName[0]));
|
||||||
if(SUCCEEDED(hr))
|
if(FAILED(hr))
|
||||||
hr = GetThemeDocumentationProperty(szPath, szTooltip, szTip, sizeof(szTip)/sizeof(szTip[0]));
|
{
|
||||||
if(SUCCEEDED(hr)) {
|
ERR("Failed to get theme name from %S\n", szPath);
|
||||||
TRACE("callback(%s,%s,%s,%p)\n", debugstr_w(szPath), debugstr_w(szName), debugstr_w(szTip), lpData);
|
continue;
|
||||||
if(!callback(NULL, szPath, szName, szTip, NULL, lpData)) {
|
}
|
||||||
TRACE("callback ended enum\n");
|
|
||||||
break;
|
hr = GetThemeDocumentationProperty(szPath, szTooltip, szTip, sizeof(szTip)/sizeof(szTip[0]));
|
||||||
}
|
if (FAILED(hr))
|
||||||
|
szTip[0] = 0;
|
||||||
|
|
||||||
|
TRACE("callback(%s,%s,%s,%p)\n", debugstr_w(szPath), debugstr_w(szName), debugstr_w(szTip), lpData);
|
||||||
|
if(!callback(NULL, szPath, szName, szTip, NULL, lpData)) {
|
||||||
|
TRACE("callback ended enum\n");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while(FindNextFileW(hFind, &wfd));
|
} while(FindNextFileW(hFind, &wfd));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue