diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-30 18:59:38 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-30 18:59:38 +0000 |
commit | 10bc9e42dfba6ed8be41199243d688c2e367dc0d (patch) | |
tree | 891aca91eeb2feddb6c76498c4eb880689360fe6 /plugins/SMS | |
parent | 5dac5be47f2d9af8cbceead6511ff4c0fc40bab5 (diff) |
MS_CLIST_GETSTATUSMODEDESCRIPTION & MS_CLIST_GETCONTACTDISPLAYNAME replaced with pcli->* members
git-svn-id: http://svn.miranda-ng.org/main/trunk@14459 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SMS')
-rw-r--r-- | plugins/SMS/src/SMS_svc.cpp | 2 | ||||
-rw-r--r-- | plugins/SMS/src/common.h | 3 | ||||
-rw-r--r-- | plugins/SMS/src/main.cpp | 3 | ||||
-rw-r--r-- | plugins/SMS/src/options.cpp | 2 | ||||
-rw-r--r-- | plugins/SMS/src/receive.cpp | 4 | ||||
-rw-r--r-- | plugins/SMS/src/recvdlg.cpp | 2 | ||||
-rw-r--r-- | plugins/SMS/src/senddlg.cpp | 8 |
7 files changed, 11 insertions, 13 deletions
diff --git a/plugins/SMS/src/SMS_svc.cpp b/plugins/SMS/src/SMS_svc.cpp index a1b1dfa165..323e08f1d5 100644 --- a/plugins/SMS/src/SMS_svc.cpp +++ b/plugins/SMS/src/SMS_svc.cpp @@ -79,7 +79,7 @@ int SendSMSMenuCommand(WPARAM wParam,LPARAM lParam) for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (GetContactPhonesCount(hContact)) {
- SendDlgItemMessage(hwndSendSms,IDC_NAME,CB_ADDSTRING,0,(LPARAM)GetContactNameW(hContact));
+ SendDlgItemMessage(hwndSendSms, IDC_NAME, CB_ADDSTRING, 0, (LPARAM)pcli->pfnGetContactDisplayName(hContact, 0));
SendSMSWindowSMSContactAdd(hwndSendSms,hContact);
}
}
diff --git a/plugins/SMS/src/common.h b/plugins/SMS/src/common.h index a83c711a42..5eae581d27 100644 --- a/plugins/SMS/src/common.h +++ b/plugins/SMS/src/common.h @@ -79,9 +79,6 @@ extern SMS_SETTINGS ssSMSSettings; #define GET_DLG_ITEM_TEXT_LENGTH(hDlg,nIDDlgItem) SendDlgItemMessage(hDlg,nIDDlgItem,WM_GETTEXTLENGTH,NULL,NULL)
#define GET_CURRENT_COMBO_DATA(hWndDlg,ControlID) SendDlgItemMessage(hWndDlg,ControlID,CB_GETITEMDATA,SendDlgItemMessage(hWndDlg,ControlID,CB_GETCURSEL,0,0),0)
-
-#define GetContactNameW(Contact) (LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)Contact,GCDNF_UNICODE)
-
#define DB_SMS_DeleteValue(Contact,valueName) db_unset(Contact,PROTOCOL_NAMEA,valueName)
#define DB_SMS_GetDword(Contact,valueName,parDefltValue) db_get_dw(Contact,PROTOCOL_NAMEA,valueName,parDefltValue)
#define DB_SMS_SetDword(Contact,valueName,parValue) db_set_dw(Contact,PROTOCOL_NAMEA,valueName,parValue)
diff --git a/plugins/SMS/src/main.cpp b/plugins/SMS/src/main.cpp index 824d4a568e..e670a6fbb2 100644 --- a/plugins/SMS/src/main.cpp +++ b/plugins/SMS/src/main.cpp @@ -27,12 +27,12 @@ Enjoy the code and use it smartly! #include "common.h"
+CLIST_INTERFACE *pcli;
int hLangpack;
HINSTANCE hInst;
SMS_SETTINGS ssSMSSettings;
-
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
@@ -79,6 +79,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpvReserved) extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
HookEvent(ME_SYSTEM_MODULESLOADED,OnModulesLoaded);
HookEvent(ME_SYSTEM_PRESHUTDOWN,OnPreShutdown);
diff --git a/plugins/SMS/src/options.cpp b/plugins/SMS/src/options.cpp index 4d9cafd7e4..f4faad168b 100644 --- a/plugins/SMS/src/options.cpp +++ b/plugins/SMS/src/options.cpp @@ -38,7 +38,7 @@ INT_PTR CALLBACK DlgProcEditorOptions(HWND hWndDlg, UINT msg, WPARAM wParam, LPA TranslateDialogDefault(hWndDlg);
if (DB_SMS_GetStaticStringW(NULL,"Signature",tszSign,_countof(tszSign),NULL)==FALSE)
- mir_sntprintf(tszSign,_countof(tszSign),TranslateT("From %s:\r\n\r\n"),GetContactNameW(NULL));
+ mir_sntprintf(tszSign, TranslateT("From %s:\r\n\r\n"), pcli->pfnGetContactDisplayName(0, 0));
SetDlgItemText(hWndDlg,IDC_SIGNATURE,tszSign);
{
diff --git a/plugins/SMS/src/receive.cpp b/plugins/SMS/src/receive.cpp index 84eb7cae6e..949f2f89b7 100644 --- a/plugins/SMS/src/receive.cpp +++ b/plugins/SMS/src/receive.cpp @@ -238,7 +238,7 @@ int handleNewMessage(WPARAM hContact, LPARAM hDbEvent) }
else {
memcpy(pszServiceFunctionName,SMS_READ,sizeof(SMS_READ));
- mir_sntprintf(szToolTip,_countof(szToolTip),TranslateT("SMS Message from %s"),GetContactNameW(hContact));
+ mir_sntprintf(szToolTip,_countof(szToolTip),TranslateT("SMS Message from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
CLISTEVENT cle = { sizeof(cle) };
cle.flags = CLEF_TCHAR;
@@ -261,7 +261,7 @@ int handleNewMessage(WPARAM hContact, LPARAM hDbEvent) UINT iIcon;
if (GetDataFromMessage((LPSTR)dbei.pBlob, dbei.cbBlob, NULL, NULL, 0, NULL, &iIcon)) {
memcpy(pszServiceFunctionName,SMS_READ_ACK,sizeof(SMS_READ_ACK));
- mir_sntprintf(szToolTip,_countof(szToolTip),TranslateT("SMS Confirmation from %s"),GetContactNameW(hContact));
+ mir_sntprintf(szToolTip,_countof(szToolTip),TranslateT("SMS Confirmation from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
CLISTEVENT cle = { sizeof(cle) };
cle.flags = CLEF_TCHAR;
diff --git a/plugins/SMS/src/recvdlg.cpp b/plugins/SMS/src/recvdlg.cpp index 230c65c3b8..f101df922b 100644 --- a/plugins/SMS/src/recvdlg.cpp +++ b/plugins/SMS/src/recvdlg.cpp @@ -219,7 +219,7 @@ HWND RecvSMSWindowAdd(MCONTACT hContact, DWORD dwEventType, LPWSTR lpwszPhone, s dwPhoneSize++;
}
- lpwszContactDisplayName = GetContactNameW(hContact);
+ lpwszContactDisplayName = pcli->pfnGetContactDisplayName(hContact, 0);
mir_sntprintf(wszTitle, _countof(wszTitle),_T("%s - %s"), lpwszContactDisplayName, lpwszTitlepart);
MultiByteToWideChar(CP_UTF8, 0, lpszMessage, (int)dwMessageSize, lpwszMessage, (int)dwMessageSize+MAX_PATH);
diff --git a/plugins/SMS/src/senddlg.cpp b/plugins/SMS/src/senddlg.cpp index 34e1ec1177..63d353bdc2 100644 --- a/plugins/SMS/src/senddlg.cpp +++ b/plugins/SMS/src/senddlg.cpp @@ -573,7 +573,7 @@ HWND SendSMSWindowAdd(MCONTACT hContact) ListMTItemAdd(&ssSMSSettings.lmtSendSMSWindowsListMT,&psswdWindowData->lmtListMTItem,psswdWindowData);
ListMTUnLock(&ssSMSSettings.lmtSendSMSWindowsListMT);
- LPTSTR lptszContactDisplayName=GetContactNameW(hContact);
+ LPTSTR lptszContactDisplayName = pcli->pfnGetContactDisplayName(hContact, 0);
TCHAR tszTitle[MAX_PATH];
mir_sntprintf(tszTitle, _countof(tszTitle), _T("%s - %s"), lptszContactDisplayName, TranslateT("Send SMS"));
SetWindowText(psswdWindowData->hWnd,tszTitle);
@@ -1054,8 +1054,8 @@ void AddContactPhonesToTreeViewParam(MCONTACT hContact,LPSTR lpszModule,LPSTR lp {
if (tvis.hParent==NULL)
{
- tvis.item.pszText=GetContactNameW(hContact);
- tvis.hParent=TreeView_InsertItem(hWndList,&tvis);
+ tvis.item.pszText = pcli->pfnGetContactDisplayName(hContact, 0);
+ tvis.hParent=TreeView_InsertItem(hWndList, &tvis);
}
tvis.item.pszText=tszPhone;
TreeView_InsertItem(hWndList,&tvis);
@@ -1073,7 +1073,7 @@ void AddContactPhonesToTreeViewParam(MCONTACT hContact,LPSTR lpszModule,LPSTR lp {
if (tvis.hParent==NULL)
{
- tvis.item.pszText=GetContactNameW(hContact);
+ tvis.item.pszText = pcli->pfnGetContactDisplayName(hContact, 0);
tvis.hParent=TreeView_InsertItem(hWndList,&tvis);
}
tvis.item.pszText=tszPhone;
|