diff options
Diffstat (limited to 'protocols/Xfire')
-rw-r--r-- | protocols/Xfire/src/Xfire_game.cpp | 5 | ||||
-rw-r--r-- | protocols/Xfire/src/Xfire_gamelist.cpp | 5 | ||||
-rw-r--r-- | protocols/Xfire/src/main.cpp | 107 |
3 files changed, 53 insertions, 64 deletions
diff --git a/protocols/Xfire/src/Xfire_game.cpp b/protocols/Xfire/src/Xfire_game.cpp index 8abedcb60c..6bc8091fd7 100644 --- a/protocols/Xfire/src/Xfire_game.cpp +++ b/protocols/Xfire/src/Xfire_game.cpp @@ -438,7 +438,6 @@ void Xfire_game::createMenuitem(unsigned int pos, int dbid) CLISTMENUITEM mi = { 0 };
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENW("Start game"), 500084000);
- mi.pszContactOwner = protocolname;
mir_snprintf(temp, _countof(temp), servicefunction, this->id);
//wenn die servicefunktion schon exisitert vernichten, hehe
@@ -447,8 +446,8 @@ void Xfire_game::createMenuitem(unsigned int pos, int dbid) CreateServiceFunctionParam(temp, StartGame, this->id);
mi.pszService = temp;
mi.position = 500090002 + pos;
- mi.hIcon = this->hicon ? this->hicon : LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.pszName = menuitemtext(this->name);
+ mi.icolibItem = this->hicon ? this->hicon : LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.a = menuitemtext(this->name);
this->menuhandle = Menu_AddMainMenuItem(&mi);
//menu aktualisieren ob hidden
diff --git a/protocols/Xfire/src/Xfire_gamelist.cpp b/protocols/Xfire/src/Xfire_gamelist.cpp index 344289044a..f62989fec3 100644 --- a/protocols/Xfire/src/Xfire_gamelist.cpp +++ b/protocols/Xfire/src/Xfire_gamelist.cpp @@ -244,9 +244,8 @@ void Xfire_gamelist::createDummyMenuItem() CLISTMENUITEM mi = { 0 };
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENW("Start game"), 500084000);
mi.position = 500090001;
- mi.pszName = Translate("Please wait...");
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.pszContactOwner = protocolname;
+ mi.name.a = Translate("Please wait...");
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
dummymenuitem = Menu_AddMainMenuItem(&mi);
}
diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp index ab06f85b5c..6c4c93412f 100644 --- a/protocols/Xfire/src/main.cpp +++ b/protocols/Xfire/src/main.cpp @@ -1120,104 +1120,95 @@ extern "C" __declspec(dllexport) int Load(void) char servicefunction[100];
// gotoprofilemenüpunkt
- mir_strcpy(servicefunction, protocolname);
- mir_strcat(servicefunction, "GotoProfile");
- CreateServiceFunction(servicefunction, GotoProfile);
- mi.pszService = servicefunction;
+ CreateProtoServiceFunction(protocolname, "/GotoProfile", GotoProfile);
+ mi.pszService = "/GotoProfile";
mi.position = 500090000;
- mi.pszContactOwner = protocolname;
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("&XFire Online Profile");
- Menu_AddContactMenuItem(&mi);
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.t = LPGENT("&XFire Online Profile");
+ Menu_AddContactMenuItem(&mi, protocolname);
// gotoxfireclansitemenüpunkt
- mir_strcpy(servicefunction, protocolname);
- mir_strcat(servicefunction, "GotoXFireClanSite");
- CreateServiceFunction(servicefunction, GotoXFireClanSite);
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("XFire &Clan Site");
- gotoclansite = Menu_AddContactMenuItem(&mi);
+ CreateProtoServiceFunction(protocolname, "/GotoXFireClanSite", GotoXFireClanSite);
+ mi.pszService = "/GotoXFireClanSite";
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.t = LPGENT("XFire &Clan Site");
+ gotoclansite = Menu_AddContactMenuItem(&mi, protocolname);
// kopiermenüpunkt
- mir_strcpy(servicefunction, protocolname);
- mir_strcat(servicefunction, "GetIPPort");
- CreateServiceFunction(servicefunction, GetIPPort);
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("C&opy Server Address and Port");
- copyipport = Menu_AddContactMenuItem(&mi);
+ CreateProtoServiceFunction(protocolname, "/GetIPPort", GetIPPort);
+ mi.pszService = "/GetIPPort";
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.t = LPGENT("C&opy Server Address and Port");
+ copyipport = Menu_AddContactMenuItem(&mi, protocolname);
// kopiermenüpunkt
- mir_strcpy(servicefunction, protocolname);
- mir_strcat(servicefunction, "VoiceIPPort");
- CreateServiceFunction(servicefunction, GetVIPPort);
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("Cop&y Voice Server Address and Port");
- vipport = Menu_AddContactMenuItem(&mi);
+ CreateProtoServiceFunction(protocolname, "/VoiceIPPort", GetVIPPort);
+ mi.pszService = "/VoiceIPPort";
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.t = LPGENT("Cop&y Voice Server Address and Port");
+ vipport = Menu_AddContactMenuItem(&mi, protocolname);
// joinmenüpunkt
- mir_strcpy(servicefunction, protocolname);
- mir_strcat(servicefunction, "JoinGame");
- CreateServiceFunction(servicefunction, JoinGame);
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("Join &Game...");
- joingame = Menu_AddContactMenuItem(&mi);
+ CreateProtoServiceFunction(protocolname, "/JoinGame", JoinGame);
+ mi.pszService = "/JoinGame";
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.t = LPGENT("Join &Game...");
+ joingame = Menu_AddContactMenuItem(&mi, protocolname);
// playmenüpunkt
- mir_strcpy(servicefunction, protocolname);
- mir_strcat(servicefunction, "StartThisGame");
- CreateServiceFunction(servicefunction, StartThisGame);
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("Play this game...");
- startthisgame = Menu_AddContactMenuItem(&mi);
+ CreateProtoServiceFunction(protocolname, "/StartThisGame", StartThisGame);
+ mi.pszService = "/StartThisGame";
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.t = LPGENT("Play this game...");
+ startthisgame = Menu_AddContactMenuItem(&mi, protocolname);
// remove friend
- mir_strcpy(servicefunction, protocolname);
- mir_strcat(servicefunction, "RemoveFriend");
- CreateServiceFunction(servicefunction, RemoveFriend);
+ CreateProtoServiceFunction(protocolname, "/RemoveFriend", RemoveFriend);
+ mi.pszService = "/RemoveFriend";
mi.position = 2000070000;
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("Remove F&riend...");
- removefriend = Menu_AddContactMenuItem(&mi);
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.t = LPGENT("Remove F&riend...");
+ removefriend = Menu_AddContactMenuItem(&mi, protocolname);
// block user
- mir_strcpy(servicefunction, protocolname);
- mir_strcat(servicefunction, "BlockFriend");
- CreateServiceFunction(servicefunction, BlockFriend);
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("Block U&ser...");
- blockfriend = Menu_AddContactMenuItem(&mi);
+ CreateProtoServiceFunction(protocolname, "/BlockFriend", BlockFriend);
+ mi.pszService = "/BlockFriend";
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.t = LPGENT("Block U&ser...");
+ blockfriend = Menu_AddContactMenuItem(&mi, protocolname);
+ // main menu items
// my fire profile
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, _T(protocolname), 500090000);
mir_strcpy(servicefunction, protocolname);
mir_strcat(servicefunction, "GotoProfile2");
CreateServiceFunction(servicefunction, GotoProfile2);
mi.position = 500090000;
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("&My XFire Online Profile");
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.t = LPGENT("&My XFire Online Profile");
Menu_AddMainMenuItem(&mi);
// my activity protocol
mir_strcpy(servicefunction, protocolname);
mir_strcat(servicefunction, "GotoProfileAct");
CreateServiceFunction(servicefunction, GotoProfileAct);
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("&Activity Report");
+ 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");
CreateServiceFunction(servicefunction, ReScanMyGames);
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("&Rescan my games...");
+ 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");
CreateServiceFunction(servicefunction, SetNickDlg);
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("Set &Nickname");
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.t = LPGENT("Set &Nickname");
Menu_AddMainMenuItem(&mi);
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, RebuildContactMenu);
|