diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-27 07:51:46 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-27 07:51:46 +0000 |
commit | 9d65ee38c92c7a0656ddc6c4c26017b7226fc44b (patch) | |
tree | a0aee0dc8d0f850939b68c5777d07ed9951cf655 | |
parent | 1d2358d43cfcfed5df1f1f4a7d2d211d8d71c286 (diff) |
finally frame menu appeared
git-svn-id: http://svn.miranda-ng.org/main/trunk@14408 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp | 4 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp | 8 | ||||
-rw-r--r-- | src/mir_app/src/framesmenu.cpp | 15 | ||||
-rw-r--r-- | src/mir_app/src/genmenu.cpp | 2 |
4 files changed, 10 insertions, 19 deletions
diff --git a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp index 272548fa78..989a515ea7 100644 --- a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp @@ -1207,8 +1207,10 @@ static int _us_DoShowHideFrame(WPARAM wParam, LPARAM lParam) return -1;
int pos = (wParam == 0) ? lParam : id2pos(wParam);
- if (pos >= 0 && (int)pos < g_nFramesCount) {
+ if (pos >= 0 && pos < g_nFramesCount) {
g_pfwFrames[pos].visible = !g_pfwFrames[pos].visible;
+ CLUIFramesStoreFrameSettings(pos);
+
if (g_pfwFrames[pos].OwnerWindow != (HWND)-2) {
if (g_pfwFrames[pos].OwnerWindow)
CLUI_ShowWindowMod(g_pfwFrames[pos].OwnerWindow, (g_pfwFrames[pos].visible && g_pfwFrames[pos].collapsed && IsWindowVisible(pcli->hwndContactList)) ? SW_SHOW/*NOACTIVATE*/ : SW_HIDE);
diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp index 951979c69f..1921b5137c 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp @@ -2443,21 +2443,19 @@ LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA case WM_MOUSEMOVE: { - char TBcapt[255]; - mir_cslock lck(csFrameHook); int pos = id2pos(Frameid); if (pos != -1) { int oldflags; + char TBcapt[255]; mir_snprintf(TBcapt, _countof(TBcapt), "%s - h:%d, vis:%d, fl:%d, fl:(%d,%d,%d,%d),or: %d", Frames[pos].name, Frames[pos].height, Frames[pos].visible, Frames[pos].floating, Frames[pos].FloatingPos.x, Frames[pos].FloatingPos.y, Frames[pos].FloatingSize.x, Frames[pos].FloatingSize.y, - Frames[pos].order - ); + Frames[pos].order); oldflags = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS, Frames[pos].id), 0); - if (!(oldflags&F_SHOWTBTIP)) + if (!(oldflags & F_SHOWTBTIP)) oldflags |= F_SHOWTBTIP; } } 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);
|