summaryrefslogtreecommitdiff
path: root/protocols/MSN/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/MSN/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/MSN/src')
-rw-r--r--protocols/MSN/src/msn_misc.cpp35
1 files changed, 17 insertions, 18 deletions
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp
index d0cbe4d8c2..e6b86d244f 100644
--- a/protocols/MSN/src/msn_misc.cpp
+++ b/protocols/MSN/src/msn_misc.cpp
@@ -1030,33 +1030,32 @@ void CALLBACK sttMainThreadCallback(PVOID dwParam)
mir_free(pud->text);
mir_free(pud->url);
mir_free(pud);
+ return;
}
+
+ char name[256];
+
+ POPUPDATACLASS ppd = { sizeof(ppd) };
+ ppd.ptszTitle = pud->title;
+ ppd.ptszText = pud->text;
+ ppd.PluginData = pud;
+ ppd.pszClassName = name;
+
+ if (pud->flags & MSN_SHOW_ERROR)
+ mir_snprintf(name, SIZEOF(name), "%s_%s", pud->proto->m_szModuleName, "Error");
+ else if (pud->flags & (MSN_HOTMAIL_POPUP | MSN_ALERT_POPUP))
+ mir_snprintf(name, SIZEOF(name), "%s_%s", pud->proto->m_szModuleName, "Hotmail");
else
- {
- char name[256];
-
- POPUPDATACLASS ppd = { sizeof(ppd) };
- ppd.ptszTitle = pud->title;
- ppd.ptszText = pud->text;
- ppd.PluginData = pud;
- ppd.pszClassName = name;
-
- if (pud->flags & MSN_SHOW_ERROR)
- mir_snprintf(name, SIZEOF(name), "%s_%s", pud->proto->m_szModuleName, "Error");
- else if (pud->flags & (MSN_HOTMAIL_POPUP | MSN_ALERT_POPUP))
- mir_snprintf(name, SIZEOF(name), "%s_%s", pud->proto->m_szModuleName, "Hotmail");
- else
- mir_snprintf(name, SIZEOF(name), "%s_%s", pud->proto->m_szModuleName, "Notify");
+ mir_snprintf(name, SIZEOF(name), "%s_%s", pud->proto->m_szModuleName, "Notify");
- CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&ppd);
- }
+ CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&ppd);
}
void CMsnProto::MSN_ShowPopup(const TCHAR* nickname, const TCHAR* msg, int flags, const char* url, HANDLE hContact)
{
if (Miranda_Terminated()) return;
- PopupData* pud = (PopupData*)mir_alloc(sizeof(PopupData));
+ PopupData *pud = (PopupData*)mir_calloc(sizeof(PopupData));
pud->flags = flags;
pud->url = mir_strdup(url);
pud->title = mir_tstrdup(nickname);