From 18b4c46a69a390bdf78424c6a231c4673fbd8096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Fri, 21 Jun 2013 08:57:57 +0000 Subject: Xfire: Make "Away from keyboard" string translatable. git-svn-id: http://svn.miranda-ng.org/main/trunk@5075 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Xfire/src/main.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'protocols/Xfire/src') diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp index bd0a3bf4ed..53be6dbcfe 100644 --- a/protocols/Xfire/src/main.cpp +++ b/protocols/Xfire/src/main.cpp @@ -1089,7 +1089,7 @@ extern "C" __declspec(dllexport) int Load(void) //statusmessages setzen strcpy(statusmessage[0],""); - strcpy(statusmessage[1],"(AFK) Away from Keyboard"); + mir_snprintf(statusmessage[1], SIZEOF(statusmessage[1]), "(AFK) %s", Translate("Away from Keyboard")); char servicefunction[100]; @@ -1661,7 +1661,7 @@ INT_PTR SetStatus(WPARAM wParam,LPARAM lParam) { //setze bei aktivem nocustomaway die alte awaystatusmsg zurück, bugfix if(db_get_b(NULL,protocolname,"nocustomaway",0)) - strcpy_s(statusmessage[1],1024,"(AFK) Away from Keyboard"); + mir_snprintf(statusmessage[1], SIZEOF(statusmessage[1]), "(AFK) %s", Translate("Away from Keyboard")); myClient->Status(statusmessage[1]); } @@ -3323,9 +3323,9 @@ INT_PTR SetAwayMsg(WPARAM wParam, LPARAM lParam) { { strcpy(statusmessage[0],""); } - else if((wParam!=ID_STATUS_ONLINE&&wParam!=ID_STATUS_OFFLINE)/*&&db_get_b(NULL,protocolname,"nocustomaway",0)==0*/) + else if(wParam!=ID_STATUS_OFFLINE/*&&db_get_b(NULL,protocolname,"nocustomaway",0)==0*/) { - strcpy(statusmessage[1],"(AFK) Away from Keyboard"); + mir_snprintf(statusmessage[1], SIZEOF(statusmessage[1]), "(AFK) %s", Translate("Away from Keyboard")); } } else @@ -3334,14 +3334,12 @@ INT_PTR SetAwayMsg(WPARAM wParam, LPARAM lParam) { { strcpy(statusmessage[0],( char* )lParam); } - else if((wParam!=ID_STATUS_ONLINE&&wParam!=ID_STATUS_OFFLINE)&&db_get_b(NULL,protocolname,"nocustomaway",0)==0&&strlen(( char* )lParam)>0) - { - sprintf(statusmessage[1], "(AFK) %s", (char*)lParam); - //strcpy(statusmessage[1],( char* )lParam); - } - else if(wParam!=ID_STATUS_ONLINE&&wParam!=ID_STATUS_OFFLINE) - { - strcpy(statusmessage[1],"(AFK) Away from Keyboard"); + else if (wParam != ID_STATUS_OFFLINE) { + if (db_get_b(NULL,protocolname,"nocustomaway",0)==0&&strlen(( char* )lParam)>0) { + mir_snprintf(statusmessage[1], SIZEOF(statusmessage[1]), "(AFK) %s", (char*)lParam); + //strcpy(statusmessage[1],( char* )lParam); + } else + mir_snprintf(statusmessage[1], SIZEOF(statusmessage[1]), "(AFK) %s", Translate("Away from Keyboard")); } } -- cgit v1.2.3