From 109877a3c75cb290c55755dcfc88794d2453669d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 30 Mar 2013 17:32:39 +0000 Subject: MS_DB_EVENT_* services remained, but their calls removed git-svn-id: http://svn.miranda-ng.org/main/trunk@4255 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/BuddyPounce/src/dialog.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'plugins/BuddyPounce/src/dialog.cpp') diff --git a/plugins/BuddyPounce/src/dialog.cpp b/plugins/BuddyPounce/src/dialog.cpp index 5b466b98df..64a218848e 100644 --- a/plugins/BuddyPounce/src/dialog.cpp +++ b/plugins/BuddyPounce/src/dialog.cpp @@ -8,29 +8,23 @@ void populateSettingsList(HWND hwnd2List) SendMessage(hwnd2List, LB_ADDSTRING, 0, (LPARAM)TranslateT("Reuse Pounce")); SendMessage(hwnd2List, LB_ADDSTRING, 0, (LPARAM)TranslateT("Give Up delay")); SendMessage(hwnd2List, LB_ADDSTRING, 0, (LPARAM)TranslateT("Confirmation Window")); -// SendMessage(hwnd2List, LB_ADDSTRING, 0, (LPARAM)"----------------------------")); -// SendMessage(hwnd2List, LB_ADDSTRING, 0, (LPARAM)Translate("Send a File")); } void populateContacts(HANDLE BPhContact,HWND hwnd2CB) { - HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); - while (hContact) - { - char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); - if (szProto && (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM)) - { + for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { + char *szProto = GetContactProto(hContact); + if (szProto && (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM)) { TCHAR name[300]; mir_sntprintf(name, SIZEOF(name), _T("%s (%s)"), CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR), _A2T(szProto)); int index = SendMessage(hwnd2CB, CB_ADDSTRING, 0, (LPARAM)name); SendMessage(hwnd2CB, CB_SETITEMDATA, index, (LPARAM)hContact); - if (BPhContact == hContact) SendMessage(hwnd2CB, CB_SETCURSEL, index, 0); + if (BPhContact == hContact) + SendMessage(hwnd2CB, CB_SETCURSEL, index, 0); } - hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); } } - void saveLastSetting(HANDLE hContact, HWND hwnd) { TCHAR number[8];//, string[1024];//for sending file name -- cgit v1.2.3