diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Clist_modern/src/modern_toolbar.cpp | 3 | ||||
-rw-r--r-- | plugins/TopToolBar/src/toolbar.cpp | 6 | ||||
-rw-r--r-- | plugins/TopToolBar/src/toolbarwnd.cpp | 19 | ||||
-rw-r--r-- | plugins/TopToolBar/src/ttbopt.cpp | 2 |
4 files changed, 11 insertions, 19 deletions
diff --git a/plugins/Clist_modern/src/modern_toolbar.cpp b/plugins/Clist_modern/src/modern_toolbar.cpp index f4bb35f70e..486cfe8a78 100644 --- a/plugins/Clist_modern/src/modern_toolbar.cpp +++ b/plugins/Clist_modern/src/modern_toolbar.cpp @@ -291,8 +291,7 @@ void CustomizeToolbar(HWND hwnd) ModernToolbarCtrl* pMTBInfo = (ModernToolbarCtrl*)GetWindowLongPtr(hwnd, 0);
- CLISTFrame Frame = { 0 };
- Frame.cbSize = sizeof(Frame);
+ CLISTFrame Frame = { sizeof(Frame) };
Frame.tname = _T("Toolbar");
Frame.hWnd = hwnd;
Frame.align = alTop;
diff --git a/plugins/TopToolBar/src/toolbar.cpp b/plugins/TopToolBar/src/toolbar.cpp index dde3ee5134..eabd252d17 100644 --- a/plugins/TopToolBar/src/toolbar.cpp +++ b/plugins/TopToolBar/src/toolbar.cpp @@ -538,7 +538,7 @@ int OnIconChange(WPARAM wParam, LPARAM lParam) if (g_ctrl->hWnd) {
g_ctrl->bOrderChanged = true;
- PostMessage(g_ctrl->hWnd, TTB_UPDATEFRAMEVISIBILITY, TRUE, 0);
+ PostMessage(g_ctrl->hWnd, TTB_UPDATEFRAMEVISIBILITY, 0, 0);
}
return 0;
@@ -564,7 +564,7 @@ int OnPluginLoad(WPARAM wParam, LPARAM lParam) {
CallPluginEventHook((HINSTANCE)lParam, hTTBModuleLoaded, 0, 0);
if (g_ctrl->hWnd && g_ctrl->bOrderChanged)
- PostMessage(g_ctrl->hWnd, TTB_UPDATEFRAMEVISIBILITY, TRUE, 0);
+ PostMessage(g_ctrl->hWnd, TTB_UPDATEFRAMEVISIBILITY, 0, 0);
return 0;
}
@@ -587,7 +587,7 @@ int OnPluginUnload(WPARAM wParam, LPARAM lParam) if (bNeedUpdate) {
ArrangeButtons();
if (g_ctrl->hWnd)
- PostMessage(g_ctrl->hWnd, TTB_UPDATEFRAMEVISIBILITY, TRUE, 0);
+ PostMessage(g_ctrl->hWnd, TTB_UPDATEFRAMEVISIBILITY, 0, 0);
}
}
return 0;
diff --git a/plugins/TopToolBar/src/toolbarwnd.cpp b/plugins/TopToolBar/src/toolbarwnd.cpp index c4a3dc993f..99793040d4 100644 --- a/plugins/TopToolBar/src/toolbarwnd.cpp +++ b/plugins/TopToolBar/src/toolbarwnd.cpp @@ -124,7 +124,7 @@ LRESULT CALLBACK TopToolBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara switch(msg) {
case WM_CREATE:
g_ctrl->hWnd = hwnd;
- PostMessage(hwnd, TTB_UPDATEFRAMEVISIBILITY, 1, 0);
+ PostMessage(hwnd, TTB_UPDATEFRAMEVISIBILITY, 0, 0);
return FALSE;
case WM_DESTROY:
@@ -154,7 +154,7 @@ LRESULT CALLBACK TopToolBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara GetClientRect(g_ctrl->hWnd, &rcClient);
if (rcClient.bottom - rcClient.top != iHeight && iHeight) {
supressRepos = true;
- PostMessage(hwnd, TTB_UPDATEFRAMEVISIBILITY, -1, 0);
+ PostMessage(hwnd, TTB_UPDATEFRAMEVISIBILITY, 0, 0);
}
}
return 0;
@@ -208,12 +208,10 @@ LRESULT CALLBACK TopToolBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara case TTB_UPDATEFRAMEVISIBILITY:
{
- BOOL vis=(BOOL)wParam;
- BOOL curvis = IsWindowVisible(hwnd);
bool bResize = false;
- int Height = ArrangeButtons();
if (g_ctrl->bAutoSize) {
+ int Height = ArrangeButtons();
INT_PTR frameopt = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM(FO_HEIGHT, g_ctrl->hFrame), 0);
if (Height != frameopt) {
CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_HEIGHT, g_ctrl->hFrame), Height);
@@ -224,12 +222,8 @@ 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;
- frameopt |= vis ? F_VISIBLE : 0;
- CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS, g_ctrl->hFrame), frameopt);
- }
+ if (bResize)
+ CallService(MS_CLIST_FRAMES_UPDATEFRAME, (WPARAM)g_ctrl->hFrame, FU_FMPOS);
}
break;
@@ -288,8 +282,7 @@ INT_PTR OnEventFire(WPARAM wParam, LPARAM lParam) // if there's no customized frames, create our own
if (g_ctrl->hFrame == NULL) {
- CLISTFrame Frame = { 0 };
- Frame.cbSize = sizeof(Frame);
+ CLISTFrame Frame = { sizeof(Frame) };
Frame.tname = _T("Toolbar");
Frame.hWnd = g_ctrl->hWnd;
Frame.align = alTop;
diff --git a/plugins/TopToolBar/src/ttbopt.cpp b/plugins/TopToolBar/src/ttbopt.cpp index 8ce57aea76..5055ae2639 100644 --- a/plugins/TopToolBar/src/ttbopt.cpp +++ b/plugins/TopToolBar/src/ttbopt.cpp @@ -141,7 +141,7 @@ static void RecreateWindows() }
if (g_ctrl->hWnd)
- PostMessage(g_ctrl->hWnd, TTB_UPDATEFRAMEVISIBILITY, TRUE, 0);
+ PostMessage(g_ctrl->hWnd, TTB_UPDATEFRAMEVISIBILITY, 0, 0);
}
/////////////////////////////////////////////////////////////////////////////////////////
|