summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/SimpleStatusMsg/src/awaymsg.cpp4
-rw-r--r--plugins/SimpleStatusMsg/src/main.cpp14
2 files changed, 6 insertions, 12 deletions
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp
index 9a470fda94..2b518913d1 100644
--- a/plugins/SimpleStatusMsg/src/awaymsg.cpp
+++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp
@@ -414,7 +414,7 @@ static int AwayMsgPreBuildMenu(WPARAM wParam, LPARAM lParam)
if (db_get_b(NULL, "SimpleStatusMsg", "ShowCopy", 1) && szMsg && *szMsg != '\0') {
clmi.flags = CMIM_FLAGS | CMIM_NAME | CMIF_TCHAR;
- mir_sntprintf(str, SIZEOF(str), TranslateT("Copy %s Message"), (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, iStatus, GSMDF_TCHAR));
+ mir_sntprintf(str, SIZEOF(str), TranslateT("Copy %s Message"), CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, iStatus, GSMDF_TCHAR));
clmi.ptszName = str;
}
}
@@ -424,7 +424,7 @@ static int AwayMsgPreBuildMenu(WPARAM wParam, LPARAM lParam)
if (!iHidden) {
if (db_get_b(NULL, "SimpleStatusMsg", "ShowGoToURL", 1) && StrFindURL(szMsg) != NULL) {
clmi.flags = CMIM_FLAGS | CMIM_NAME | CMIF_TCHAR;
- mir_sntprintf(str, SIZEOF(str), TranslateT("&Go to URL in %s Message"), (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, iStatus, GSMDF_TCHAR));
+ mir_sntprintf(str, SIZEOF(str), TranslateT("&Go to URL in %s Message"), CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, iStatus, GSMDF_TCHAR));
clmi.ptszName = str;
}
mir_free(szMsg);
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp
index 792367ff8c..caa4505ea2 100644
--- a/plugins/SimpleStatusMsg/src/main.cpp
+++ b/plugins/SimpleStatusMsg/src/main.cpp
@@ -388,12 +388,7 @@ TCHAR *InsertVarsIntoMsg(TCHAR *tszMsg, const char *szProto, int iStatus, HANDLE
{
if (ServiceExists(MS_VARS_FORMATSTRING) && db_get_b(NULL, "SimpleStatusMsg", "EnableVariables", 1))
{
- FORMATINFO fInfo = {0};
- fInfo.cbSize = sizeof(fInfo);
- fInfo.flags = FIF_TCHAR;
- fInfo.tszFormat = tszMsg;
- fInfo.hContact = hContact;
- TCHAR *tszVarsMsg = (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fInfo, 0);
+ TCHAR *tszVarsMsg = variables_parse(tszMsg, NULL, hContact);
if (tszVarsMsg != NULL)
{
TCHAR *format = InsertBuiltinVarsIntoMsg(tszVarsMsg, szProto, iStatus);
@@ -1907,14 +1902,14 @@ static int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
tr.flags = TRF_FREEMEM | TRF_FIELD | TRF_TCHAR | TRF_PARSEFUNC;
tr.tszTokenString = _T("winampsong");
tr.parseFunctionT = ParseWinampSong;
- tr.szHelpText = LPGEN("External Applications\tretrieves song name of the song currently playing in Winamp (Simple Status Message compatible)");
+ tr.szHelpText = LPGEN("External Applications")"\t"LPGEN("retrieves song name of the song currently playing in Winamp (Simple Status Message compatible)");
CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&tr);
if (db_get_b(NULL, "SimpleStatusMsg", "ExclDateToken", 0) != 0)
{
tr.tszTokenString = _T("date");
tr.parseFunctionT = ParseDate;
- tr.szHelpText = LPGEN("Miranda Related\tget the date (Simple Status Message compatible)");
+ tr.szHelpText = LPGEN("Miranda Related")"\t"LPGEN("get the date (Simple Status Message compatible)");
CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&tr);
}
}
@@ -1950,8 +1945,6 @@ static int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
}
else
{
- char szSetting[80];
-
g_uSetStatusTimer = (UINT_PTR*)mir_alloc(sizeof(UINT_PTR) * accounts->count);
for (int i = 0; i < accounts->count; ++i)
{
@@ -1961,6 +1954,7 @@ static int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) &~ CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0)))
continue;
+ char szSetting[80];
mir_snprintf(szSetting, SIZEOF(szSetting), "Set%sStatusDelay", accounts->pa[i]->szModuleName);
g_uSetStatusTimer[i] = SetTimer(NULL, 0, db_get_w(NULL, "SimpleStatusMsg", szSetting, 300), (TIMERPROC)SetStartupStatusProc);
}