diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-10 15:39:44 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-10 15:39:44 +0000 |
commit | 624a4190048b1205488f5973e121615c76171ae3 (patch) | |
tree | 5ecf810bc7bef4dda71a5791c2aa0fa2ffb29fa1 /plugins/TipperYM | |
parent | 45a5b1f9b7709f8d93b57abea7ba46b44eac5707 (diff) |
even less calls of MS_CLIST_GETSTATUSMODEDESCRIPTION
git-svn-id: http://svn.miranda-ng.org/main/trunk@6429 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TipperYM')
-rw-r--r-- | plugins/TipperYM/src/common.h | 1 | ||||
-rw-r--r-- | plugins/TipperYM/src/popwin.cpp | 4 | ||||
-rw-r--r-- | plugins/TipperYM/src/tipper.cpp | 7 | ||||
-rw-r--r-- | plugins/TipperYM/src/translations.cpp | 5 |
4 files changed, 9 insertions, 8 deletions
diff --git a/plugins/TipperYM/src/common.h b/plugins/TipperYM/src/common.h index 4e263bc11b..e3fc85c62b 100644 --- a/plugins/TipperYM/src/common.h +++ b/plugins/TipperYM/src/common.h @@ -50,6 +50,7 @@ Boston, MA 02111-1307, USA. #include <newpluginapi.h>
#include <m_avatars.h>
#include <m_awaymsg.h>
+#include <m_clistint.h>
#include <m_clc.h>
#include <m_clui.h>
#include <m_cluiframes.h>
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index 17574293d6..441db0effa 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -120,7 +120,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa }
}
- TCHAR *swzText = (TCHAR *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, wStatus, GSMDF_TCHAR);
+ TCHAR *swzText = pcli->pfnGetStatusModeDescription(wStatus, 0);
if (swzText)
AddRow(pwd, TranslateT("Status:"), swzText, NULL, false, false, false);
@@ -1563,7 +1563,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa }
if (dwItems & TRAYTIP_STATUS) {
- TCHAR *swzText = (TCHAR *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, wStatus, GSMDF_TCHAR);
+ TCHAR *swzText = pcli->pfnGetStatusModeDescription(wStatus, 0);
if (swzText)
AddRow(pwd, TranslateT("Status:"), swzText, NULL, false, false, false);
}
diff --git a/plugins/TipperYM/src/tipper.cpp b/plugins/TipperYM/src/tipper.cpp index 76a50680b1..c3161b17dc 100644 --- a/plugins/TipperYM/src/tipper.cpp +++ b/plugins/TipperYM/src/tipper.cpp @@ -37,6 +37,7 @@ HANDLE hReloadFonts = NULL; HANDLE hFolderChanged, hSkinFolder;
TCHAR SKIN_FOLDER[256];
+CLIST_INTERFACE *pcli = NULL;
FI_INTERFACE *fii = NULL;
TIME_API tmi;
int hLangpack;
@@ -59,7 +60,7 @@ PLUGININFOEX pluginInfoEx = bool WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
hInst = hinstDLL;
- return TRUE;
+ return TRUE;
}
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
@@ -92,7 +93,6 @@ int ReloadFont(WPARAM wParam, LPARAM lParam) return 0;
}
-
// hack to hide tip when clist hides from timeout
int SettingChanged(WPARAM wParam, LPARAM lParam)
{
@@ -304,8 +304,9 @@ HANDLE hEventPreShutdown, hEventModulesLoaded; extern "C" int __declspec(dllexport) Load(void)
{
CallService(MS_IMG_GETINTERFACE, FI_IF_VERSION, (LPARAM)&fii);
- mir_getTMI(&tmi);
mir_getLP(&pluginInfoEx);
+ mir_getCLI();
+ mir_getTMI(&tmi);
if (ServiceExists(MS_LANGPACK_GETCODEPAGE))
iCodePage = CallService(MS_LANGPACK_GETCODEPAGE, 0, 0);
diff --git a/plugins/TipperYM/src/translations.cpp b/plugins/TipperYM/src/translations.cpp index 39b32434a5..c037fe8035 100644 --- a/plugins/TipperYM/src/translations.cpp +++ b/plugins/TipperYM/src/translations.cpp @@ -159,9 +159,8 @@ TCHAR *SecondsToTimeDifference(HANDLE hContact, const char *szModuleName, const TCHAR *WordToStatusDesc(HANDLE hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
WORD wStatus = db_get_w(hContact, szModuleName, szSettingName, ID_STATUS_OFFLINE);
- TCHAR *szStatus = (TCHAR *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)wStatus, GSMDF_TCHAR);
- _tcsncpy(buff,szStatus, bufflen);
- buff[bufflen - 1] = 0;
+ TCHAR *szStatus = pcli->pfnGetStatusModeDescription(wStatus, 0);
+ _tcsncpy_s(buff, bufflen, szStatus, _TRUNCATE);
return buff;
}
|