diff options
author | George Hazan <george.hazan@gmail.com> | 2012-07-12 06:20:51 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-07-12 06:20:51 +0000 |
commit | 6c2ab603d2456c41ec977fb3fc18666439a10785 (patch) | |
tree | 75c6284dd78895e4cc7ec6b7db198e06ebdcfaa1 /plugins/TopToolBar/ttbopt.cpp | |
parent | 987abc0e1d9f8f32d5565701743b40d6c0326e9e (diff) |
- fix for the button arrange procedure;
- fix for the icons' enabling/disabling;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@913 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TopToolBar/ttbopt.cpp')
-rw-r--r-- | plugins/TopToolBar/ttbopt.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/plugins/TopToolBar/ttbopt.cpp b/plugins/TopToolBar/ttbopt.cpp index 1938a710cd..3fa0b1916c 100644 --- a/plugins/TopToolBar/ttbopt.cpp +++ b/plugins/TopToolBar/ttbopt.cpp @@ -43,8 +43,7 @@ static HTREEITEM AddLine(HWND hTree,TopButtonInt *b, HTREEITEM hItem, HIMAGELIST if (!(b->dwFlags & TTBBF_ISSEPARATOR))
mir_free(tmp);
- TreeView_SetCheckState(hTree, hti, (b->dwFlags & TTBBF_VISIBLE) ? TRUE : FALSE);
-
+ TreeView_SetCheckState(hTree, hti, b->isVisible());
return hti;
}
@@ -127,17 +126,19 @@ void CancelProcess(HWND hwndDlg) static void RecreateWindows()
{
- if (g_ctrl->hWnd)
- PostMessage(g_ctrl->hWnd, TTB_UPDATEFRAMEVISIBILITY, TRUE, 0);
-
- mir_cslock lck(csButtonsHook);
- for (int i = 0; i < Buttons.getCount(); i++) {
- TopButtonInt *b = Buttons[i];
- if (b->hwnd) {
- DestroyWindow(b->hwnd);
- b->CreateWnd();
+ {
+ mir_cslock lck(csButtonsHook);
+ for (int i = 0; i < Buttons.getCount(); i++) {
+ TopButtonInt *b = Buttons[i];
+ if (b->hwnd) {
+ DestroyWindow(b->hwnd);
+ b->CreateWnd();
+ }
}
}
+
+ if (g_ctrl->hWnd)
+ PostMessage(g_ctrl->hWnd, TTB_UPDATEFRAMEVISIBILITY, TRUE, 0);
}
/////////////////////////////////////////////////////////////////////////////////////////
|