From 6c2ab603d2456c41ec977fb3fc18666439a10785 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 12 Jul 2012 06:20:51 +0000 Subject: - 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 --- plugins/TopToolBar/toolbarwnd.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'plugins/TopToolBar/toolbarwnd.cpp') diff --git a/plugins/TopToolBar/toolbarwnd.cpp b/plugins/TopToolBar/toolbarwnd.cpp index 31cf435935..d082464b4f 100644 --- a/plugins/TopToolBar/toolbarwnd.cpp +++ b/plugins/TopToolBar/toolbarwnd.cpp @@ -163,7 +163,7 @@ LRESULT CALLBACK TopToolBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara return 0; case WM_LBUTTONDOWN: - if (DBGetContactSettingByte(NULL, "CLUI", "ClientAreaDrag", 0)) { + if (db_get_b(NULL, "CLUI", "ClientAreaDrag", 0)) { POINT pt; GetCursorPos(&pt); return SendMessage(GetParent(hwnd), WM_SYSCOMMAND, SC_MOVE|HTCAPTION, MAKELPARAM(pt.x, pt.y)); @@ -217,6 +217,9 @@ LRESULT CALLBACK TopToolBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara } } + if (g_ctrl->bOrderChanged) + bResize = TRUE, g_ctrl->bOrderChanged = FALSE; + if ((curvis != vis || bResize) && vis != -1) { INT_PTR frameopt = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS, g_ctrl->hFrame), 0); frameopt &= ~F_VISIBLE; @@ -308,7 +311,7 @@ int LoadBackgroundOptions() hBmpBackground = NULL; } - if (DBGetContactSettingByte(NULL, TTB_OPTDIR, "UseBitmap", TTBDEFAULT_USEBITMAP)) { + if (db_get_b(NULL, TTB_OPTDIR, "UseBitmap", TTBDEFAULT_USEBITMAP)) { DBVARIANT dbv; if (!DBGetContactSetting(NULL, TTB_OPTDIR, "BkBitmap", &dbv)) { hBmpBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAP, 0, (LPARAM)dbv.pszVal); -- cgit v1.2.3