diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-28 21:45:37 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-28 21:45:37 +0000 |
commit | 30707c980d1560b358dbf2671a4d2a26a1e8173c (patch) | |
tree | 74aee5adaaac976e1398274ca64c5461a60f1feb /protocols/Xfire | |
parent | 335ec43a4bfdcbbd0b2257037f1f3e0553d89076 (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')
-rw-r--r-- | protocols/Xfire/src/Xfire_game.cpp | 17 | ||||
-rw-r--r-- | protocols/Xfire/src/Xfire_gamelist.cpp | 18 | ||||
-rw-r--r-- | protocols/Xfire/src/main.cpp | 5 | ||||
-rw-r--r-- | protocols/Xfire/src/searching4games.cpp | 1 |
4 files changed, 17 insertions, 24 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 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;
|