From 7fe6e93058f0e9253e2a79d7fc2d7a136784f791 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 15 Mar 2013 16:26:10 +0000 Subject: various popup related code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@4056 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tlen/src/jabber_opt.cpp | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) (limited to 'protocols/Tlen/src/jabber_opt.cpp') 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) -- cgit v1.2.3