summaryrefslogtreecommitdiff
path: root/plugins/FingerprintNG/src/fingerprint.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2012-12-05 20:51:54 +0000
committerKirill Volinsky <mataes2007@gmail.com>2012-12-05 20:51:54 +0000
commit1fa98a97c5806dac0ad30d0e5a814abc7ba62d7b (patch)
tree0b7143302727f7160e4e4619cf5c186bdbcf97f7 /plugins/FingerprintNG/src/fingerprint.cpp
parent2cc3a9b83f61b8ddc3338574c466c892ffe8c02b (diff)
FingerprintNG:
- all separate iconpacks moved into one (icons\fp_icons.dll) - fixed some masks - vkontakte moved to other icons git-svn-id: http://svn.miranda-ng.org/main/trunk@2657 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FingerprintNG/src/fingerprint.cpp')
-rw-r--r--plugins/FingerprintNG/src/fingerprint.cpp24
1 files changed, 7 insertions, 17 deletions
diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp
index f6bdae76db..a287828981 100644
--- a/plugins/FingerprintNG/src/fingerprint.cpp
+++ b/plugins/FingerprintNG/src/fingerprint.cpp
@@ -50,7 +50,7 @@ void FASTCALL Prepare(KN_FP_MASK* mask, bool bEnable)
Skin_RemoveIcon(mask->szIconName);
mask->hIcolibItem = NULL;
- if (!mask->szMask || !mask->szIconFileName || !bEnable)
+ if (!mask->szMask || !bEnable)
return;
size_t iMaskLen = _tcslen(mask->szMask) + 1;
@@ -60,10 +60,10 @@ void FASTCALL Prepare(KN_FP_MASK* mask, bool bEnable)
mask->szMaskUpper = pszNewMask;
TCHAR destfile[MAX_PATH];
- if (*mask->szIconFileName == 0)
+ if (mask->iIconIndex == IDI_NOTFOUND || mask->iIconIndex == IDI_UNKNOWN || mask->iIconIndex == IDI_UNDETECTED)
GetModuleFileName(g_hInst, destfile, MAX_PATH);
else {
- mir_sntprintf(destfile, SIZEOF(destfile), _T("%s\\%s.dll"), g_szSkinLib, mask->szIconFileName);
+ mir_sntprintf(destfile, SIZEOF(destfile), _T("%s"), g_szSkinLib);
struct _stat64i32 stFileInfo;
if ( _tstat(destfile, &stFileInfo) == -1)
@@ -132,11 +132,7 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnContactSettingChanged);
HookEvent(ME_OPT_INITIALISE, OnOptInitialise);
- if (ServiceExists(MS_FOLDERS_REGISTER_PATH)) {
- hIconFolder = FoldersRegisterCustomPathT("Fingerprint", "Icons", _T(MIRANDA_PATH) _T("\\") DEFAULT_SKIN_FOLDER);
- FoldersGetCustomPathT(hIconFolder, g_szSkinLib, SIZEOF(g_szSkinLib), _T(""));
- }
- else CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)DEFAULT_SKIN_FOLDER, (LPARAM)g_szSkinLib);
+ CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)DEFAULT_SKIN_FOLDER, (LPARAM)g_szSkinLib);
RegisterIcons();
@@ -427,9 +423,9 @@ static void MatchMasks(TCHAR* szMirVer, short *base, short *overlay,short *overl
if ( !WildCompareW(szMirVer, p.szMaskUpper))
continue;
- if (p.szIconFileName != _T("")) {
+ if (p.iIconIndex != IDI_NOTFOUND || p.iIconIndex != IDI_UNKNOWN || p.iIconIndex != IDI_UNDETECTED) {
TCHAR destfile[MAX_PATH];
- mir_sntprintf(destfile, SIZEOF(destfile), _T("%s\\%s.dll"), g_szSkinLib, p.szIconFileName);
+ mir_sntprintf(destfile, SIZEOF(destfile), _T("%s"), g_szSkinLib);
struct _stat64i32 stFileInfo;
if (_tstat(destfile, &stFileInfo) == -1)
@@ -447,14 +443,8 @@ static void MatchMasks(TCHAR* szMirVer, short *base, short *overlay,short *overl
if ( !WildCompare(szMirVer, p.szMaskUpper))
continue;
- if (p.szIconFileName != _T("ClientIcons_packs"))
- break;
-
- TCHAR destfile[MAX_PATH];
- mir_sntprintf(destfile, SIZEOF(destfile), _T("%s\\%s.dll"), g_szSkinLib, p.szIconFileName);
-
struct _stat64i32 stFileInfo;
- if ( _tstat(destfile, &stFileInfo) != -1)
+ if ( _tstat(g_szSkinLib, &stFileInfo) != -1)
break;
}