summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/Flags/svc_flags.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-12-22 17:31:01 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-12-22 17:31:01 +0000
commit9263c0341134cc0079cf78b64319cc81d035317b (patch)
treec609a41ee8d103c0765ae5148362738a602d6080 /plugins/UserInfoEx/src/Flags/svc_flags.cpp
parentf98e2216f98a31dbb0f77b97249aaaee75b345ed (diff)
more cleaning for гштащуч
git-svn-id: http://svn.miranda-ng.org/main/trunk@7341 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/Flags/svc_flags.cpp')
-rw-r--r--plugins/UserInfoEx/src/Flags/svc_flags.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.cpp b/plugins/UserInfoEx/src/Flags/svc_flags.cpp
index 46907cc5ec..9ee871bd61 100644
--- a/plugins/UserInfoEx/src/Flags/svc_flags.cpp
+++ b/plugins/UserInfoEx/src/Flags/svc_flags.cpp
@@ -34,7 +34,6 @@ struct CountryListEntry *countries;
static HANDLE hExtraIconSvc = INVALID_HANDLE_VALUE;
/* hook */
static HANDLE hApplyIconHook = NULL;
-static HANDLE hMsgWndEventHook = NULL;
static HANDLE hSettingChangedHook = NULL;
static int OnContactSettingChanged(WPARAM wParam,LPARAM lParam);
@@ -211,7 +210,8 @@ void SvcFlagsEnableExtraIcons(BYTE bColumn, BYTE bUpdateDB)
* message winsow status icon functions
***********************************************************************************************************/
-MsgWndData::MsgWndData(HWND hwnd, HANDLE hContact) {
+MsgWndData::MsgWndData(HWND hwnd, HANDLE hContact)
+{
m_hwnd = hwnd;
m_hContact = hContact;
m_countryID = (int)ServiceDetectContactOriginCountry((WPARAM)m_hContact, 0);
@@ -224,7 +224,8 @@ MsgWndData::MsgWndData(HWND hwnd, HANDLE hContact) {
FlagsIconUpdate();
}
-MsgWndData::~MsgWndData() {
+MsgWndData::~MsgWndData()
+{
FlagsIconUnset(); //check if realy need
}
@@ -360,23 +361,23 @@ static int OnStatusIconsChanged(WPARAM wParam, LPARAM lParam)
static int OnContactSettingChanged(WPARAM wParam, LPARAM lParam)
{
- if ((HANDLE)wParam == NULL) return 0;
- DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING*)lParam;
+ if ((HANDLE)wParam == NULL)
+ return 0;
/* user details update */
+ DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING*)lParam;
if (!lstrcmpA(dbcws->szSetting, SET_CONTACT_COUNTRY) ||
- !lstrcmpA(dbcws->szSetting, SET_CONTACT_ORIGIN_COUNTRY) ||
- !lstrcmpA(dbcws->szSetting, SET_CONTACT_COMPANY_COUNTRY))
+ !lstrcmpA(dbcws->szSetting, SET_CONTACT_ORIGIN_COUNTRY) ||
+ !lstrcmpA(dbcws->szSetting, SET_CONTACT_COMPANY_COUNTRY))
{
/* Extra Image */
- CallFunctionBuffered(SetExtraImage, wParam, TRUE, EXTRAIMAGE_REFRESHDELAY);
+ SetExtraImage(wParam);
+
/* Status Icon */
- if (hMsgWndEventHook) {
- int i = gMsgWndList.getIndex((MsgWndData*)&wParam);
- if (i != -1) {
- gMsgWndList[i]->ContryIDchange((int)ServiceDetectContactOriginCountry(wParam, 0));
- gMsgWndList[i]->FlagsIconUpdate();
- }
+ int i = gMsgWndList.getIndex((MsgWndData*)&wParam);
+ if (i != -1) {
+ gMsgWndList[i]->ContryIDchange((int)ServiceDetectContactOriginCountry(wParam, 0));
+ gMsgWndList[i]->FlagsIconUpdate();
}
}
return 0;
@@ -423,7 +424,7 @@ void SvcFlagsOnModulesLoaded()
SvcFlagsEnableExtraIcons(db_get_b(NULL, MODNAME, SET_CLIST_EXTRAICON_FLAGS2, 0), FALSE);
/* Status Icon */
- hMsgWndEventHook = HookEvent(ME_MSG_WINDOWEVENT, OnMsgWndEvent);
+ HookEvent(ME_MSG_WINDOWEVENT, OnMsgWndEvent);
}
/**
@@ -439,7 +440,6 @@ void SvcFlagsUnloadModule()
//Uninit ExtraImg
UnhookEvent(hApplyIconHook);
//Uninit message winsow
- UnhookEvent(hMsgWndEventHook);
for (int i = 0; i < gMsgWndList.getCount(); i++) {
//this should not happen
delete gMsgWndList[i];