diff options
author | George Hazan <george.hazan@gmail.com> | 2013-12-17 22:39:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-12-17 22:39:14 +0000 |
commit | 1a69d21a165c1b952d697aab49b7cb4e14573c58 (patch) | |
tree | e0490b0f7e8c8e4f7b299fcd22610e08cddde8b4 /plugins/Clist_nicer/src | |
parent | c5cd9533eabe06dd7cc3eda31290f8b11d09c79d (diff) |
further frames code merging
git-svn-id: http://svn.miranda-ng.org/main/trunk@7266 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer/src')
-rw-r--r-- | plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp | 52 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/CLUIFrames/cluiframes.h | 152 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/CLUIFrames/framesmenu.cpp | 131 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp | 31 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/Include/commonheaders.h | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clc.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clistevents.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clui.cpp | 10 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/cluiservices.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/viewmodes.cpp | 2 |
10 files changed, 179 insertions, 207 deletions
diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp index a888833508..0907646b2b 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp @@ -58,17 +58,11 @@ static int UpdateTBToolTip(int framepos); INT_PTR CLUIFrameSetFloat(WPARAM wParam, LPARAM lParam);
int CLUIFrameResizeFloatingFrame(int framepos);
extern int InitFramesMenus(void);
-extern int UnitFramesMenu();
static int CLUIFramesReSort();
boolean FramesSysNotStarted = TRUE;
HPEN g_hPenCLUIFrames = 0;
-typedef struct {
- int order;
- int realpos;
-} SortData;
-
static SortData g_sd[MAX_FRAMES];
static HHOOK g_hFrameHook = 0;
@@ -85,16 +79,9 @@ static int sortfunc(const void *a, const void *b) return 0;
}
-#define CLUIFRAMESSETALIGN "CLUIFramesSetAlign"
-#define CLUIFRAMESSETALIGNALTOP "CLUIFramesSetAlignalTop"
-#define CLUIFRAMESSETALIGNALCLIENT "CLUIFramesSetAlignalClient"
-#define CLUIFRAMESSETALIGNALBOTTOM "CLUIFramesSetAlignalBottom"
-#define CLUIFRAMESMOVEUP "CLUIFramesMoveUp"
-#define CLUIFRAMESMOVEDOWN "CLUIFramesMoveDown"
-
-static wndFrame *Frames = NULL;
+static FRAMEWND *Frames = NULL;
-wndFrame *wndFrameCLC = NULL, *wndFrameEventArea = NULL, *wndFrameViewMode = NULL;
+FRAMEWND *wndFrameCLC = NULL, *wndFrameEventArea = NULL, *wndFrameViewMode = NULL;
static int nFramescount = 0;
static int alclientFrame = -1;//for fast access to frame with alclient properties
@@ -123,9 +110,9 @@ static BOOLEAN CLUIFramesFitInSize(void); HWND hWndExplorerToolBar;
static int GapBetweenFrames = 1;
-static int RemoveItemFromList(int pos, wndFrame **lpFrames, int *FrameItemCount)
+static int RemoveItemFromList(int pos, FRAMEWND **lpFrames, int *FrameItemCount)
{
- memcpy(&((*lpFrames)[pos]), &((*lpFrames)[pos+1]), sizeof(wndFrame)*(*FrameItemCount - pos - 1));
+ memcpy(&((*lpFrames)[pos]), &((*lpFrames)[pos+1]), sizeof(FRAMEWND)*(*FrameItemCount - pos - 1));
(*FrameItemCount)--;
return 0;
}
@@ -160,7 +147,7 @@ void __forceinline ulockfrm() LeaveCriticalSection(&csFrameHook);
}
-static wndFrame* FindFrameByWnd(HWND hwnd)
+static FRAMEWND* FindFrameByWnd(HWND hwnd)
{
BOOL bFound = FALSE;
int i;
@@ -176,7 +163,7 @@ static wndFrame* FindFrameByWnd(HWND hwnd) }
-static void DockThumbs(wndFrame *pThumbLeft, wndFrame *pThumbRight, BOOL bMoveLeft)
+static void DockThumbs(FRAMEWND *pThumbLeft, FRAMEWND *pThumbRight, BOOL bMoveLeft)
{
if ((pThumbRight->dockOpt.hwndLeft == NULL) && (pThumbLeft->dockOpt.hwndRight == NULL)) {
pThumbRight->dockOpt.hwndLeft = pThumbLeft->ContainerWnd;
@@ -185,7 +172,7 @@ static void DockThumbs(wndFrame *pThumbLeft, wndFrame *pThumbRight, BOOL bMoveLe }
-static void UndockThumbs(wndFrame *pThumb1, wndFrame *pThumb2)
+static void UndockThumbs(FRAMEWND *pThumb1, FRAMEWND *pThumb2)
{
if ((pThumb1 == NULL) || (pThumb2 == NULL))
return;
@@ -205,12 +192,12 @@ static void UndockThumbs(wndFrame *pThumb1, wndFrame *pThumb2) BOOLEAN bMoveTogether;
-static void PositionThumb(wndFrame *pThumb, short nX, short nY)
+static void PositionThumb(FRAMEWND *pThumb, short nX, short nY)
{
- wndFrame *pCurThumb = &Frames[0];
- wndFrame *pDockThumb = pThumb;
- wndFrame fakeMainWindow;
- wndFrame fakeTaskBarWindow;
+ FRAMEWND *pCurThumb = &Frames[0];
+ FRAMEWND *pDockThumb = pThumb;
+ FRAMEWND fakeMainWindow;
+ FRAMEWND fakeTaskBarWindow;
RECT rc;
RECT rcThumb;
RECT rcOld;
@@ -1819,10 +1806,10 @@ INT_PTR CLUIFramesAddFrame(WPARAM wParam, LPARAM lParam) return -1;
}
if (Frames == NULL) {
- Frames = (wndFrame*)malloc(sizeof(wndFrame) * (MAX_FRAMES + 2));
- ZeroMemory(Frames, sizeof(wndFrame) * (MAX_FRAMES + 2));
+ Frames = (FRAMEWND*)malloc(sizeof(FRAMEWND) * (MAX_FRAMES + 2));
+ ZeroMemory(Frames, sizeof(FRAMEWND) * (MAX_FRAMES + 2));
}
- memset(&Frames[nFramescount], 0, sizeof(wndFrame));
+ memset(&Frames[nFramescount], 0, sizeof(FRAMEWND));
Frames[nFramescount].id = NextFrameId++;
Frames[nFramescount].align = clfrm->align;
@@ -1957,7 +1944,7 @@ static INT_PTR CLUIFramesRemoveFrame(WPARAM wParam, LPARAM lParam) }
{
- wndFrame* F = &Frames[pos];
+ FRAMEWND* F = &Frames[pos];
if (F->hWnd == g_hwndEventArea)
wndFrameEventArea = NULL;
else if (F->hWnd == pcli->hwndContactTree)
@@ -1989,14 +1976,14 @@ static INT_PTR CLUIFramesRemoveFrame(WPARAM wParam, LPARAM lParam) return 0;
}
-INT_PTR CLUIFramesForceUpdateTB(const wndFrame *Frame)
+INT_PTR CLUIFramesForceUpdateTB(const FRAMEWND *Frame)
{
if (Frame->TitleBar.hwnd != 0)
RedrawWindow(Frame->TitleBar.hwnd, NULL, NULL, RDW_ALLCHILDREN | RDW_UPDATENOW | RDW_ERASE | RDW_INVALIDATE | RDW_FRAME);
return 0;
}
-INT_PTR CLUIFramesForceUpdateFrame(const wndFrame *Frame)
+INT_PTR CLUIFramesForceUpdateFrame(const FRAMEWND *Frame)
{
if (Frame->hWnd != 0)
RedrawWindow(Frame->hWnd, NULL, NULL, RDW_UPDATENOW | RDW_FRAME | RDW_ERASE | RDW_INVALIDATE);
@@ -2006,7 +1993,7 @@ INT_PTR CLUIFramesForceUpdateFrame(const wndFrame *Frame) return 0;
}
-int CLUIFrameMoveResize(const wndFrame *Frame)
+int CLUIFrameMoveResize(const FRAMEWND *Frame)
{
TitleBarH = cfg::dat.titleBarHeight;
// we need to show or hide the frame?
@@ -3365,6 +3352,5 @@ int UnLoadCLUIFramesModule(void) UnregisterClass(CLUIFrameTitleBarClassName, g_hInst);
LeaveCriticalSection(&csFrameHook);
DeleteCriticalSection(&csFrameHook);
- UnitFramesMenu();
return 0;
}
diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.h b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.h index 2c2375a351..0174e37743 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.h +++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.h @@ -1,5 +1,5 @@ /*
-Miranda ICQ: the free icq client for MS Windows
+Miranda ICQ: the free icq client for MS Windows
Copyright (C) 2000-2 Richard Hughes, Roland Rabien & Tristan Van de Vreede
This program is free software; you can redistribute it and/or
@@ -17,6 +17,11 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+#pragma once
+
+#ifndef _CLUIFRAMES_H_
+#define _CLUIFRAMES_H_
+
int LoadCLUIFramesModule(void);
int UnLoadCLUIFramesModule(void);
int CLUIFramesGetMinHeight();
@@ -26,73 +31,96 @@ int CLUIFramesResizeFrames(RECT *rc); typedef struct tagProtocolData {
char *RealName;
- int statusbarpos;
+ int protopos;
boolean show;
} ProtocolData;
+typedef struct
+{
+ int order;
+ int realpos;
+}SortData;
+
+
+
+
+//============
+#define CLUIFRAMESSETALIGN "CLUIFramesSetAlign"
+
+#define CLUIFRAMESSETALIGNALTOP "CLUIFramesSetAlignalTop"
+#define CLUIFRAMESSETALIGNALCLIENT "CLUIFramesSetAlignalClient"
+#define CLUIFRAMESSETALIGNALBOTTOM "CLUIFramesSetAlignalBottom"
+#define CLUIFRAMESMOVEUP "CLUIFramesMoveUp"
+#define CLUIFRAMESMOVEDOWN "CLUIFramesMoveDown"
+
+struct FrameMenuHandles
+{
+ HGENMENU MainMenuItem;
+ HGENMENU MIVisible, MITitle, MITBVisible, MILock, MIColl, MIFloating, MIAlignRoot;
+ HGENMENU MIAlignTop, MIAlignClient, MIAlignBottom;
+ HGENMENU MIBorder, MISkinned;
+};
+
+struct FrameTitleBar
+{
+ HWND hwnd;
+ HWND TitleBarbutt;
+ HWND hwndTip;
+
+ LPTSTR tbname;
+ LPTSTR tooltip;
+ HMENU hmenu;
+ HICON hicon;
+
+ BOOLEAN ShowTitleBar;
+ BOOLEAN ShowTitleBarTip;
+ int oldstyles;
+ POINT oldpos;
+ RECT wndSize;
+};
+
+struct DockOpt
+{
+ HWND hwndLeft;
+ HWND hwndRight;
+};
+
+struct FRAMEWND
+{
+ int id;
+ HWND hWnd;
+ RECT wndSize;
+ RECT oldWndSize;
+ LPTSTR name;
+ int align;
+ int height;
+ int dwFlags;
+ BOOLEAN Locked;
+ BOOLEAN Skinned;
+ BOOLEAN visible;
+ BOOLEAN needhide;
+ BOOLEAN collapsed;
+ int prevvisframe;
+ int HeightWhenCollapsed;
+ FrameTitleBar TitleBar;
+ FrameMenuHandles MenuHandles;
+ int oldstyles;
+ BOOLEAN floating;
+ HWND ContainerWnd;
+ POINT FloatingPos;
+ POINT FloatingSize;
+ BOOLEAN minmaxenabled;
+ BOOLEAN UseBorder;
+ int order;
+ DockOpt dockOpt;
+ HWND OwnerWindow;
+ WNDPROC wndProc;
+};
+
#define OFFSET_PROTOPOS 200
#define OFFSET_VISIBLE 400
#define CLUIFrameTitleBarClassName _T("CLUIFrameTitleBar")
#define CLUIFrameModule "CLUIFrames"
-typedef struct _DockOpt {
- HWND hwndLeft;
- HWND hwndRight;
-}
-DockOpt;
-
-typedef struct tagMenuHandles {
- HGENMENU MainMenuItem;
- HGENMENU MIVisible,MITitle,MITBVisible,MILock,MIColl,MIFloating,MIAlignRoot;
- HGENMENU MIAlignTop,MIAlignClient,MIAlignBottom,MIBorder,MISkinned;
-} FrameMenuHandles;
-
-typedef struct tagFrameTitleBar {
- HWND hwnd;
- HWND TitleBarbutt;
- HWND hwndTip;
-
- LPTSTR tbname;
- LPTSTR tooltip;
- HMENU hmenu;
- HICON hicon;
-
- BOOLEAN ShowTitleBar;
- BOOLEAN ShowTitleBarTip;
- int oldstyles;
- POINT oldpos;
- RECT wndSize;
-} FrameTitleBar;
-
-typedef struct {
- int id;
- HWND hWnd ;
- RECT wndSize;
- RECT oldWndSize;
- LPTSTR name;
- int align;
- int height;
- int dwFlags;
- BOOLEAN Locked;
- BOOLEAN Skinned;
- BOOLEAN visible;
- BOOLEAN needhide;
- BOOLEAN collapsed;
- int prevvisframe;
- int HeightWhenCollapsed;
- FrameTitleBar TitleBar;
- FrameMenuHandles MenuHandles;
- int oldstyles;
- BOOLEAN floating;
- HWND ContainerWnd;
- POINT FloatingPos;
- POINT FloatingSize;
- BOOLEAN minmaxenabled;
- BOOLEAN UseBorder;
- int order;
- DockOpt dockOpt;
- HWND OwnerWindow;
- WNDPROC wndProc;
-} wndFrame;
-
+#endif
diff --git a/plugins/Clist_nicer/src/CLUIFrames/framesmenu.cpp b/plugins/Clist_nicer/src/CLUIFrames/framesmenu.cpp index 79c00914fe..a8974665cc 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/framesmenu.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/framesmenu.cpp @@ -1,10 +1,9 @@ #include <commonheaders.h>
#include "cluiframes.h"
-//==========================Frames
+//========================== Frames
HANDLE hFrameMenuObject;
static HANDLE hPreBuildFrameMenuEvent;
-extern int InitCustomMenus(void);
//contactmenu exec param(ownerdata)
//also used in checkservice
@@ -14,38 +13,21 @@ typedef struct{ INT_PTR param1;
}FrameMenuExecParam,*lpFrameMenuExecParam;
-void FreeAndNil( void **p )
+INT_PTR FreeOwnerDataFrameMenu(WPARAM wParam, LPARAM lParam)
{
- if (p!=NULL)
- {
- if (*p!=NULL)
- {
- if ( !IsBadCodePtr((FARPROC)*p))
- {
- mir_free(*p);
- }
- *p=NULL;
- }
- }
-}
-
-INT_PTR FreeOwnerDataFrameMenu (WPARAM wParam,LPARAM lParam)
-{
-
- lpFrameMenuExecParam cmep;
-
- cmep=(lpFrameMenuExecParam)lParam;
- if (cmep!=NULL){
- FreeAndNil((void **)&cmep->szServiceName);
- FreeAndNil((void **)&cmep);
+ lpFrameMenuExecParam cmep = (lpFrameMenuExecParam)lParam;
+ if (cmep != NULL){
+ mir_free(cmep->szServiceName);
+ mir_free(cmep);
}
return 0;
}
-static INT_PTR AddContextFrameMenuItem(WPARAM wParam,LPARAM lParam)
+static INT_PTR AddContextFrameMenuItem(WPARAM wParam, LPARAM lParam)
{
- TMO_MenuItem tmi;
CLISTMENUITEM *mi = (CLISTMENUITEM*)lParam;
+
+ TMO_MenuItem tmi;
if ( !pcli->pfnConvertMenu(mi, &tmi))
return NULL;
@@ -60,22 +42,11 @@ static INT_PTR AddContextFrameMenuItem(WPARAM wParam,LPARAM lParam) fmep->param1 = (INT_PTR)mi->pszContactOwner;
tmi.ownerdata = fmep;
- return CallService(MO_ADDNEWMENUITEM,(WPARAM)hFrameMenuObject,(LPARAM)&tmi);
+ return CallService(MO_ADDNEWMENUITEM, (WPARAM)hFrameMenuObject, (LPARAM)&tmi);
}
-static INT_PTR RemoveContextFrameMenuItem(WPARAM wParam,LPARAM lParam)
+static INT_PTR RemoveContextFrameMenuItem(WPARAM wParam, LPARAM lParam)
{
- /* this do by free service
- lpFrameMenuExecParam fmep;
- fmep=(lpFrameMenuExecParam)CallService(MO_MENUITEMGETOWNERDATA,wParam,lParam);
- if (fmep!=NULL){
- if (fmep->szServiceName!=NULL){
- mir_free(fmep->szServiceName);
- fmep->szServiceName=NULL;
- };
- mir_free(fmep);
- }
- */
CallService(MO_REMOVEMENUITEM,wParam,0);
return 0;
}
@@ -83,37 +54,37 @@ static INT_PTR RemoveContextFrameMenuItem(WPARAM wParam,LPARAM lParam) //called with:
//wparam - ownerdata
//lparam - lparam from winproc
-INT_PTR FrameMenuExecService(WPARAM wParam,LPARAM lParam) {
- lpFrameMenuExecParam fmep=(lpFrameMenuExecParam)wParam;
- if (fmep==NULL)
- return(-1);
+INT_PTR FrameMenuExecService(WPARAM wParam, LPARAM lParam)
+{
+ lpFrameMenuExecParam fmep = (lpFrameMenuExecParam)wParam;
+ if (fmep == NULL)
+ return -1;
- CallService(fmep->szServiceName,lParam,fmep->param1);
+ CallService(fmep->szServiceName, lParam, fmep->param1);
RedrawWindow(pcli->hwndContactList,NULL,NULL,RDW_INVALIDATE|RDW_ERASE|RDW_FRAME|RDW_UPDATENOW|RDW_ALLCHILDREN);
return 0;
}
//true - ok,false ignore
-INT_PTR FrameMenuCheckService(WPARAM wParam,LPARAM lParam) {
+INT_PTR FrameMenuCheckService(WPARAM wParam, LPARAM lParam)
+{
+ PCheckProcParam pcpp = (PCheckProcParam)wParam;
+ if (pcpp == NULL)
+ return FALSE;
- PCheckProcParam pcpp=(PCheckProcParam)wParam;
- lpFrameMenuExecParam fmep;
TMO_MenuItem mi;
-
- if (pcpp==NULL){return(FALSE);};
- if (CallService(MO_GETMENUITEM,(WPARAM)pcpp->MenuItemHandle,(LPARAM)&mi)==0)
- {
- fmep = reinterpret_cast<lpFrameMenuExecParam>(mi.ownerdata);
- if (fmep!=NULL)
- {
+ if (CallService(MO_GETMENUITEM, (WPARAM)pcpp->MenuItemHandle, (LPARAM)&mi) == 0) {
+ lpFrameMenuExecParam fmep = (lpFrameMenuExecParam)mi.ownerdata;
+ if (fmep != NULL) {
//pcpp->wParam - frameid
- if (((WPARAM)fmep->Frameid==pcpp->wParam)||fmep->Frameid==-1) return(TRUE);
+ if (((WPARAM)fmep->Frameid == pcpp->wParam) || fmep->Frameid == -1)
+ return TRUE;
}
}
- return(FALSE);
+ return FALSE;
}
-static INT_PTR ContextFrameMenuNotify(WPARAM wParam,LPARAM lParam)
+static INT_PTR ContextFrameMenuNotify(WPARAM wParam, LPARAM lParam)
{
NotifyEventHooks(hPreBuildFrameMenuEvent,wParam,lParam);
return 0;
@@ -121,41 +92,33 @@ static INT_PTR ContextFrameMenuNotify(WPARAM wParam,LPARAM lParam) static INT_PTR BuildContextFrameMenu(WPARAM wParam,LPARAM lParam)
{
- CLISTMENUITEM *mi=(CLISTMENUITEM*)lParam;
- HMENU hMenu;
ListParam param = { 0 };
- param.MenuObjectHandle=hFrameMenuObject;
- param.wParam=wParam;
- param.lParam=lParam;
-
- hMenu=CreatePopupMenu();
- //NotifyEventHooks(hPreBuildFrameMenuEvent,wParam,-1);
- ContextFrameMenuNotify(wParam,-1);
- CallService(MO_BUILDMENU,(WPARAM)hMenu,(LPARAM)¶m);
+ param.MenuObjectHandle = hFrameMenuObject;
+ param.wParam = wParam;
+ param.lParam = lParam;
+
+ HMENU hMenu = CreatePopupMenu();
+ ContextFrameMenuNotify(wParam, -1);
+ CallService(MO_BUILDMENU, (WPARAM)hMenu, (LPARAM)¶m);
return (INT_PTR)hMenu;
}
-//==========================Frames end
+//========================== Frames end
int InitFramesMenus(void)
{
- CreateServiceFunction("FrameMenuExecService",FrameMenuExecService);
- CreateServiceFunction("FrameMenuCheckService",FrameMenuCheckService);
- CreateServiceFunction("FrameMenuFreeService",FreeOwnerDataFrameMenu);
-
- CreateServiceFunction(MS_CLIST_REMOVECONTEXTFRAMEMENUITEM,RemoveContextFrameMenuItem);
- CreateServiceFunction("CList/AddContextFrameMenuItem",AddContextFrameMenuItem);
- CreateServiceFunction(MS_CLIST_MENUBUILDFRAMECONTEXT,BuildContextFrameMenu);
- CreateServiceFunction(MS_CLIST_FRAMEMENUNOTIFY,ContextFrameMenuNotify);
+ CreateServiceFunction("FrameMenuExecService", FrameMenuExecService);
+ CreateServiceFunction("FrameMenuCheckService", FrameMenuCheckService);
+ CreateServiceFunction("FrameMenuFreeService", FreeOwnerDataFrameMenu);
+
+ CreateServiceFunction(MS_CLIST_REMOVECONTEXTFRAMEMENUITEM, RemoveContextFrameMenuItem);
+ CreateServiceFunction("CList/AddContextFrameMenuItem", AddContextFrameMenuItem);
+ CreateServiceFunction(MS_CLIST_MENUBUILDFRAMECONTEXT, BuildContextFrameMenu);
+ CreateServiceFunction(MS_CLIST_FRAMEMENUNOTIFY, ContextFrameMenuNotify);
hPreBuildFrameMenuEvent = CreateHookableEvent(ME_CLIST_PREBUILDFRAMEMENU);
- //frame menu object
- hFrameMenuObject = MO_CreateMenuObject("Frames_Menu", LPGEN("Frames menu"), "FrameMenuCheckService", "FrameMenuExecService");
+ // frame menu object
+ hFrameMenuObject = MO_CreateMenuObject("FrameMenu", LPGEN("Frame menu"), "FrameMenuCheckService", "FrameMenuExecService");
MO_SetMenuObjectParam(hFrameMenuObject, OPT_MENUOBJECT_SET_FREE_SERVICE, "FrameMenuFreeService");
return 0;
}
-
-int UnitFramesMenu()
-{
- return 0;
-}
diff --git a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp index 7059a5563d..002da5d970 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp @@ -162,7 +162,8 @@ INT_PTR GroupMenuonAddService(WPARAM wParam,LPARAM lParam) //called with:
//wparam - ownerdata
//lparam - lparam from winproc
-INT_PTR GroupMenuExecService(WPARAM wParam,LPARAM lParam) {
+INT_PTR GroupMenuExecService(WPARAM wParam,LPARAM lParam)
+{
if (wParam!=0) {
lpGroupMenuExecParam mmep=(lpGroupMenuExecParam)wParam;
if ( !strcmp(mmep->szServiceName,"Help/AboutCommand")) {
@@ -176,19 +177,17 @@ INT_PTR GroupMenuExecService(WPARAM wParam,LPARAM lParam) { };
return(1);
-};
-INT_PTR FreeOwnerDataGroupMenu (WPARAM wParam,LPARAM lParam)
-{
+}
- lpGroupMenuExecParam mmep;
- mmep=(lpGroupMenuExecParam)lParam;
- if (mmep!=NULL) {
- FreeAndNil((void **)&mmep->szServiceName);
- FreeAndNil((void **)&mmep);
+INT_PTR FreeOwnerDataGroupMenu(WPARAM wParam, LPARAM lParam)
+{
+ lpGroupMenuExecParam mmep = (lpGroupMenuExecParam)lParam;
+ if (mmep != NULL) {
+ mir_free(mmep->szServiceName);
+ mir_free(mmep);
}
-
return 0;
-};
+}
INT_PTR HideGroupsHelper(WPARAM wParam,LPARAM lParam)
{
@@ -519,13 +518,11 @@ INT_PTR SubGroupMenuExecService(WPARAM wParam,LPARAM lParam) { INT_PTR FreeOwnerDataSubGroupMenu (WPARAM wParam,LPARAM lParam)
{
- lpSubGroupMenuExecParam mmep;
- mmep=(lpSubGroupMenuExecParam)lParam;
- if (mmep!=NULL) {
- FreeAndNil((void **)&mmep->szServiceName);
- FreeAndNil((void **)&mmep);
+ lpSubGroupMenuExecParam mmep = (lpSubGroupMenuExecParam)lParam;
+ if (mmep != NULL) {
+ mir_free(mmep->szServiceName);
+ mir_free(mmep);
}
-
return 0;
}
diff --git a/plugins/Clist_nicer/src/Include/commonheaders.h b/plugins/Clist_nicer/src/Include/commonheaders.h index 0dbcc52508..accb1f265b 100644 --- a/plugins/Clist_nicer/src/Include/commonheaders.h +++ b/plugins/Clist_nicer/src/Include/commonheaders.h @@ -192,5 +192,3 @@ BOOL __forceinline GetItemByStatus(int status, StatusItems_t *retitem); void DrawAlpha(HDC hdcwnd, PRECT rc, DWORD basecolor, int alpha, DWORD basecolor2, BOOL transparent, BYTE FLG_GRADIENT, BYTE FLG_CORNER, DWORD BORDERSTYLE, ImageItem *item);
void CustomizeButton(HWND hWnd, bool bIsSkinned, bool bIsThemed, bool bIsFlat);
-
-void FreeAndNil( void** );
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp index 067b6116ad..42ac37f5fd 100644 --- a/plugins/Clist_nicer/src/clc.cpp +++ b/plugins/Clist_nicer/src/clc.cpp @@ -41,7 +41,7 @@ void CSH_Destroy(); int DefaultImageListColorDepth = ILC_COLOR32;
extern HPEN g_hPenCLUIFrames;
-extern wndFrame *wndFrameCLC;
+extern FRAMEWND *wndFrameCLC;
extern ButtonItem *g_ButtonItems;
extern int during_sizing;
diff --git a/plugins/Clist_nicer/src/clistevents.cpp b/plugins/Clist_nicer/src/clistevents.cpp index ee76cbb8a7..6d4150a3d7 100644 --- a/plugins/Clist_nicer/src/clistevents.cpp +++ b/plugins/Clist_nicer/src/clistevents.cpp @@ -28,7 +28,7 @@ HFONT __fastcall ChangeToFont(HDC hdc, struct ClcData *dat, int id, int *fontHei extern struct CListEvent* ( *saveAddEvent )(CLISTEVENT *cle);
extern int ( *saveRemoveEvent )(HANDLE hContact, HANDLE hDbEvent);
-extern wndFrame *wndFrameEventArea;
+extern FRAMEWND *wndFrameEventArea;
extern HPEN g_hPenCLUIFrames;
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index 870b4c5533..ae46dd959d 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -60,7 +60,7 @@ extern HBRUSH g_CLUISkinnedBkColor; extern HWND g_hwndSFL;
extern ButtonItem *g_ButtonItems;
extern COLORREF g_CLUISkinnedBkColorRGB;
-extern wndFrame *wndFrameCLC;
+extern FRAMEWND *wndFrameCLC;
static BYTE old_cliststate, show_on_first_autosize = FALSE;
@@ -1702,9 +1702,9 @@ buttons_done: if ( !(showOpts & 6) && cfg::dat.bEqualSections)
x = (dis->rcItem.left + dis->rcItem.right - 16) >> 1;
- if (pd->statusbarpos == 0)
+ if (pd->protopos == 0)
x += (cfg::dat.bEqualSections ? (cfg::dat.bCLeft / 2) : cfg::dat.bCLeft);
- else if (pd->statusbarpos == nParts - 1)
+ else if (pd->protopos == nParts - 1)
x -= (cfg::dat.bCRight / 2);
DrawIconEx(dis->hDC, x, (dis->rcItem.top + dis->rcItem.bottom - 16) >> 1, hIcon, 16, 16, 0, NULL, DI_NORMAL);
Skin_ReleaseIcon(hIcon);
@@ -1722,9 +1722,9 @@ buttons_done: }
else {
x += 2;
- if (pd->statusbarpos == 0)
+ if (pd->protopos == 0)
x += (cfg::dat.bEqualSections ? (cfg::dat.bCLeft / 2) : cfg::dat.bCLeft);
- else if (pd->statusbarpos == nParts - 1)
+ else if (pd->protopos == nParts - 1)
x -= (cfg::dat.bCRight / 2);
}
diff --git a/plugins/Clist_nicer/src/cluiservices.cpp b/plugins/Clist_nicer/src/cluiservices.cpp index d6e5939c86..cd8cdbcaf7 100644 --- a/plugins/Clist_nicer/src/cluiservices.cpp +++ b/plugins/Clist_nicer/src/cluiservices.cpp @@ -182,7 +182,7 @@ void CluiProtocolStatusChanged( int parStatus, const char* szProto ) status = CallProtoService( pa->szModuleName,PS_GETSTATUS,0,0);
ProtocolData *PD = ( ProtocolData* )mir_alloc(sizeof(ProtocolData));
PD->RealName = mir_strdup( pa->szModuleName );
- PD->statusbarpos = partCount;
+ PD->protopos = partCount;
{
int flags;
flags = SBT_OWNERDRAW;
diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp index 06340ca3e3..458f03ce08 100644 --- a/plugins/Clist_nicer/src/viewmodes.cpp +++ b/plugins/Clist_nicer/src/viewmodes.cpp @@ -33,7 +33,7 @@ $Id: viewmodes.cpp 13824 2011-09-03 06:32:11Z borkra $ extern HIMAGELIST hCListImages;
extern HPEN g_hPenCLUIFrames;
-extern wndFrame *wndFrameViewMode;
+extern FRAMEWND *wndFrameViewMode;
typedef int (__cdecl *pfnEnumCallback)(char *szName);
static HWND clvmHwnd = 0;
|