From ef0abe4f9f67eeff4007f4839ba08a503472c74c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 21 Jan 2014 23:24:02 +0000 Subject: - new typed helper, WindowList_Create, to create a window list - new service, WindowList_Destroy, to destroy a window list - internal windowlist.cpp implementation rewritten to LIST<> git-svn-id: http://svn.miranda-ng.org/main/trunk@7823 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/src/jabber_menu.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'protocols/JabberG/src/jabber_menu.cpp') 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")); -- cgit v1.2.3