From 05dbe6dad7f92876a85aafc92c2ded31d0b220bf Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sat, 19 Mar 2016 10:54:45 +0000 Subject: Fingerprint: some fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@16507 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/FingerprintNG/src/fingerprint.cpp | 30 +++--------------------------- plugins/FingerprintNG/src/masks.cpp | 3 +-- 2 files changed, 4 insertions(+), 29 deletions(-) (limited to 'plugins/FingerprintNG/src') diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp index 6fd60942de..a5f3394462 100644 --- a/plugins/FingerprintNG/src/fingerprint.cpp +++ b/plugins/FingerprintNG/src/fingerprint.cpp @@ -169,10 +169,6 @@ int __fastcall ApplyFingerprintImage(MCONTACT hContact, LPTSTR szMirVer) if (arMonitoredWindows.getIndex((HANDLE)hContact) != -1) SetSrmmIcon(hContact, szMirVer); - MCONTACT hMeta = db_mc_getMeta(hContact); - if (hMeta && db_mc_getMostOnline(hMeta) == hContact) - db_set_ts(hMeta, META_PROTO, "MirVer", szMirVer); - return 0; } @@ -853,27 +849,6 @@ int OnExtraImageApply(WPARAM hContact, LPARAM) return 0; } -/**************************************************************************************** -* OnMetaDefaultChanged -* update MC icon according to its default contact -*/ - -static int OnMetaDefaultChanged(WPARAM hMeta, LPARAM hSub) -{ - if (hSub != NULL) { - char *szProto = GetContactProto(hSub); - if (szProto != NULL) { - ptrT tszMirver(db_get_tsa(hSub, szProto, "MirVer")); - if (tszMirver) - db_set_ts(hMeta, META_PROTO, "MirVer", tszMirver); - else - db_unset(hMeta, META_PROTO, "MirVer"); - } - } - - return 0; -} - /**************************************************************************************** * OnContactSettingChanged * if contact settings changed apply new image or remove it @@ -926,7 +901,7 @@ static int OnSrmmWindowEvent(WPARAM, LPARAM lParam) arMonitoredWindows.insert((HANDLE)event->hContact); } else if (event->uType == MSG_WINDOW_EVT_CLOSE) - arMonitoredWindows.remove(event->hContact); + arMonitoredWindows.remove((HANDLE)event->hContact); return 0; } @@ -946,6 +921,8 @@ int OnModulesLoaded(WPARAM, LPARAM) HookEvent(ME_OPT_INITIALISE, OnOptInitialise); HookEvent(ME_MSG_WINDOWEVENT, OnSrmmWindowEvent); + HookEvent(ME_MC_DEFAULTTCHANGED, OnExtraImageApply); + PathToAbsoluteT(DEFAULT_SKIN_FOLDER, g_szSkinLib); RegisterIcons(); @@ -964,7 +941,6 @@ int OnModulesLoaded(WPARAM, LPARAM) void InitFingerModule() { HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); - HookEvent(ME_MC_DEFAULTTCHANGED, OnMetaDefaultChanged); CreateServiceFunction(MS_FP_SAMECLIENTSW, ServiceSameClientsW); CreateServiceFunction(MS_FP_GETCLIENTDESCRW, ServiceGetClientDescrW); diff --git a/plugins/FingerprintNG/src/masks.cpp b/plugins/FingerprintNG/src/masks.cpp index 081c76c745..4994425cc3 100644 --- a/plugins/FingerprintNG/src/masks.cpp +++ b/plugins/FingerprintNG/src/masks.cpp @@ -54,8 +54,7 @@ KN_FP_MASK def_kn_fp_mask[] = //################################# MIRANDA ########################################################################################################################### //######################################################################################################################################################################### - { "client_Miranda_NG", _T("|*nightly.miranda.im*") - NIGHTLY_CORE_VERSION, _T("Miranda NG"), IDI_MIRANDA_NG, MIRANDA_CASE }, + { "client_Miranda_NG", _T("|*nightly.miranda.im*") NIGHTLY_CORE_VERSION, _T("Miranda NG"), IDI_MIRANDA_NG, MIRANDA_CASE }, { "client_Miranda_NG_stbl", _T("|Miranda*NG*"), LPGENT("Miranda NG stable"), IDI_MIRANDA_NG_STABLE, MIRANDA_CASE }, -- cgit v1.2.3