summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_tbbutton.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-10 11:51:00 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-10 11:51:00 +0000
commit03758f8f918f392386a1dd7a1c7a795927f8c221 (patch)
treedc4dede8653397df0275f49e730b0d44605d7a7c /plugins/Clist_modern/src/modern_tbbutton.cpp
parent1416051048756ab769de52ab5eb67a31e41524fd (diff)
- ME_TTB_INITBUTTONS event considered useless;
- clist_modern & clist_nicer are trained to reload TTB buttons when TopToolBar plugin is loaded dynamically; - TTB processing code slightly reordered git-svn-id: http://svn.miranda-ng.org/main/trunk@3953 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_tbbutton.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_tbbutton.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/plugins/Clist_modern/src/modern_tbbutton.cpp b/plugins/Clist_modern/src/modern_tbbutton.cpp
index 9a797411ec..d8f697ee3a 100644
--- a/plugins/Clist_modern/src/modern_tbbutton.cpp
+++ b/plugins/Clist_modern/src/modern_tbbutton.cpp
@@ -463,7 +463,9 @@ void MakeButtonSkinned(HWND hWnd)
WindowList_Add(hButtonWindowList, hWnd, NULL);
}
-static void CustomizeButton(HANDLE ttbid, HWND hWnd, LPARAM lParam)
+/////////////////////////////////////////////////////////////////////////////////////////
+
+void CustomizeButton(HANDLE ttbid, HWND hWnd, LPARAM lParam)
{
if (ttbid == TTB_WINDOW_HANDLE) {
CustomizeToolbar(hWnd);
@@ -473,19 +475,13 @@ static void CustomizeButton(HANDLE ttbid, HWND hWnd, LPARAM lParam)
MakeButtonSkinned(hWnd);
TBBUTTONDATA* p = (TBBUTTONDATA*)GetWindowLongPtr(hWnd, 0);
- p->szButtonID, "Toolbar.MissingID";
+ p->szButtonID = "Toolbar.MissingID";
p->ttbID = ttbid;
SendMessage(hWnd, MBM_UPDATETRANSPARENTFLAG, 0, 2);
}
/////////////////////////////////////////////////////////////////////////////////////////
-int Buttons_ModuleLoaded(WPARAM wParam, LPARAM lParam)
-{
- TopToolbar_SetCustomProc(CustomizeButton, 0);
- return 0;
-}
-
int Buttons_OnSkinModeSettingsChanged(WPARAM wParam, LPARAM lParam)
{
WindowList_BroadcastAsync(hButtonWindowList, MBM_UPDATETRANSPARENTFLAG, 0, 2);
@@ -494,8 +490,6 @@ int Buttons_OnSkinModeSettingsChanged(WPARAM wParam, LPARAM lParam)
HRESULT ToolbarButtonLoadModule()
{
- HookEvent(ME_SYSTEM_MODULESLOADED, Buttons_ModuleLoaded);
-
hButtonWindowList = (HANDLE) CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0);
hIconChangedHook = HookEvent(ME_SKIN2_ICONSCHANGED,OnIconLibIconChanged);
hBkgChangedHook = HookEvent(ME_BACKGROUNDCONFIG_CHANGED,Buttons_OnSkinModeSettingsChanged);