diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-29 20:10:40 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-29 20:10:40 +0000 |
commit | 916c8dea1e49bbfcf7503fc83db63ddc94648f9b (patch) | |
tree | 04b54b1ba8f482121d689cead7da679f444e4b1c /plugins | |
parent | 28b5f3536672bdfa6b3ed76a8483424453108b7a (diff) |
ownerData isolated inside TMO_IntMenuItem not to allow external structures to play with it
git-svn-id: http://svn.miranda-ng.org/main/trunk@14443 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp | 6 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clisttray.cpp | 3 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp | 7 | ||||
-rw-r--r-- | plugins/MirOTR/src/mirotrmenu.cpp | 3 |
4 files changed, 7 insertions, 12 deletions
diff --git a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp index 3bc84b1bcc..5e6a01de74 100644 --- a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp +++ b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp @@ -75,9 +75,8 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam, LPARAM lParam) mmep->Param1 = gmp->wParam;
mmep->Param2 = gmp->lParam;
}
- pmi->ownerdata = mmep;
- HGENMENU hNewItem = Menu_AddItem(hGroupMenuObject, pmi);
+ HGENMENU hNewItem = Menu_AddItem(hGroupMenuObject, pmi, mmep);
char buf[1024];
mir_snprintf(buf, "%s/%s", pmi->pszService, pmi->name.a);
@@ -370,9 +369,8 @@ static INT_PTR AddSubGroupMenuItem(WPARAM wParam, LPARAM lParam) mmep->Param1 = gmp->wParam;
mmep->Param2 = gmp->lParam;
}
- pmi->ownerdata = mmep;
- HGENMENU hNewItem = Menu_AddItem(hSubGroupMenuObject, pmi);
+ HGENMENU hNewItem = Menu_AddItem(hSubGroupMenuObject, pmi, mmep);
char buf[1024];
mir_snprintf(buf, "%s/%s", pmi->pszService, pmi->name.a);
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp index 7e2fcf48e5..583dec0ed8 100644 --- a/plugins/Clist_modern/src/modern_clisttray.cpp +++ b/plugins/Clist_modern/src/modern_clisttray.cpp @@ -171,9 +171,8 @@ static INT_PTR BuildTrayMenu(WPARAM, LPARAM) static INT_PTR AddTrayMenuItem(WPARAM, LPARAM lParam)
{
TMO_MenuItem *pmi = (TMO_MenuItem*)lParam;
- pmi->ownerdata = mir_strdup(pmi->pszService);
- HGENMENU hNewItem = Menu_AddItem(hTrayMenuObject, pmi);
+ HGENMENU hNewItem = Menu_AddItem(hTrayMenuObject, pmi, mir_strdup(pmi->pszService));
Menu_ConfigureItem(hNewItem, MCI_OPT_UNIQUENAME, pmi->pszService);
return (INT_PTR)hNewItem;
}
diff --git a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp index 54e104243c..93dba7710d 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp @@ -76,9 +76,8 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam, LPARAM lParam) mmep->Param1 = gmp->wParam;
mmep->Param2 = gmp->lParam;
}
- pmi->ownerdata = mmep;
- HGENMENU hNewItem = Menu_AddItem(hGroupMenuObject, pmi);
+ HGENMENU hNewItem = Menu_AddItem(hGroupMenuObject, pmi, mmep);
char buf[1024];
mir_snprintf(buf, "%s/%s", pmi->pszService, pmi->name.a);
@@ -356,8 +355,8 @@ static INT_PTR AddSubGroupMenuItem(WPARAM wParam, LPARAM lParam) mmep->Param1 = gmp->wParam;
mmep->Param2 = gmp->lParam;
}
- pmi->ownerdata = mmep;
- HGENMENU hNewItem = Menu_AddItem(hSubGroupMenuObject, pmi);
+
+ HGENMENU hNewItem = Menu_AddItem(hSubGroupMenuObject, pmi, mmep);
char buf[1024];
mir_snprintf(buf, "%s/%s", pmi->pszService, pmi->name.a);
diff --git a/plugins/MirOTR/src/mirotrmenu.cpp b/plugins/MirOTR/src/mirotrmenu.cpp index e946b25199..60c8747b35 100644 --- a/plugins/MirOTR/src/mirotrmenu.cpp +++ b/plugins/MirOTR/src/mirotrmenu.cpp @@ -21,8 +21,7 @@ static HGENMENU AddMirOTRMenuItem(TMO_MenuItem *pmi, const char *pszService) // add owner data lpMirOTRMenuExecParam cmep = ( lpMirOTRMenuExecParam )mir_calloc(sizeof(MirOTRMenuExecParam)); cmep->szServiceName = mir_strdup(pszService); - pmi->ownerdata = cmep; - return Menu_AddItem(hMirOTRMenuObject, pmi); + return Menu_AddItem(hMirOTRMenuObject, pmi, cmep); } //called with: |