diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-24 15:21:30 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-24 15:21:30 +0000 |
commit | 5e01c907bf4cace9542f880bae418f71c0fd0c07 (patch) | |
tree | 4e8b60aa99bcc10540be4b0ca09bcb313ff78677 /plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp | |
parent | 4a4b816398add26a704f13af1aa2ff5023df01af (diff) |
more warning fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@6608 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp')
-rw-r--r-- | plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp index 577218a782..5374b67ae1 100644 --- a/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp @@ -609,9 +609,6 @@ int CLUIFramesStoreAllFrames() // Get client frame
int CLUIFramesGetalClientFrame(void)
{
- if (alclientFrame != -1)
- return alclientFrame;
-
if (alclientFrame != -1) {
/* this value could become invalid if RemoveItemFromList was called,
* so we double-check */
@@ -1209,8 +1206,7 @@ INT_PTR CLUIFramesMoveUpDown(WPARAM wParam,LPARAM lParam) }
}
- if (sd != NULL)
- free(sd);
+ free(sd);
CLUIFramesStoreFrameSettings(pos);
CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0);
}
@@ -1515,7 +1511,6 @@ INT_PTR CLUIFramesAddFrame(WPARAM wParam,LPARAM lParam) Frames[nFramescount].hWnd = clfrm->hWnd;
Frames[nFramescount].height = clfrm->height;
Frames[nFramescount].TitleBar.hicon = clfrm->hIcon;
- Frames[nFramescount].TitleBar.BackColour;
Frames[nFramescount].floating = FALSE;
//override tbbtip
@@ -1742,7 +1737,6 @@ int CLUIFramesResize(const RECT newsize) GapBetweenFrames = db_get_dw(NULL,"CLUIFrames","GapBetweenFrames",1);
TitleBarH = db_get_dw(NULL,"CLUIFrames","TitleBarH",DEFAULT_TITLEBAR_HEIGHT);
- sepw = GapBetweenFrames;
if (nFramescount < 1)
return 0;
@@ -1873,11 +1867,10 @@ INT_PTR CLUIFramesUpdateFrame(WPARAM wParam,LPARAM lParam) if (wParam == -1) { CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0); return 0;}
if (lParam&FU_FMPOS) CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,1);
lockfrm();
- wParam = id2pos(wParam);
- if (wParam<0||(int)wParam>=nFramescount) { ulockfrm(); return -1;}
- if (lParam&FU_TBREDRAW) CLUIFramesForceUpdateTB(&Frames[wParam]);
- if (lParam&FU_FMREDRAW) CLUIFramesForceUpdateFrame(&Frames[wParam]);
- //if () {}
+ int pos = id2pos(wParam);
+ if (pos < 0 || pos >= nFramescount) { ulockfrm(); return -1;}
+ if (lParam & FU_TBREDRAW) CLUIFramesForceUpdateTB(&Frames[pos]);
+ if (lParam & FU_FMREDRAW) CLUIFramesForceUpdateFrame(&Frames[pos]);
ulockfrm();
return 0;
@@ -2412,7 +2405,7 @@ LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA ulockfrm();
}
- if (wParam & MK_LBUTTON) {
+ if (wParam & MK_RBUTTON) {
int newh = -1,prevold;
if (GetCapture() != hwnd){break;}
@@ -2933,8 +2926,7 @@ int UnLoadCLUIFramesModule(void) mir_free(Frames[i].TitleBar.tooltip);
}
- if (Frames)
- free(Frames);
+ free(Frames);
Frames = NULL;
nFramescount = 0;
UnregisterClass(CLUIFrameTitleBarClassName,g_hInst);
|