summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-27 07:51:46 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-27 07:51:46 +0000
commit9d65ee38c92c7a0656ddc6c4c26017b7226fc44b (patch)
treea0aee0dc8d0f850939b68c5777d07ed9951cf655 /src/mir_app
parent1d2358d43cfcfed5df1f1f4a7d2d211d8d71c286 (diff)
finally frame menu appeared
git-svn-id: http://svn.miranda-ng.org/main/trunk@14408 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/framesmenu.cpp15
-rw-r--r--src/mir_app/src/genmenu.cpp2
2 files changed, 4 insertions, 13 deletions
diff --git a/src/mir_app/src/framesmenu.cpp b/src/mir_app/src/framesmenu.cpp
index 20c89ce1e1..d13fdccb82 100644
--- a/src/mir_app/src/framesmenu.cpp
+++ b/src/mir_app/src/framesmenu.cpp
@@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
#include <m_cluiframes.h>
+#include "genmenu.h"
static int hFrameMenuObject;
static HANDLE hPreBuildFrameMenuEvent;
@@ -34,7 +35,6 @@ static HANDLE hPreBuildFrameMenuEvent;
struct FrameMenuExecParam
{
ptrA szServiceName;
- int Frameid;
INT_PTR param1;
};
@@ -56,7 +56,6 @@ static INT_PTR AddContextFrameMenuItem(WPARAM, LPARAM lParam)
FrameMenuExecParam *fmep = new FrameMenuExecParam();
fmep->szServiceName = mir_strdup(mi->pszService);
- fmep->Frameid = 0; // mi->popupPosition; !!!!!!!!!!!!!!!!!!!!!!!!!!
fmep->param1 = (INT_PTR)mi->pszContactOwner;
tmi.ownerdata = fmep;
return (INT_PTR)Menu_AddItem(hFrameMenuObject, &tmi);
@@ -82,16 +81,8 @@ INT_PTR FrameMenuCheckService(WPARAM wParam, LPARAM)
if (pcpp == NULL)
return FALSE;
- TMO_MenuItem mi;
- if (Menu_GetItemInfo(pcpp->MenuItemHandle, mi) == 0) {
- FrameMenuExecParam *fmep = (FrameMenuExecParam*)mi.ownerdata;
- if (fmep != NULL) {
- //pcpp->wParam - frameid
- if (((WPARAM)fmep->Frameid == pcpp->wParam) || fmep->Frameid == -1)
- return TRUE;
- }
- }
- return FALSE;
+ TMO_IntMenuItem *pimi = pcpp->MenuItemHandle;
+ return pimi->execParam == pcpp->wParam || pimi->execParam == -1;
}
static INT_PTR ContextFrameMenuNotify(WPARAM wParam, LPARAM lParam)
diff --git a/src/mir_app/src/genmenu.cpp b/src/mir_app/src/genmenu.cpp
index e4e4416f82..71b1f7b5de 100644
--- a/src/mir_app/src/genmenu.cpp
+++ b/src/mir_app/src/genmenu.cpp
@@ -533,7 +533,7 @@ MIR_APP_DLL(int) Menu_ConfigureObject(int hMenuObject, int setting, INT_PTR valu
MIR_APP_DLL(int) Menu_AddObject(LPCSTR szName, LPCSTR szDisplayName, LPCSTR szCheckService, LPCSTR szExecService)
{
- if (!bIsGenMenuInited || szName == NULL)
+ if (szName == NULL || szDisplayName == NULL)
return NULL;
mir_cslock lck(csMenuHook);