summaryrefslogtreecommitdiff
path: root/plugins/Scriver
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-03-15 21:02:46 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-03-15 21:02:46 +0000
commit07c9f96b205efa52abfe26fb7b77ce13e4d510df (patch)
tree89a8babe6be78e19cbfe5875da0baeb244822133 /plugins/Scriver
parent9561b4646d502c99174a2bc0bf40f3ad5bc39d93 (diff)
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@8634 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver')
-rw-r--r--plugins/Scriver/src/utils.cpp48
1 files changed, 24 insertions, 24 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 */