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 +++++++---------- protocols/Xfire/src/Xfire_gamelist.cpp | 18 ++++++++---------- protocols/Xfire/src/main.cpp | 5 ++--- protocols/Xfire/src/searching4games.cpp | 1 - 4 files changed, 17 insertions(+), 24 deletions(-) (limited to 'protocols/Xfire/src') 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 diff --git a/protocols/Xfire/src/Xfire_gamelist.cpp b/protocols/Xfire/src/Xfire_gamelist.cpp index 3496a2e3f1..c4fb12ee20 100644 --- a/protocols/Xfire/src/Xfire_gamelist.cpp +++ b/protocols/Xfire/src/Xfire_gamelist.cpp @@ -246,16 +246,14 @@ void Xfire_gamelist::clearGamelist() { //erstellt ein dummyeintrag void Xfire_gamelist::createDummyMenuItem() { - CLISTMENUITEM midummy = { 0 }; - midummy.cbSize = sizeof( midummy ); - midummy.position = 500090001; - midummy.pszName = Translate("Please wait ..."); - //midummy.flags = CMIF_GRAYED; geht nicht bei 0.8.1 - midummy.hIcon = LoadIcon(hinstance,MAKEINTRESOURCE(ID_OP)); - midummy.popupPosition = 500084000; - midummy.pszPopupName = Translate("Start game"); - midummy.pszContactOwner=protocolname; - dummymenuitem=Menu_AddMainMenuItem(&midummy); + CLISTMENUITEM mi = { sizeof(mi) }; + mi.position = 500090001; + mi.pszName = Translate("Please wait ..."); + mi.hIcon = LoadIcon(hinstance,MAKEINTRESOURCE(ID_OP)); + mi.popupPosition = 500084000; + mi.pszPopupName = Translate("Start game"); + mi.pszContactOwner=protocolname; + dummymenuitem = Menu_AddMainMenuItem(&mi); } //entfernt dummymenueintrag diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp index 9b6af47d47..2add029050 100644 --- a/protocols/Xfire/src/main.cpp +++ b/protocols/Xfire/src/main.cpp @@ -1215,9 +1215,7 @@ extern "C" __declspec(dllexport) int Load(void) CreateDirectory(AvatarsFolder,NULL); //erweiterte Kontextmenüpunkte - CLISTMENUITEM mi = { 0 }; - memset(&mi,0,sizeof(CLISTMENUITEM)); - mi.cbSize = sizeof( mi ); + CLISTMENUITEM mi = { sizeof(mi) }; mi.pszPopupName = protocolname; //gotoprofilemenüpunkt @@ -2256,6 +2254,7 @@ static INT_PTR GotoProfileAct(WPARAM wParam,LPARAM lParam) int RebuildContactMenu( WPARAM wParam, LPARAM lParam ) { + // !!!!!!!! check it later CLISTMENUITEM clmi = { 0 }; clmi.cbSize = sizeof( clmi ); CLISTMENUITEM clmi2 = { 0 }; diff --git a/protocols/Xfire/src/searching4games.cpp b/protocols/Xfire/src/searching4games.cpp index 8e9517a036..e7d1137c30 100644 --- a/protocols/Xfire/src/searching4games.cpp +++ b/protocols/Xfire/src/searching4games.cpp @@ -149,7 +149,6 @@ void Scan4Games( LPVOID lparam ) BOOL multiexe=FALSE; BOOL somethingfound=TRUE; int i3=0; - CLISTMENUITEM mi = { 0 }; DWORD gpps=1; DWORD last_gpps=0; static BOOL searching=FALSE; -- cgit v1.2.3