diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-03 20:06:38 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-03 20:06:45 +0300 |
commit | 7c41ab39dd92e9e7961615dcd19c0ffcc260f62b (patch) | |
tree | 602bc81eebe9964a09fd2074c041a5d0ba9448e4 | |
parent | 37084d97eb177beb613fb15ca104f86de4ff1584 (diff) |
we shall create missing icons (or destroy unneeded ones) after applying toolbar options
-rw-r--r-- | include/m_srmm_int.h | 4 | ||||
-rw-r--r-- | src/mir_app/src/srmm_base.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/srmm_toolbar.cpp | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/include/m_srmm_int.h b/include/m_srmm_int.h index 24f8204544..0ded3a9d42 100644 --- a/include/m_srmm_int.h +++ b/include/m_srmm_int.h @@ -95,4 +95,8 @@ EXTERN_C MIR_APP_DLL(void) Srmm_ClickToolbarIcon(MCONTACT hContact, int idFrom, // lParam = 0 (ignored) #define WM_CBD_LOADICONS (WM_CBD_FIRST+3) +// wParam = 0 (ignored) +// lParam = 0 (ignored) +#define WM_CBD_RECREATE (WM_CBD_FIRST+4) + #endif // M_MESSAGE_H__ diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp index 3991b8e324..0275fb1c04 100644 --- a/src/mir_app/src/srmm_base.cpp +++ b/src/mir_app/src/srmm_base.cpp @@ -677,6 +677,10 @@ INT_PTR CSrmmBaseDialog::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) } break; + case WM_CBD_RECREATE: + Srmm_CreateToolbarIcons(m_hwnd, isChat() ? BBBF_ISCHATBUTTON : BBBF_ISIMBUTTON); + break; + case WM_NOTIFY: LPNMHDR hdr = (LPNMHDR)lParam; if (hdr->hwndFrom == m_log.GetHwnd() && hdr->code == EN_LINK) { diff --git a/src/mir_app/src/srmm_toolbar.cpp b/src/mir_app/src/srmm_toolbar.cpp index a92343c2da..f87fdf1376 100644 --- a/src/mir_app/src/srmm_toolbar.cpp +++ b/src/mir_app/src/srmm_toolbar.cpp @@ -434,6 +434,7 @@ static void CB_ReInitCustomButtons() } qsort(arButtonsList.getArray(), arButtonsList.getCount(), sizeof(void*), sstSortButtons); + WindowList_Broadcast(g_hWindowList, WM_CBD_RECREATE, 0, 0); WindowList_Broadcast(g_hWindowList, WM_CBD_UPDATED, 0, 0); WindowList_Broadcast(g_hWindowList, WM_CBD_LOADICONS, 0, 0); } |