diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-28 12:45:04 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-28 12:45:04 +0000 |
commit | 4f067273c1d093da8480ea9f511b1ce41071efe2 (patch) | |
tree | ff55e2eafac037ce7f7e06b35af56d4bb7f52fff /protocols/Xfire | |
parent | 3fa621ffde27485da36638442224b37ade3ee8f3 (diff) |
fix for an empty menu in contact's root
git-svn-id: http://svn.miranda-ng.org/main/trunk@14424 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Xfire')
-rw-r--r-- | protocols/Xfire/src/Xfire_game.cpp | 2 | ||||
-rw-r--r-- | protocols/Xfire/src/Xfire_gamelist.cpp | 2 | ||||
-rw-r--r-- | protocols/Xfire/src/main.cpp | 21 |
3 files changed, 13 insertions, 12 deletions
diff --git a/protocols/Xfire/src/Xfire_game.cpp b/protocols/Xfire/src/Xfire_game.cpp index 6bc8091fd7..44feae968d 100644 --- a/protocols/Xfire/src/Xfire_game.cpp +++ b/protocols/Xfire/src/Xfire_game.cpp @@ -437,7 +437,7 @@ void Xfire_game::createMenuitem(unsigned int pos, int dbid) dbid = pos;
CLISTMENUITEM mi = { 0 };
- mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENW("Start game"), 500084000);
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Start game"), 500084000);
mir_snprintf(temp, _countof(temp), servicefunction, this->id);
//wenn die servicefunktion schon exisitert vernichten, hehe
diff --git a/protocols/Xfire/src/Xfire_gamelist.cpp b/protocols/Xfire/src/Xfire_gamelist.cpp index f62989fec3..052f2fd624 100644 --- a/protocols/Xfire/src/Xfire_gamelist.cpp +++ b/protocols/Xfire/src/Xfire_gamelist.cpp @@ -242,7 +242,7 @@ void Xfire_gamelist::clearGamelist() { void Xfire_gamelist::createDummyMenuItem()
{
CLISTMENUITEM mi = { 0 };
- mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENW("Start game"), 500084000);
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Start game"), 500084000);
mi.position = 500090001;
mi.name.a = Translate("Please wait...");
mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp index 6c4c93412f..3be2481fef 100644 --- a/protocols/Xfire/src/main.cpp +++ b/protocols/Xfire/src/main.cpp @@ -1114,7 +1114,9 @@ extern "C" __declspec(dllexport) int Load(void) // erweiterte Kontextmenüpunkte
CLISTMENUITEM mi = { 0 };
- mi.hParentMenu = Menu_CreateRoot(MO_CONTACT, _T(protocolname), 500090000);
+ mi.position = 500090000;
+ mi.name.a = protocolname;
+ mi.hParentMenu = Menu_AddContactMenuItem(&mi, protocolname);
mi.flags = CMIF_TCHAR;
char servicefunction[100];
@@ -1122,7 +1124,6 @@ extern "C" __declspec(dllexport) int Load(void) // gotoprofilemenüpunkt
CreateProtoServiceFunction(protocolname, "/GotoProfile", GotoProfile);
mi.pszService = "/GotoProfile";
- mi.position = 500090000;
mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
mi.name.t = LPGENT("&XFire Online Profile");
Menu_AddContactMenuItem(&mi, protocolname);
@@ -1180,8 +1181,8 @@ extern "C" __declspec(dllexport) int Load(void) // main menu items
// my fire profile
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, _T(protocolname), 500090000);
- mir_strcpy(servicefunction, protocolname);
- mir_strcat(servicefunction, "GotoProfile2");
+ strncpy_s(servicefunction, protocolname, _TRUNCATE);
+ strncat_s(servicefunction, "GotoProfile2", _TRUNCATE);
CreateServiceFunction(servicefunction, GotoProfile2);
mi.position = 500090000;
mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
@@ -1189,23 +1190,23 @@ extern "C" __declspec(dllexport) int Load(void) Menu_AddMainMenuItem(&mi);
// my activity protocol
- mir_strcpy(servicefunction, protocolname);
- mir_strcat(servicefunction, "GotoProfileAct");
+ strncpy_s(servicefunction, protocolname, _TRUNCATE);
+ strncat_s(servicefunction, "GotoProfileAct", _TRUNCATE);
CreateServiceFunction(servicefunction, GotoProfileAct);
mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
mi.name.t = LPGENT("&Activity Report");
Menu_AddMainMenuItem(&mi);
//rescan my games
- mir_strcpy(servicefunction, protocolname);
- mir_strcat(servicefunction, "ReScanMyGames");
+ strncpy_s(servicefunction, protocolname, _TRUNCATE);
+ strncat_s(servicefunction, "ReScanMyGames", _TRUNCATE);
CreateServiceFunction(servicefunction, ReScanMyGames);
mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
mi.name.t = LPGENT("&Rescan my games...");
Menu_AddMainMenuItem(&mi);
- mir_strcpy(servicefunction, protocolname);
- mir_strcat(servicefunction, "SetNick");
+ strncpy_s(servicefunction, protocolname, _TRUNCATE);
+ strncat_s(servicefunction, "SetNick", _TRUNCATE);
CreateServiceFunction(servicefunction, SetNickDlg);
mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
mi.name.t = LPGENT("Set &Nickname");
|