Have the theme INI file parsed upon theme activation and not just when

the first theme data is requested; that way, the themed system colors
are set correctly from the start, and not just after some theme data
was requested.
This commit is contained in:
Frank Richter 2005-07-01 15:39:14 +00:00 committed by Alexandre Julliard
parent 2adcf68331
commit db56189f24
1 changed files with 6 additions and 3 deletions

View File

@ -45,6 +45,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(uxtheme);
BOOL MSSTYLES_GetNextInteger(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, int *value);
BOOL MSSTYLES_GetNextToken(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, LPWSTR lpBuff, DWORD buffSize);
void MSSTYLES_ParseThemeIni(PTHEME_FILE tf);
extern HINSTANCE hDllInst;
@ -229,7 +230,11 @@ HRESULT MSSTYLES_SetActiveTheme(PTHEME_FILE tf)
MSSTYLES_CloseThemeFile(tfActiveTheme);
tfActiveTheme = tf;
if (tfActiveTheme)
{
tfActiveTheme->dwRefCount++;
if(!tfActiveTheme->classes)
MSSTYLES_ParseThemeIni(tfActiveTheme);
}
return S_OK;
}
@ -784,9 +789,7 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList)
return NULL;
}
if(!tfActiveTheme->classes) {
MSSTYLES_ParseThemeIni(tfActiveTheme);
if(!tfActiveTheme->classes)
return NULL;
return NULL;
}
start = pszClassList;