diff options
author | George Hazan <george.hazan@gmail.com> | 2013-06-19 17:58:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-06-19 17:58:14 +0000 |
commit | 9c2ff265738122969de9ec2ddbf936a93c656976 (patch) | |
tree | 389d11e14cb99f33c408f19bab141c7f7f828f57 /plugins/Clist_modern/src/modern_clui.cpp | |
parent | 09c0958aeb5c355b75d2cedf67e15ebb5098e980 (diff) |
removing old junk from clist_modern
git-svn-id: http://svn.miranda-ng.org/main/trunk@5045 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clui.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_clui.cpp | 181 |
1 files changed, 91 insertions, 90 deletions
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index ec9a5673ea..ee9ce018ed 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -45,94 +45,94 @@ void DestroyTrayMenu(HMENU hMenu); #include <crtdbg.h>
#endif
-/* Global variables */ - -UINT g_dwMainThreadID = 0; -HANDLE g_hAwayMsgThread = 0, g_hGetTextAsyncThread = 0, g_hSmoothAnimationThread = 0; - -HMENU g_hMenuMain; -BOOL g_bTransparentFlag = FALSE; - -BOOL g_mutex_bChangingMode = FALSE, g_mutex_bSizing = FALSE; - -BOOL g_flag_bOnModulesLoadedCalled = FALSE; - -RECT g_rcEdgeSizingRect={0}; - -BOOL (WINAPI *g_proc_SetLayeredWindowAttributesNew)(HWND,COLORREF,BYTE,DWORD); -
-/* Module global variables */ - -static BYTE bAlphaEnd; -static BYTE bOldHideOffline; -static BYTE bOldUseGroups; - -static WORD wBehindEdgeShowDelay, - wBehindEdgeHideDelay, - wBehindEdgeBorderSize; - -static BOOL mutex_bAnimationInProgress=FALSE, - mutex_bShowHideCalledFromAnimation=FALSE, - mutex_bIgnoreActivation=FALSE, - mutex_bDisableAutoUpdate=TRUE, - mutex_bDuringSizing=FALSE, - mutex_bDelayedSizing=FALSE; //TBC is it need? - -static BOOL flag_bFirstTimeCall=FALSE; - -static BOOL bTransparentFocus=TRUE, - bNeedFixSizingRect=FALSE, - bShowEventStarted=FALSE; - -static HGENMENU hRenameMenuItem, hShowAvatarMenuItem, hHideAvatarMenuItem; - -static UINT uMsgGetProfile=0; - -static int nLastRequiredHeight=0, - nRequiredHeight=0, - nMirMenuState=0, - nStatusMenuState=0; - -static RECT rcNewWindowRect={0}, - rcOldWindowRect ={0}, - rcSizingRect={0}, - rcCorrectSizeRect={0}; - -static HANDLE hFrameContactTree; - -static PROTOTICKS CycleStartTick[64]={0};//max 64 protocols - -static int nAnimatedIconStep=100; -
-HIMAGELIST hAvatarOverlays=NULL; - -OVERLAYICONINFO g_pAvatarOverlayIcons[ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE + 1] = -{ - { "AVATAR_OVERLAY_OFFLINE", LPGEN("Offline"), IDI_AVATAR_OVERLAY_OFFLINE, -1}, - { "AVATAR_OVERLAY_ONLINE", LPGEN("Online"), IDI_AVATAR_OVERLAY_ONLINE, -1}, - { "AVATAR_OVERLAY_AWAY", LPGEN("Away"), IDI_AVATAR_OVERLAY_AWAY, -1}, - { "AVATAR_OVERLAY_DND", LPGEN("DND"), IDI_AVATAR_OVERLAY_DND, -1}, - { "AVATAR_OVERLAY_NA", LPGEN("NA"), IDI_AVATAR_OVERLAY_NA, -1}, - { "AVATAR_OVERLAY_OCCUPIED", LPGEN("Occupied"), IDI_AVATAR_OVERLAY_OCCUPIED, -1}, - { "AVATAR_OVERLAY_CHAT", LPGEN("Free for chat"), IDI_AVATAR_OVERLAY_CHAT, -1}, - { "AVATAR_OVERLAY_INVISIBLE", LPGEN("Invisible"), IDI_AVATAR_OVERLAY_INVISIBLE, -1}, - { "AVATAR_OVERLAY_PHONE", LPGEN("On the phone"), IDI_AVATAR_OVERLAY_PHONE, -1}, - { "AVATAR_OVERLAY_LUNCH", LPGEN("Out to lunch"), IDI_AVATAR_OVERLAY_LUNCH, -1} -}; - -OVERLAYICONINFO g_pStatusOverlayIcons[ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE + 1] = -{ - { "STATUS_OVERLAY_OFFLINE", LPGEN("Offline"), IDI_STATUS_OVERLAY_OFFLINE, -1}, - { "STATUS_OVERLAY_ONLINE", LPGEN("Online"), IDI_STATUS_OVERLAY_ONLINE, -1}, - { "STATUS_OVERLAY_AWAY", LPGEN("Away"), IDI_STATUS_OVERLAY_AWAY, -1}, - { "STATUS_OVERLAY_DND", LPGEN("DND"), IDI_STATUS_OVERLAY_DND, -1}, - { "STATUS_OVERLAY_NA", LPGEN("NA"), IDI_STATUS_OVERLAY_NA, -1}, - { "STATUS_OVERLAY_OCCUPIED", LPGEN("Occupied"), IDI_STATUS_OVERLAY_OCCUPIED, -1}, - { "STATUS_OVERLAY_CHAT", LPGEN("Free for chat"), IDI_STATUS_OVERLAY_CHAT, -1}, - { "STATUS_OVERLAY_INVISIBLE", LPGEN("Invisible"), IDI_STATUS_OVERLAY_INVISIBLE, -1}, - { "STATUS_OVERLAY_PHONE", LPGEN("On the phone"), IDI_STATUS_OVERLAY_PHONE, -1}, - { "STATUS_OVERLAY_LUNCH", LPGEN("Out to lunch"), IDI_STATUS_OVERLAY_LUNCH, -1} -}; +/* Global variables */
+
+UINT g_dwMainThreadID = 0;
+HANDLE g_hAwayMsgThread = 0, g_hGetTextAsyncThread = 0, g_hSmoothAnimationThread = 0;
+
+HMENU g_hMenuMain;
+BOOL g_bTransparentFlag = FALSE;
+
+BOOL g_mutex_bChangingMode = FALSE, g_mutex_bSizing = FALSE;
+
+BOOL g_flag_bOnModulesLoadedCalled = FALSE;
+
+RECT g_rcEdgeSizingRect={0};
+
+BOOL (WINAPI *g_proc_SetLayeredWindowAttributesNew)(HWND,COLORREF,BYTE,DWORD);
+
+/* Module global variables */
+
+static BYTE bAlphaEnd;
+static BYTE bOldHideOffline;
+static BYTE bOldUseGroups;
+
+static WORD wBehindEdgeShowDelay,
+ wBehindEdgeHideDelay,
+ wBehindEdgeBorderSize;
+
+static BOOL mutex_bAnimationInProgress=FALSE,
+ mutex_bShowHideCalledFromAnimation=FALSE,
+ mutex_bIgnoreActivation=FALSE,
+ mutex_bDisableAutoUpdate=TRUE,
+ mutex_bDuringSizing=FALSE,
+ mutex_bDelayedSizing=FALSE; //TBC is it need?
+
+static BOOL flag_bFirstTimeCall=FALSE;
+
+static BOOL bTransparentFocus=TRUE,
+ bNeedFixSizingRect=FALSE,
+ bShowEventStarted=FALSE;
+
+static HGENMENU hRenameMenuItem, hShowAvatarMenuItem, hHideAvatarMenuItem;
+
+static UINT uMsgGetProfile=0;
+
+static int nLastRequiredHeight=0,
+ nRequiredHeight=0,
+ nMirMenuState=0,
+ nStatusMenuState=0;
+
+static RECT rcNewWindowRect={0},
+ rcOldWindowRect ={0},
+ rcSizingRect={0},
+ rcCorrectSizeRect={0};
+
+static HANDLE hFrameContactTree;
+
+static PROTOTICKS CycleStartTick[64]={0};//max 64 protocols
+
+static int nAnimatedIconStep=100;
+
+HIMAGELIST hAvatarOverlays=NULL;
+
+OVERLAYICONINFO g_pAvatarOverlayIcons[ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE + 1] =
+{
+ { "AVATAR_OVERLAY_OFFLINE", LPGEN("Offline"), IDI_AVATAR_OVERLAY_OFFLINE, -1},
+ { "AVATAR_OVERLAY_ONLINE", LPGEN("Online"), IDI_AVATAR_OVERLAY_ONLINE, -1},
+ { "AVATAR_OVERLAY_AWAY", LPGEN("Away"), IDI_AVATAR_OVERLAY_AWAY, -1},
+ { "AVATAR_OVERLAY_DND", LPGEN("DND"), IDI_AVATAR_OVERLAY_DND, -1},
+ { "AVATAR_OVERLAY_NA", LPGEN("NA"), IDI_AVATAR_OVERLAY_NA, -1},
+ { "AVATAR_OVERLAY_OCCUPIED", LPGEN("Occupied"), IDI_AVATAR_OVERLAY_OCCUPIED, -1},
+ { "AVATAR_OVERLAY_CHAT", LPGEN("Free for chat"), IDI_AVATAR_OVERLAY_CHAT, -1},
+ { "AVATAR_OVERLAY_INVISIBLE", LPGEN("Invisible"), IDI_AVATAR_OVERLAY_INVISIBLE, -1},
+ { "AVATAR_OVERLAY_PHONE", LPGEN("On the phone"), IDI_AVATAR_OVERLAY_PHONE, -1},
+ { "AVATAR_OVERLAY_LUNCH", LPGEN("Out to lunch"), IDI_AVATAR_OVERLAY_LUNCH, -1}
+};
+
+OVERLAYICONINFO g_pStatusOverlayIcons[ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE + 1] =
+{
+ { "STATUS_OVERLAY_OFFLINE", LPGEN("Offline"), IDI_STATUS_OVERLAY_OFFLINE, -1},
+ { "STATUS_OVERLAY_ONLINE", LPGEN("Online"), IDI_STATUS_OVERLAY_ONLINE, -1},
+ { "STATUS_OVERLAY_AWAY", LPGEN("Away"), IDI_STATUS_OVERLAY_AWAY, -1},
+ { "STATUS_OVERLAY_DND", LPGEN("DND"), IDI_STATUS_OVERLAY_DND, -1},
+ { "STATUS_OVERLAY_NA", LPGEN("NA"), IDI_STATUS_OVERLAY_NA, -1},
+ { "STATUS_OVERLAY_OCCUPIED", LPGEN("Occupied"), IDI_STATUS_OVERLAY_OCCUPIED, -1},
+ { "STATUS_OVERLAY_CHAT", LPGEN("Free for chat"), IDI_STATUS_OVERLAY_CHAT, -1},
+ { "STATUS_OVERLAY_INVISIBLE", LPGEN("Invisible"), IDI_STATUS_OVERLAY_INVISIBLE, -1},
+ { "STATUS_OVERLAY_PHONE", LPGEN("On the phone"), IDI_STATUS_OVERLAY_PHONE, -1},
+ { "STATUS_OVERLAY_LUNCH", LPGEN("Out to lunch"), IDI_STATUS_OVERLAY_LUNCH, -1}
+};
//////////////// CLUI CLASS IMPLEMENTATION /////////////////////////////////
#include "hdr/modern_clui.h"
@@ -1080,9 +1080,10 @@ static int CLUI_CreateTimerForConnectingIcon(WPARAM wParam,LPARAM lParam) pt->himlIconList = ImageList_Create(16,16,ILC_MASK|ILC_COLOR32,cnt,1);
for (int i=0; i < cnt; i++) {
HICON ic = CLUI_GetConnectingIconForProto(szProto, i);
- if (ic)
+ if (ic) {
ImageList_AddIcon(pt->himlIconList, ic);
- DestroyIcon_protect(ic);
+ DestroyIcon(ic);
+ }
}
CLUI_SafeSetTimer(pcli->hwndContactList,TM_STATUSBARUPDATE+pt->nIndex,(int)(nAnimatedIconStep)/1,0);
pt->bTimerCreated = 1;
|