summaryrefslogtreecommitdiff
path: root/protocols/Tlen/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-15 16:26:10 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-15 16:26:10 +0000
commit7fe6e93058f0e9253e2a79d7fc2d7a136784f791 (patch)
tree861225801bcda335939cac2fa6ddc6083f52f51f /protocols/Tlen/src
parent21e84e8d5012cc0b600f27a4d796d3813b29a16c (diff)
various popup related code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@4056 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tlen/src')
-rw-r--r--protocols/Tlen/src/jabber_opt.cpp28
1 files changed, 7 insertions, 21 deletions
diff --git a/protocols/Tlen/src/jabber_opt.cpp b/protocols/Tlen/src/jabber_opt.cpp
index 27075b1d03..485bcf4c72 100644
--- a/protocols/Tlen/src/jabber_opt.cpp
+++ b/protocols/Tlen/src/jabber_opt.cpp
@@ -577,31 +577,17 @@ static INT_PTR CALLBACK TlenAdvOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
static void MailPopupPreview(DWORD colorBack, DWORD colorText, char *title, char *emailInfo, int delay)
{
- POPUPDATA ppd;
- char * lpzContactName;
- char * lpzText;
- HICON hIcon;
- lpzContactName = title;
- lpzText = emailInfo;
- ZeroMemory(&ppd, sizeof(ppd));
- ppd.lchContact = NULL;
- hIcon = GetIcolibIcon(IDI_MAIL);
+ POPUPDATA ppd = { 0 };
+ HICON hIcon = GetIcolibIcon(IDI_MAIL);
ppd.lchIcon = CopyIcon(hIcon);
ReleaseIcolibIcon(hIcon);
- strcpy(ppd.lpzContactName, lpzContactName);
- strcpy(ppd.lpzText, lpzText);
+ strcpy(ppd.lpzContactName, title);
+ strcpy(ppd.lpzText, emailInfo);
ppd.colorBack = colorBack;
ppd.colorText = colorText;
- ppd.PluginWindowProc = NULL;
- ppd.PluginData=NULL;
- if ( ServiceExists(MS_POPUP_ADDPOPUP)) {
- ppd.iSeconds = delay;
- CallService(MS_POPUP_ADDPOPUP, (WPARAM)&ppd, 0);
-
- }
- else if ( ServiceExists(MS_POPUP_ADDPOPUP)) {
- CallService(MS_POPUP_ADDPOPUP, (WPARAM)&ppd, 0);
- }
+ ppd.iSeconds = delay;
+ if ( ServiceExists(MS_POPUP_ADDPOPUP))
+ PUAddPopUp(&ppd);
}
static INT_PTR CALLBACK TlenPopupsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)