summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/modern_toolbar.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-07 07:42:40 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-07 07:42:40 +0000
commit6ba9eb829a0b95bf9e6c6bdc9ed37d1d3947b87b (patch)
tree6d578ae1a68dcc7ab48d38ef9c33605d392d8186 /plugins/Clist_modern/modern_toolbar.cpp
parent3447a9bff3aa6ba3a2d9bab91653cab257c29bcf (diff)
correct mir_free usage
git-svn-id: http://svn.miranda-ng.org/main/trunk@808 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/modern_toolbar.cpp')
-rw-r--r--plugins/Clist_modern/modern_toolbar.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/plugins/Clist_modern/modern_toolbar.cpp b/plugins/Clist_modern/modern_toolbar.cpp
index 6e79d560b7..b71d7208c6 100644
--- a/plugins/Clist_modern/modern_toolbar.cpp
+++ b/plugins/Clist_modern/modern_toolbar.cpp
@@ -482,7 +482,7 @@ static int sttReposButtons(MTBINFO * mti)
y += mti->nButtonHeight+mti->nButtonSpace;
nextX = 0;
if (mti->fSingleLine) break;
- } while (iFirstButtonId < mti->pButtonList->realCount && y >= 0 &&(mti->fAutoSize || (y+mti->nButtonHeight <= rcClient.bottom-rcClient.top)));
+ } while (iFirstButtonId < mti->pButtonList->realCount && y >= 0 && (mti->fAutoSize || (y+mti->nButtonHeight <= rcClient.bottom-rcClient.top)));
for (i = iFirstButtonId; i < mti->pButtonList->realCount; i++)
{
MTB_BUTTONINFO * mtbi = (MTB_BUTTONINFO *)mti->pButtonList->items[i];
@@ -496,14 +496,12 @@ static int sttReposButtons(MTBINFO * mti)
}
-static HWND sttCreateToolBarFrame( HWND hwndParent, char * szCaption, int nHeight )
+static HWND sttCreateToolBarFrame( HWND hwndParent, char * szCaption, int nHeight )
{
- TCHAR * Caption = mir_a2t(szCaption);
- HWND hwnd = CreateWindow(_T(MIRANDATOOLBARCLASSNAME), TranslateTS(Caption), WS_CHILD|WS_VISIBLE|WS_CLIPCHILDREN,0,0,0,nHeight,hwndParent,NULL,g_hInst, (void*) szCaption);
- mir_free(Caption);
- return hwnd;
+ return CreateWindow( _T(MIRANDATOOLBARCLASSNAME), TranslateTS( _A2T(szCaption)), WS_CHILD|WS_VISIBLE|WS_CLIPCHILDREN,0,0,0,nHeight,hwndParent,NULL,g_hInst, (void*) szCaption);
}
-static int sttButtonPressed(MTBINFO * pMTBInfo, HWND hwndbutton)
+
+static int sttButtonPressed(MTBINFO * pMTBInfo, HWND hwndbutton)
{
MTB_BUTTONINFO * mtbi = (MTB_BUTTONINFO *)GetWindowLongPtr(hwndbutton, GWLP_USERDATA);
if (mtbi && mtbi->hWindow == hwndbutton && mtbi->hwndToolBar == pMTBInfo->hWnd)
@@ -513,7 +511,8 @@ static int sttButtonPressed(MTBINFO * pMTBInfo, HWND hwndbutton)
}
return 0;
}
-static BOOL sttDrawToolBarBackground(HWND hwnd, HDC hdc, RECT * rect, MTBINFO * pMTBInfo)
+
+static BOOL sttDrawToolBarBackground(HWND hwnd, HDC hdc, RECT * rect, MTBINFO * pMTBInfo)
{
BOOL bFloat = (GetParent(hwnd) != pcli->hwndContactList);
if (g_CluiData.fDisableSkinEngine || !g_CluiData.fLayered || bFloat)
@@ -979,7 +978,7 @@ static LRESULT CALLBACK ToolBar_WndProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM
BOOL ret = FALSE;
PAINTSTRUCT ps;
BOOL bFloat = (GetParent(hwnd) != pcli->hwndContactList);
- if (g_CluiData.fDisableSkinEngine|| !g_CluiData.fLayered || bFloat )
+ if (g_CluiData.fDisableSkinEngine || !g_CluiData.fLayered || bFloat )
{
BeginPaint(hwnd,&ps);
if ((!g_CluiData.fLayered || bFloat) && !g_CluiData.fDisableSkinEngine)
@@ -1290,7 +1289,7 @@ static LRESULT CALLBACK ToolBar_OptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,L
tvi.mask = TVIF_HANDLE|TVIF_PARAM;
tvi.hItem = (HTREEITEM)hDragItem;
TreeView_GetItem(GetDlgItem(hwndDlg,IDC_BTNORDER),&tvi);
- if (hti.flags&(TVHT_ONITEM|TVHT_ONITEMRIGHT)||(hti.hItem == TVI_FIRST))
+ if (hti.flags&(TVHT_ONITEM|TVHT_ONITEMRIGHT) || (hti.hItem == TVI_FIRST))
{
TVINSERTSTRUCT tvis;
TCHAR name[128];
@@ -1320,9 +1319,9 @@ static LRESULT CALLBACK ToolBar_OptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,L
}
SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
} else if ( (LOWORD(wParam) == IDC_TEXT_W ||
- LOWORD(wParam) == IDC_TEXT_H ||
+ LOWORD(wParam) == IDC_TEXT_H ||
LOWORD(wParam) == IDC_TEXT_S )
- && HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()) return 0; // dont make apply enabled during buddy set crap
+ && HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()) return 0; // dont make apply enabled during buddy set crap
SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
break;
}