summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2016-12-19 15:30:57 +0300
committerGeorge Hazan <ghazan@miranda.im>2016-12-19 15:30:57 +0300
commitb95a789fc6c46eb3b56011946b259fe57159d69c (patch)
treeccff9ac7c8dbf411f5d9243924e2f39b829cd5e6 /src/mir_app
parent8938b3ee67fb60553864a019fdb2f22d734f3120 (diff)
- fix for clicking Apply in Options - Message sessions - Toolbar;
- duplicated code removed
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/srmm_toolbar.cpp20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/mir_app/src/srmm_toolbar.cpp b/src/mir_app/src/srmm_toolbar.cpp
index 9fcdfaecfc..0f5f941041 100644
--- a/src/mir_app/src/srmm_toolbar.cpp
+++ b/src/mir_app/src/srmm_toolbar.cpp
@@ -605,24 +605,8 @@ public:
virtual void OnApply() override
{
- HTREEITEM hItem = m_toolBar.GetSelection();
- if (hItem) {
- TVITEMEX tvi;
- tvi.mask = TVIF_HANDLE | TVIF_PARAM;
- tvi.hItem = hItem;
- m_toolBar.GetItem(&tvi);
-
- if (tvi.lParam) {
- CustomButtonData *cbd = (CustomButtonData*)tvi.lParam;
- if (cbd) {
- cbd->m_bIMButton = m_btnIM.Enabled() != 0;
- cbd->m_bChatButton = m_btnChat.Enabled() != 0;
- cbd->m_bCanBeHidden = m_btnHidden.Enabled() != 0;
- }
- }
- }
-
- SaveTree();
+ OnTreeSelChanging(NULL); // save latest changes
+ SaveTree(); // save the whole tree then
CB_ReInitCustomButtons();
WORD newGap = m_gap.GetPosition();