summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_misc.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-17 14:22:17 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-17 14:22:17 +0000
commit15267ea2d489606fb4b99d011bc3ea7c2a644a9f (patch)
tree607fb948632ec8b348508cbd08ef41fffe21d8c2 /protocols/JabberG/src/jabber_misc.cpp
parent5e6e1e8838fe7637ef588e0fb080ad07fc5700aa (diff)
fix for popup-related memory leaks
git-svn-id: http://svn.miranda-ng.org/main/trunk@4077 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_misc.cpp')
-rw-r--r--protocols/JabberG/src/jabber_misc.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp
index 31f10ad5c5..0d8167fa89 100644
--- a/protocols/JabberG/src/jabber_misc.cpp
+++ b/protocols/JabberG/src/jabber_misc.cpp
@@ -26,9 +26,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "jabber_list.h"
#include "jabber_caps.h"
-#include <m_popup.h>
-#include "m_folders.h"
-
///////////////////////////////////////////////////////////////////////////////
// JabberAddContactToRoster() - adds a contact to the roster
@@ -623,22 +620,20 @@ void CJabberProto::SetContactOfflineStatus(HANDLE hContact)
void CJabberProto::InitPopups(void)
{
TCHAR desc[256];
+ mir_sntprintf(desc, SIZEOF(desc), _T("%s %s"), m_tszUserName, TranslateT("Errors"));
+
char name[256];
+ mir_snprintf(name, SIZEOF(name), "%s_%s", m_szModuleName, "Error");
- POPUPCLASS ppc = {0};
- ppc.cbSize = sizeof(ppc);
+ POPUPCLASS ppc = { sizeof(ppc) };
ppc.flags = PCF_TCHAR;
-
ppc.ptszDescription = desc;
ppc.pszName = name;
ppc.hIcon = LoadIconEx("main");
ppc.colorBack = RGB(191, 0, 0); //Red
ppc.colorText = RGB(255, 245, 225); //Yellow
ppc.iSeconds = 60;
- mir_sntprintf(desc, SIZEOF(desc), _T("%s %s"), m_tszUserName, TranslateT("Errors"));
- mir_snprintf(name, SIZEOF(name), "%s_%s", m_szModuleName, "Error");
-
- CallService(MS_POPUP_REGISTERCLASS, 0, (WPARAM)&ppc);
+ m_hPopupClass = Popup_RegisterClass(&ppc);
}
void CJabberProto::MsgPopup(HANDLE hContact, const TCHAR *szMsg, const TCHAR *szTitle)