summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu/src/popups.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/Gadu-Gadu/src/popups.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/Gadu-Gadu/src/popups.cpp')
-rw-r--r--protocols/Gadu-Gadu/src/popups.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/protocols/Gadu-Gadu/src/popups.cpp b/protocols/Gadu-Gadu/src/popups.cpp
index 386435c973..fcd58ea3e9 100644
--- a/protocols/Gadu-Gadu/src/popups.cpp
+++ b/protocols/Gadu-Gadu/src/popups.cpp
@@ -79,9 +79,9 @@ void GGPROTO::initpopups()
puc.cbSize = sizeof(puc);
puc.PluginWindowProc = PopupWindowProc;
puc.flags = PCF_TCHAR;
-
puc.ptszDescription = szDescr;
puc.pszName = szName;
+
puc.colorBack = RGB(173, 206, 247);
puc.colorText = GetSysColor(COLOR_WINDOWTEXT);
puc.hIcon = CopyIcon(LoadIconEx("main", FALSE));
@@ -89,17 +89,15 @@ void GGPROTO::initpopups()
puc.iSeconds = 4;
mir_sntprintf(szDescr, SIZEOF(szDescr), _T("%s/%s"), m_tszUserName, TranslateT("Notify"));
mir_snprintf(szName, SIZEOF(szName), "%s_%s", m_szModuleName, "Notify");
- CallService(MS_POPUP_REGISTERCLASS, 0, (WPARAM)&puc);
+ hPopupNotify = Popup_RegisterClass(&puc);
- puc.ptszDescription = szDescr;
- puc.pszName = szName;
puc.colorBack = RGB(191, 0, 0); // Red
puc.colorText = RGB(255, 245, 225); // Yellow
puc.iSeconds = 60;
puc.hIcon = (HICON)LoadImage(NULL, IDI_WARNING, IMAGE_ICON, 0, 0, LR_SHARED);
mir_sntprintf(szDescr, SIZEOF(szDescr), _T("%s/%s"), m_tszUserName, TranslateT("Error"));
mir_snprintf(szName, SIZEOF(szName), "%s_%s", m_szModuleName, "Error");
- CallService(MS_POPUP_REGISTERCLASS, 0, (WPARAM)&puc);
+ hPopupError = Popup_RegisterClass(&puc);
}
/////////////////////////////////////////////////////////////////////////////////////////