diff options
author | George Hazan <george.hazan@gmail.com> | 2015-01-14 14:29:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-01-14 14:29:14 +0000 |
commit | 5f4a6f00c20468e6adc3a7bf691eccef55d2324c (patch) | |
tree | c0f56480f87c3b4df4d6cb80aed69bc00e30b685 /plugins/Clist_modern/src/modern_skinengine.cpp | |
parent | 9a10497ccd1176e3832a4ee752667de70c830800 (diff) |
manually reinvented wheel removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@11852 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_skinengine.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_skinengine.cpp | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp index 9c1a6e018b..9eab051c74 100644 --- a/plugins/Clist_modern/src/modern_skinengine.cpp +++ b/plugins/Clist_modern/src/modern_skinengine.cpp @@ -83,7 +83,6 @@ static INT_PTR ske_Service_DrawIconEx(WPARAM wParam, LPARAM lParam); static int ske_AlphaTextOut(HDC hDC, LPCTSTR lpString, int nCount, RECT *lpRect, UINT format, DWORD ARGBcolor); static void ske_AddParseTextGlyphObject(char * szGlyphTextID, char * szDefineString, SKINOBJECTSLIST *Skin); static void ske_AddParseSkinFont(char * szFontID, char * szDefineString); -static int ske_DeleteAllSettingInSection(char * SectionName); static int ske_GetSkinFromDB(char * szSection, SKINOBJECTSLIST * Skin); static LPSKINOBJECTDESCRIPTOR ske_FindObject(const char *szName, SKINOBJECTSLIST *Skin); static int ske_LoadSkinFromResource(BOOL bOnlyObjects); @@ -2062,7 +2061,7 @@ static int ske_LoadSkinFromResource(BOOL bOnlyObjects) { IniParser parser(g_hInst, MAKEINTRESOURCEA(IDR_MSF_DEFAULT_SKIN), "MSF", bOnlyObjects ? IniParser::FLAG_ONLY_OBJECTS : IniParser::FLAG_WITH_SETTINGS); if (parser.CheckOK()) { - ske_DeleteAllSettingInSection("ModernSkin"); + CallService(MS_DB_MODULE_DELETE, 0, (LPARAM)"ModernSkin"); db_set_s(NULL, SKIN, "SkinFolder", "%Default%"); db_set_s(NULL, SKIN, "SkinFile", "%Default%"); parser.Parse(IniParser::WriteStrToDb, 0); @@ -2080,7 +2079,7 @@ int ske_LoadSkinFromIniFile(TCHAR *szFileName, BOOL bOnlyObjects) if (!parser.CheckOK()) return 0; - ske_DeleteAllSettingInSection("ModernSkin"); + CallService(MS_DB_MODULE_DELETE, 0, (LPARAM)"ModernSkin"); TCHAR skinFolder[MAX_PATH], skinFile[MAX_PATH]; IniParser::GetSkinFolder(szFileName, skinFolder); @@ -2093,42 +2092,6 @@ int ske_LoadSkinFromIniFile(TCHAR *szFileName, BOOL bOnlyObjects) return 0; } -static int ske_enumdb_SkinSectionDeletionProc(const char *szSetting, LPARAM) -{ - if (szSetting == NULL) - return 0; - - nArrayLen++; - pszSettingName = (char **)realloc(pszSettingName, nArrayLen*sizeof(char *)); - pszSettingName[nArrayLen - 1] = _strdup(szSetting); - return 0; -} - -static int ske_DeleteAllSettingInSection(char * SectionName) -{ - DBCONTACTENUMSETTINGS dbces; - nArrayLen = 0; - pszSettingName = NULL; - dbces.pfnEnumProc = ske_enumdb_SkinSectionDeletionProc; - dbces.szModule = SectionName; - dbces.ofsSettings = 0; - - CallService(MS_DB_CONTACT_ENUMSETTINGS, 0, (LPARAM)&dbces); - - // delete all settings - if (nArrayLen == 0) - return 0; - - for (int i = 0; i < nArrayLen; i++) { - db_unset(0, SectionName, pszSettingName[i]); - free(pszSettingName[i]); - } - free(pszSettingName); - pszSettingName = NULL; - nArrayLen = 0; - return 0; -} - BOOL ske_TextOut(HDC hdc, int x, int y, LPCTSTR lpString, int nCount) { SIZE sz; |