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/wbOSD | |
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/wbOSD')
-rw-r--r-- | plugins/wbOSD/src/events.cpp | 8 | ||||
-rw-r--r-- | plugins/wbOSD/src/main.cpp | 2 | ||||
-rw-r--r-- | plugins/wbOSD/src/options.cpp | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/plugins/wbOSD/src/events.cpp b/plugins/wbOSD/src/events.cpp index 4a622a4559..f296d74ac7 100644 --- a/plugins/wbOSD/src/events.cpp +++ b/plugins/wbOSD/src/events.cpp @@ -63,7 +63,7 @@ int ProtoAck(WPARAM,LPARAM lparam) DWORD ann = db_get_dw( NULL, THIS_MODULE, "announce", DEFAULT_ANNOUNCE );
if ( ann & ( 1 << ( ack->lParam - ID_STATUS_OFFLINE ))) {
TCHAR buffer[512];
- mir_sntprintf(buffer, _countof(buffer), TranslateT("%s is %s"), CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)ack->hContact, GCDNF_TCHAR), CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION,(WPARAM) ack->lParam,GSMDF_TCHAR));
+ mir_sntprintf(buffer, _countof(buffer), TranslateT("%s is %s"), pcli->pfnGetContactDisplayName(ack->hContact, 0), pcli->pfnGetStatusModeDescription(ack->lParam, 0));
ShowOSD(buffer, 0, db_get_dw(NULL,THIS_MODULE, "clr_status", DEFAULT_CLRSTATUS), ack->hContact);
} } }
@@ -122,7 +122,7 @@ int ContactStatusChanged(WPARAM wParam, LPARAM lParam) return 0;
TCHAR bufferW[512];
- mir_sntprintf(bufferW, _countof(bufferW), TranslateT("%s is %s"), CallService(MS_CLIST_GETCONTACTDISPLAYNAME, wParam, GCDNF_TCHAR), CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION,newStatus,GSMDF_TCHAR));
+ mir_sntprintf(bufferW, _countof(bufferW), TranslateT("%s is %s"), pcli->pfnGetContactDisplayName(wParam, 0), pcli->pfnGetStatusModeDescription(newStatus, 0));
ShowOSD(bufferW, 0, db_get_dw(NULL,THIS_MODULE, "clr_status", DEFAULT_CLRSTATUS), hContact);
return 0;
}
@@ -184,12 +184,12 @@ int HookedNewEvent(WPARAM wParam, LPARAM hDBEvent) TCHAR *c1 = 0, *c2 = 0;
if ( i1 == 1 )
- c1 = mir_tstrdup(( TCHAR* )CallService(MS_CLIST_GETCONTACTDISPLAYNAME, wParam, GCDNF_TCHAR));
+ c1 = mir_tstrdup(pcli->pfnGetContactDisplayName(wParam, 0));
else if ( i1 == 2 )
c1 = DbGetEventTextT( &dbe, 0 );
if ( i2 == 1 )
- c2 = mir_tstrdup(( TCHAR* )CallService(MS_CLIST_GETCONTACTDISPLAYNAME, wParam, GCDNF_TCHAR));
+ c2 = mir_tstrdup(pcli->pfnGetContactDisplayName(wParam, 0));
else if ( i2 == 2 )
c2 = DbGetEventTextT( &dbe, 0 );
diff --git a/plugins/wbOSD/src/main.cpp b/plugins/wbOSD/src/main.cpp index ee7e35b252..8c2658fbbf 100644 --- a/plugins/wbOSD/src/main.cpp +++ b/plugins/wbOSD/src/main.cpp @@ -14,6 +14,7 @@ HINSTANCE hI; HWND hwnd=0;
HANDLE hservosda;
int hLangpack = 0;
+CLIST_INTERFACE *pcli;
HANDLE hHookedNewEvent, hHookedInit, hProtoAck, hContactSettingChanged, hHookContactStatusChanged, hContactStatusChanged, hpluginShutDown;
void logmsg2(char *str);
@@ -45,6 +46,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD) extern "C" __declspec(dllexport) int Load()
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
logmsg("Load");
hHookedInit = HookEvent(ME_SYSTEM_MODULESLOADED, MainInit);
diff --git a/plugins/wbOSD/src/options.cpp b/plugins/wbOSD/src/options.cpp index 56a7791b45..b007e46f2f 100644 --- a/plugins/wbOSD/src/options.cpp +++ b/plugins/wbOSD/src/options.cpp @@ -23,7 +23,7 @@ void FillCheckBoxTree(HWND hwndTree,DWORD style) tvis.item.mask = TVIF_PARAM|TVIF_TEXT|TVIF_STATE;
for ( WORD status = ID_STATUS_OFFLINE; status <=ID_STATUS_OUTTOLUNCH; status++ ) {
tvis.item.lParam = status - ID_STATUS_OFFLINE;
- tvis.item.pszText = (TCHAR*) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION,(WPARAM) status,GSMDF_TCHAR);
+ tvis.item.pszText = pcli->pfnGetStatusModeDescription(status, 0);
tvis.item.stateMask = TVIS_STATEIMAGEMASK;
tvis.item.state = INDEXTOSTATEIMAGEMASK(( style & ( 1 << tvis.item.lParam )) != 0 ? 2 : 1 );
TreeView_InsertItem( hwndTree, &tvis );
|