diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-30 17:32:39 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-30 17:32:39 +0000 |
commit | 109877a3c75cb290c55755dcfc88794d2453669d (patch) | |
tree | 3ede8b9170b2fc3f6f35dc2cea6742d44b19d631 /plugins/SMS/src/senddlg.cpp | |
parent | fee8d991bdf4a59b563d1b92165ea0ed2f7bacb8 (diff) |
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
Diffstat (limited to 'plugins/SMS/src/senddlg.cpp')
-rw-r--r-- | plugins/SMS/src/senddlg.cpp | 42 |
1 files changed, 15 insertions, 27 deletions
diff --git a/plugins/SMS/src/senddlg.cpp b/plugins/SMS/src/senddlg.cpp index e4a0361ac2..965e7fcb6e 100644 --- a/plugins/SMS/src/senddlg.cpp +++ b/plugins/SMS/src/senddlg.cpp @@ -748,13 +748,10 @@ void SendSMSWindowDbeiSet(HWND hWndDlg,DBEVENTINFO *pdbei) void SendSMSWindowDBAdd(HWND hWndDlg)
{
SEND_SMS_WINDOW_DATA *psswdWindowData=GET_WINDOW_DATA(hWndDlg);
-
- if (psswdWindowData)
- {
- psswdWindowData->pdbei->cbSize=sizeof(DBEVENTINFO);
- psswdWindowData->pdbei->szModule=GetModuleName(psswdWindowData->hContact);
-
- CallService(MS_DB_EVENT_ADD,(WPARAM)psswdWindowData->hContact,(LPARAM)psswdWindowData->pdbei);
+ if (psswdWindowData) {
+ psswdWindowData->pdbei->cbSize = sizeof(DBEVENTINFO);
+ psswdWindowData->pdbei->szModule = GetModuleName(psswdWindowData->hContact);
+ db_event_add(psswdWindowData->hContact, psswdWindowData->pdbei);
MEMFREE(psswdWindowData->pdbei);
}
}
@@ -763,7 +760,8 @@ void SendSMSWindowDBAdd(HWND hWndDlg) void SendSMSWindowHItemSendSet(HWND hWndDlg,HTREEITEM hItemSend)
{
SEND_SMS_WINDOW_DATA *psswdWindowData=GET_WINDOW_DATA(hWndDlg);
- if (psswdWindowData) psswdWindowData->hItemSend=hItemSend;
+ if (psswdWindowData)
+ psswdWindowData->hItemSend=hItemSend;
}
//
@@ -773,7 +771,7 @@ HTREEITEM SendSMSWindowHItemSendGet(HWND hWndDlg) SEND_SMS_WINDOW_DATA *psswdWindowData=GET_WINDOW_DATA(hWndDlg);
if (psswdWindowData) hRet=psswdWindowData->hItemSend;
-return(hRet);
+ return hRet;
}
//
@@ -1017,15 +1015,11 @@ void AddContactPhonesToComboToListParam(HANDLE hContact,LPSTR lpszModule,LPSTR l void AddContactPhonesToCombo(HWND hWnd,HANDLE hContact)
{
- HWND hWndList;
- LPSTR lpszProto;
-
- hWndList=GetDlgItem(hWnd,IDC_ADDRESS);
+ HWND hWndList = GetDlgItem(hWnd,IDC_ADDRESS);
SEND_DLG_ITEM_MESSAGE(hWnd,IDC_ADDRESS,CB_RESETCONTENT,0,0);
- lpszProto=(LPSTR)CallService(MS_PROTO_GETCONTACTBASEPROTO,(WPARAM)hContact,0);
- if (lpszProto)
- {
+ LPSTR lpszProto = GetContactProto(hContact);
+ if (lpszProto) {
AddContactPhonesToComboToListParam(hContact,lpszProto,"Phone",hWndList);
AddContactPhonesToComboToListParam(hContact,lpszProto,"Cellular",hWndList);
AddContactPhonesToComboToListParam(hContact,lpszProto,"Fax",hWndList);
@@ -1095,19 +1089,13 @@ void AddContactPhonesToTreeViewParam(HANDLE hContact,LPSTR lpszModule,LPSTR lpsz void SendSMSWindowFillTreeView(HWND hWnd)
{
- HWND hWndTreeView;
- LPSTR lpszProto;
- HTREEITEM hParent;
-
- hWndTreeView=GetDlgItem(hWnd,IDC_NUMBERSLIST);
+ HWND hWndTreeView=GetDlgItem(hWnd,IDC_NUMBERSLIST);
TreeView_DeleteAllItems(hWndTreeView);
- for(HANDLE hContact=(HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);hContact!=NULL;hContact=(HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0))
- {
- hParent=NULL;
- lpszProto=(LPSTR)CallService(MS_PROTO_GETCONTACTBASEPROTO,(WPARAM)hContact,0);
- if (lpszProto)
- {
+ for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ HTREEITEM hParent = NULL;
+ LPSTR lpszProto = GetContactProto(hContact);
+ if (lpszProto) {
AddContactPhonesToTreeViewParam(hContact,lpszProto,"Phone",hWndTreeView,&hParent);
AddContactPhonesToTreeViewParam(hContact,lpszProto,"Cellular",hWndTreeView,&hParent);
AddContactPhonesToTreeViewParam(hContact,lpszProto,"Fax",hWndTreeView,&hParent);
|