diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/JabberG/src/jabber.cpp | 3 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_menu.cpp | 7 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_proto.cpp | 4 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_userinfo.cpp | 7 |
4 files changed, 16 insertions, 5 deletions
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp index c8f45d0f2b..663f68d4c4 100644 --- a/protocols/JabberG/src/jabber.cpp +++ b/protocols/JabberG/src/jabber.cpp @@ -65,6 +65,7 @@ HANDLE hExtraMood = NULL; HANDLE hExtListInit, hDiscoInfoResult;
void JabberUserInfoInit(void);
+void JabberUserInfoUninit(void);
int bSecureIM, bMirOTR, bNewGPG, bPlatform;
@@ -227,6 +228,8 @@ extern "C" int __declspec(dllexport) Load() extern "C" int __declspec(dllexport) Unload(void)
{
+ JabberUserInfoUninit();
+
DestroyHookableEvent(hExtListInit);
DestroyHookableEvent(hDiscoInfoResult);
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 04a1b8c3be..2d0f0beb0b 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -33,6 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define MENUITEM_SERVER 2
#define MENUITEM_RESOURCES 10
+static HANDLE hDialogsList = NULL;
static HANDLE hChooserMenu, hStatusMenuInit;
static int iChooserMenuPos = 30000;
@@ -337,6 +338,8 @@ void g_MenuUninit(void) CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)g_hMenuLogin, 0);
CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)g_hMenuRefresh, 0);
CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)g_hMenuAddBookmark, 0);
+
+ WindowList_Destroy(hDialogsList);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -966,8 +969,6 @@ void CJabberProto::CheckMenuItems() //////////////////////////////////////////////////////////////////////////
// resource menu
-static HANDLE hDialogsList = NULL;
-
void CJabberProto::MenuUpdateSrmmIcon(JABBER_LIST_ITEM *item)
{
if (item->list != LIST_ROSTER)
@@ -989,7 +990,7 @@ int CJabberProto::OnProcessSrmmEvent(WPARAM, LPARAM lParam) if (event->uType == MSG_WINDOW_EVT_OPEN) {
if (!hDialogsList)
- hDialogsList = (HANDLE)CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0);
+ hDialogsList = WindowList_Create();
WindowList_Add(hDialogsList, event->hwndWindow, event->hContact);
ptrT jid(getTStringA(event->hContact, "jid"));
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index bd0800245d..836b016cdd 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -79,7 +79,7 @@ CJabberProto::CJabberProto(const char *aProtoName, const TCHAR *aUserName) : debugLogA("Setting protocol/module name to '%s'", m_szModuleName);
// Jabber dialog list
- m_windowList = (HANDLE)CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0);
+ m_windowList = WindowList_Create();
// Protocol services and events...
m_hEventNudge = CreateProtoEvent(PE_NUDGE);
@@ -170,6 +170,8 @@ CJabberProto::~CJabberProto() delete m_pInfoFrame;
+ WindowList_Destroy(m_windowList);
+
DestroyHookableEvent(m_hEventNudge);
DestroyHookableEvent(m_hEventXStatusIconChanged);
DestroyHookableEvent(m_hEventXStatusChanged);
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp index 77262da4f2..bb85ac1f74 100644 --- a/protocols/JabberG/src/jabber_userinfo.cpp +++ b/protocols/JabberG/src/jabber_userinfo.cpp @@ -833,7 +833,12 @@ int CJabberProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam) void JabberUserInfoInit()
{
- hUserInfoList = (HANDLE)CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0);
+ hUserInfoList = WindowList_Create();
+}
+
+void JabberUserInfoUninit()
+{
+ WindowList_Destroy(hUserInfoList);
}
/////////////////////////////////////////////////////////////////////////////////////////
|