From 5bd49f38edd0b890a832bdf40dd0b7fdaf82b144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Mon, 20 Jan 2014 13:19:01 +0000 Subject: XFire: use constant for plugin title git-svn-id: http://svn.miranda-ng.org/main/trunk@7784 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Xfire/src/baseProtocol.h | 1 + protocols/Xfire/src/iniupdater.cpp | 2 +- protocols/Xfire/src/main.cpp | 16 +++++++--------- protocols/Xfire/src/tools.cpp | 8 ++++---- 4 files changed, 13 insertions(+), 14 deletions(-) (limited to 'protocols/Xfire/src') diff --git a/protocols/Xfire/src/baseProtocol.h b/protocols/Xfire/src/baseProtocol.h index 53c59be983..5a19d38db6 100644 --- a/protocols/Xfire/src/baseProtocol.h +++ b/protocols/Xfire/src/baseProtocol.h @@ -86,6 +86,7 @@ // Definitions //======================================================= #define protocolname "XFire" //no spaces here :) +#define PLUGIN_TITLE "XFire Protocol" //======================================================= // Defines diff --git a/protocols/Xfire/src/iniupdater.cpp b/protocols/Xfire/src/iniupdater.cpp index fe47bfc4a7..8a91df0ccc 100644 --- a/protocols/Xfire/src/iniupdater.cpp +++ b/protocols/Xfire/src/iniupdater.cpp @@ -105,7 +105,7 @@ void UpdateMyIcons(LPVOID dummy) { if (CheckWWWContent(request)) { - if (db_get_b(NULL,protocolname,"dontaskforupdate",0)==1||MessageBox(NULL,TranslateT("There is a new Icons.dll online, do you want to update now?"),TranslateT("Miranda XFire Protocol Plugin"),MB_YESNO|MB_ICONQUESTION)==IDYES) + if (db_get_b(NULL,protocolname,"dontaskforupdate",0)==1||MessageBox(NULL,TranslateT("There is a new Icons.dll online, do you want to update now?"),TranslateT(PLUGIN_TITLE),MB_YESNO|MB_ICONQUESTION)==IDYES) { if (GetWWWContent2(request,file,FALSE)) { //altes backup löschen diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp index e57c2c91ba..eb0d025c90 100644 --- a/protocols/Xfire/src/main.cpp +++ b/protocols/Xfire/src/main.cpp @@ -857,7 +857,7 @@ INT_PTR UrlCall(WPARAM wparam,LPARAM lparam) { mir_snprintf(temp, SIZEOF(temp), Translate("Do you really want to add %s to your friend list?"),g); //Nutzer vorher fragen, ob er wirklich user xyz adden möchte - if (MessageBoxA(NULL,temp,Translate("Miranda XFire Protocol Plugin"),MB_YESNO|MB_ICONQUESTION)==IDYES) + if (MessageBoxA(NULL, temp, Translate(PLUGIN_TITLE), MB_YESNO | MB_ICONQUESTION) == IDYES) { if (myClient!=NULL) { @@ -1045,7 +1045,7 @@ extern "C" __declspec(dllexport) int Load(void) db_set_b(NULL,protocolname,"xfiresitegameico",1); db_set_b(NULL,protocolname,"recprotoverchg",1); - if (MessageBox(NULL,TranslateT("It seems that is the first time you use this plugin. Do you want to automatically download the latest available xfire_games.ini and icons.dll?\r\nWithout the xfire_games.ini Xfire can't detect any games on your computer."),TranslateT("Miranda XFire Protocol Plugin"),MB_YESNO|MB_ICONQUESTION)==IDYES) + if (MessageBox(NULL, TranslateT("It seems that is the first time you use this plugin. Do you want to automatically download the latest available xfire_games.ini and icons.dll?\r\nWithout the xfire_games.ini Xfire can't detect any games on your computer."), TranslateT(PLUGIN_TITLE), MB_YESNO | MB_ICONQUESTION) == IDYES) { db_set_b(NULL,protocolname,"autoiniupdate",1); db_set_b(NULL,protocolname,"autoicodllupdate",1); @@ -1268,7 +1268,7 @@ extern "C" __declspec(dllexport) int Load(void) if (db_get_b(NULL,protocolname,"ipportdetec",0)) { - //MessageBoxA(0,"GetExtendedUdpTable not found. ServerIP/Port detection feature will be disabled.","Miranda XFire Protocol Plugin",MB_OK|MB_ICONINFORMATION); + //MessageBoxA(0,"GetExtendedUdpTable not found. ServerIP/Port detection feature will be disabled.",PLUGIN_TITLE,MB_OK|MB_ICONINFORMATION); db_set_b(NULL,protocolname,"ipportdetec",0); XFireLog("Wasn't able to get GetExtendedUdpTable function"); } @@ -2639,10 +2639,8 @@ void setBuddyStatusMsg(BuddyListEntry *entry) db_unset(entry->hcontact, protocolname, "XStatusMsg"); } - /*//statusmsg umwandeln - char *statusmsg = mir_utf8decode((char*)entry->statusmsg.c_str(),NULL); - if (statusmsg == NULL) - statusmsg = (char*)entry->statusmsg.c_str();*/ + //statusmsg umwandeln + entry->statusmsg = ptrA(mir_utf8decode((char*)entry->statusmsg.c_str(), NULL)); string afk = entry->statusmsg.substr(0, 5); int status_id = (afk == "(AFK)" || afk == "(ABS)") ? ID_STATUS_AWAY : ID_STATUS_ONLINE; @@ -2850,7 +2848,7 @@ HANDLE handlingBuddys(BuddyListEntry *entry, int clan,char*group,BOOL dontscan) //größe des popupstrings int size=strlen(temp)+1; //popup darstellen - displayPopup(NULL,temp,"Miranda XFire Protocol Plugin",0,hicongame); + displayPopup(NULL, temp, PLUGIN_TITLE, 0, hicongame); //letzten popup definieren entry->lastpopup=new char[size]; //string kopieren @@ -2866,7 +2864,7 @@ HANDLE handlingBuddys(BuddyListEntry *entry, int clan,char*group,BOOL dontscan) //größe des popupstrings int size=strlen(temp)+1; //popup darstellen - displayPopup(NULL,temp,"Miranda XFire Protocol Plugin",0,hicongame); + displayPopup(NULL, temp, PLUGIN_TITLE, 0, hicongame); //letzten popup definieren entry->lastpopup=new char[size]; //string kopieren diff --git a/protocols/Xfire/src/tools.cpp b/protocols/Xfire/src/tools.cpp index 1d0cd55127..a778c09ecf 100644 --- a/protocols/Xfire/src/tools.cpp +++ b/protocols/Xfire/src/tools.cpp @@ -162,7 +162,7 @@ void Message(LPVOID msg) case 1: return; case 2: - displayPopup(NULL,(LPCSTR)msg,"Miranda XFire Protocol Plugin",MB_OK); + displayPopup(NULL, (LPCSTR)msg, PLUGIN_TITLE, MB_OK); return; } @@ -171,14 +171,14 @@ void Message(LPVOID msg) mbp.hwndOwner=NULL; mbp.hInstance=hinstance; mbp.lpszText=(char*)msg; - mbp.lpszCaption="Miranda XFire Protocol Plugin"; + mbp.lpszCaption = PLUGIN_TITLE; mbp.dwStyle=MB_USERICON; mbp.lpszIcon=MAKEINTRESOURCEA(IDI_TM); mbp.dwContextHelpId=NULL; mbp.lpfnMsgBoxCallback=NULL; mbp.dwLanguageId=LANG_ENGLISH; MessageBoxIndirectA(&mbp); - //MessageBoxA(0,(char*)msg,"Miranda XFire Protocol Plugin",MB_OK|MB_ICONINFORMATION); + //MessageBoxA(0,(char*)msg,PLUGIN_TITLE,MB_OK|MB_ICONINFORMATION); } void MessageE(LPVOID msg) @@ -195,7 +195,7 @@ void MessageE(LPVOID msg) } break; case 2: - displayPopup(NULL,(LPCSTR)msg,"Miranda XFire Protocol Plugin",MB_OK|MB_ICONSTOP); + displayPopup(NULL, (LPCSTR)msg, PLUGIN_TITLE, MB_OK | MB_ICONSTOP); break; } } -- cgit v1.2.3