summaryrefslogtreecommitdiff
path: root/protocols/Xfire/src/Xfire_game.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-28 21:45:37 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-28 21:45:37 +0000
commit30707c980d1560b358dbf2671a4d2a26a1e8173c (patch)
tree74aee5adaaac976e1398274ca64c5461a60f1feb /protocols/Xfire/src/Xfire_game.cpp
parent335ec43a4bfdcbbd0b2257037f1f3e0553d89076 (diff)
various menu initialization quirks
git-svn-id: http://svn.miranda-ng.org/main/trunk@2552 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Xfire/src/Xfire_game.cpp')
-rw-r--r--protocols/Xfire/src/Xfire_game.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/protocols/Xfire/src/Xfire_game.cpp b/protocols/Xfire/src/Xfire_game.cpp
index 835c8e6aa0..196584b580 100644
--- a/protocols/Xfire/src/Xfire_game.cpp
+++ b/protocols/Xfire/src/Xfire_game.cpp
@@ -431,19 +431,17 @@ void Xfire_game::writeToDB(unsigned dbid)
//erzeugt ein menüpunkt
void Xfire_game::createMenuitem(unsigned int pos,int dbid)
{
- CLISTMENUITEM mi = { 0 };
char servicefunction[100];
+ strcpy(servicefunction, protocolname);
+ strcat(servicefunction, "StartGame%d");
if(dbid<0)
dbid=pos;
- memset(&mi,0,sizeof(CLISTMENUITEM));
- strcpy(servicefunction, protocolname);
- strcat(servicefunction, "StartGame%d");
+ CLISTMENUITEM mi = { sizeof(mi) };
mi.popupPosition = 500084000;
mi.pszPopupName = Translate("Start game");
mi.pszContactOwner=protocolname;
- mi.cbSize = sizeof( mi );
sprintf(temp,servicefunction,this->id);
//wenn die servicefunktion schon exisitert vernichten, hehe
@@ -475,13 +473,12 @@ void Xfire_game::refreshMenuitem()
{
if(menuhandle!=NULL)
{
- CLISTMENUITEM clmi = { 0 };
- clmi.cbSize = sizeof( clmi );
- clmi.flags = CMIM_FLAGS;
+ CLISTMENUITEM mi = { sizeof(mi) };
+ mi.flags = CMIM_FLAGS;
if(this->notinstartmenu)
- clmi.flags|= CMIF_HIDDEN;
+ mi.flags|= CMIF_HIDDEN;
- CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )menuhandle, ( LPARAM )&clmi );
+ CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )menuhandle, ( LPARAM )&mi );
}
} \ No newline at end of file