From 07c9f96b205efa52abfe26fb7b77ce13e4d510df Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 15 Mar 2014 21:02:46 +0000 Subject: code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@8634 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Scriver/src/utils.cpp | 48 +++++++++++++++--------------- src/modules/metacontacts/meta_services.cpp | 2 +- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp index 37e3f6f8b6..77b2b2e2af 100644 --- a/plugins/Scriver/src/utils.cpp +++ b/plugins/Scriver/src/utils.cpp @@ -429,25 +429,26 @@ void SetSearchEngineIcons(HMENU hMenu, HIMAGELIST hImageList) } } -void GetContactUniqueId(struct SrmmWindowData *dat, char *buf, int maxlen) { +void GetContactUniqueId(struct SrmmWindowData *dat, char *buf, int maxlen) +{ CONTACTINFO ci; ZeroMemory(&ci, sizeof(ci)); - ci.cbSize = sizeof(ci); - ci.hContact = dat->windowData.hContact; - ci.szProto = dat->szProto; - ci.dwFlag = CNF_UNIQUEID; + ci.cbSize = sizeof(ci); + ci.hContact = dat->windowData.hContact; + ci.szProto = dat->szProto; + ci.dwFlag = CNF_UNIQUEID; buf[0] = 0; - if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)& ci)) { - switch (ci.type) { - case CNFT_ASCIIZ: - mir_snprintf(buf, maxlen, "%s", ci.pszVal); - mir_free(ci.pszVal); - break; - case CNFT_DWORD: - mir_snprintf(buf, maxlen, "%u", ci.dVal); - break; - } - } + if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)& ci)) { + switch (ci.type) { + case CNFT_ASCIIZ: + mir_snprintf(buf, maxlen, "%s", ci.pszVal); + mir_free(ci.pszVal); + break; + case CNFT_DWORD: + mir_snprintf(buf, maxlen, "%u", ci.dVal); + break; + } + } } HWND CreateToolTip(HWND hwndParent, LPTSTR ptszText, LPTSTR ptszTitle, RECT* rect) @@ -468,29 +469,28 @@ HWND CreateToolTip(HWND hwndParent, LPTSTR ptszText, LPTSTR ptszTitle, RECT* rec ti.hinst = g_hInst; ti.lpszText = ptszText; ti.rect = *rect; - SendMessage(hwndTT, TTM_ADDTOOL, 0, (LPARAM)(LPTOOLINFO) &ti); + SendMessage(hwndTT, TTM_ADDTOOL, 0, (LPARAM)(LPTOOLINFO)&ti); SendMessage(hwndTT, TTM_SETTITLE, TTI_NONE, (LPARAM)ptszTitle); return hwndTT; } -void SetToolTipText(HWND hwndParent, HWND hwndTT, LPTSTR ptszText, LPTSTR ptszTitle) { - TOOLINFO ti = { 0 }; - ti.cbSize = sizeof(TOOLINFO); +void SetToolTipText(HWND hwndParent, HWND hwndTT, LPTSTR ptszText, LPTSTR ptszTitle) +{ + TOOLINFO ti = { sizeof(ti) }; ti.hinst = g_hInst; ti.hwnd = hwndParent; ti.lpszText = ptszText; - SendMessage(hwndTT, TTM_UPDATETIPTEXT, 0, (LPARAM)(LPTOOLINFO) &ti); + SendMessage(hwndTT, TTM_UPDATETIPTEXT, 0, (LPARAM)(LPTOOLINFO)&ti); SendMessage(hwndTT, TTM_SETTITLE, TTI_NONE, (LPARAM)ptszTitle); } void SetToolTipRect(HWND hwndParent, HWND hwndTT, RECT* rect) { - TOOLINFO ti = { 0 }; - ti.cbSize = sizeof(TOOLINFO); + TOOLINFO ti = { sizeof(ti) }; ti.hinst = g_hInst; ti.hwnd = hwndParent; ti.rect = *rect; - SendMessage(hwndTT, TTM_NEWTOOLRECT, 0, (LPARAM)(LPTOOLINFO) &ti); + SendMessage(hwndTT, TTM_NEWTOOLRECT, 0, (LPARAM)(LPTOOLINFO)&ti); } /* toolbar-related stuff, to be moved to a separate file */ diff --git a/src/modules/metacontacts/meta_services.cpp b/src/modules/metacontacts/meta_services.cpp index 0ee2bf2f80..a4e14883dd 100644 --- a/src/modules/metacontacts/meta_services.cpp +++ b/src/modules/metacontacts/meta_services.cpp @@ -558,7 +558,7 @@ int Meta_MessageWindowEvent(WPARAM wParam, LPARAM lParam) return 0; DBCachedContact *cc = currDb->m_cache->GetCachedContact(mwed->hContact); - if (cc != NULL && cc->IsMeta()) + if (cc != NULL) Meta_UpdateSrmmIcon(cc, db_get_w(cc->contactID, META_PROTO, "Status", ID_STATUS_OFFLINE)); return 0; } -- cgit v1.2.3