From 30707c980d1560b358dbf2671a4d2a26a1e8173c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 28 Nov 2012 21:45:37 +0000 Subject: various menu initialization quirks git-svn-id: http://svn.miranda-ng.org/main/trunk@2552 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Xfire/src/Xfire_game.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'protocols/Xfire/src/Xfire_game.cpp') 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 -- cgit v1.2.3