summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/res/resource.rc3
-rw-r--r--src/mir_app/src/resource.h1
-rw-r--r--src/mir_app/src/srmm_toolbar.cpp25
-rw-r--r--src/mir_core/src/ui_utils.cpp4
4 files changed, 15 insertions, 18 deletions
diff --git a/src/mir_app/res/resource.rc b/src/mir_app/res/resource.rc
index e994096bb2..a894fa8a71 100644
--- a/src/mir_app/res/resource.rc
+++ b/src/mir_app/res/resource.rc
@@ -800,10 +800,11 @@ BEGIN
PUSHBUTTON "Reset",IDC_BBRESET,250,211,53,15
CONTROL "Show in IM chats",IDC_IMCHECK,"Button",BS_AUTOCHECKBOX | BS_VCENTER | BS_MULTILINE | WS_TABSTOP,4,181,127,12
CONTROL "Show in chat rooms",IDC_CHATCHECK,"Button",BS_AUTOCHECKBOX | BS_VCENTER | BS_MULTILINE | WS_TABSTOP,4,196,127,12
+ EDITTEXT IDC_EDIT1,252,183,32,12,ES_AUTOHSCROLL
CONTROL "",IDC_SPIN1,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_GROUP,272,183,11,12
RTEXT "Gap between buttons:",IDC_STATIC,136,183,104,12,SS_CENTERIMAGE
CONTROL "Hide if there isn't enough space",IDC_CANBEHIDDEN,
- "Button",BS_AUTOCHECKBOX | BS_VCENTER | BS_MULTILINE | WS_TABSTOP,4,209,131,17
+ "Button",BS_AUTOCHECKBOX | BS_VCENTER | BS_MULTILINE | WS_TABSTOP,4,211,127,12
PUSHBUTTON "Insert separator",IDC_SEPARATOR,137,211,103,15,BS_MULTILINE
END
diff --git a/src/mir_app/src/resource.h b/src/mir_app/src/resource.h
index eb56125575..d7d616a911 100644
--- a/src/mir_app/src/resource.h
+++ b/src/mir_app/src/resource.h
@@ -286,6 +286,7 @@
#define IDC_CANBEHIDDEN 1102
#define IDC_SPIN1 1103
#define IDC_SEPARATOR 1104
+#define IDC_EDIT1 1105
#define IDC_BUILDTIME 1108
#define IDC_CREDITSFILE 1109
#define IDC_NUMBER 1113
diff --git a/src/mir_app/src/srmm_toolbar.cpp b/src/mir_app/src/srmm_toolbar.cpp
index 8cc0d224b4..4858eba251 100644
--- a/src/mir_app/src/srmm_toolbar.cpp
+++ b/src/mir_app/src/srmm_toolbar.cpp
@@ -543,6 +543,7 @@ public:
m_toolBar.SetFlags(MTREE_DND); // enable drag-n-drop
m_toolBar.OnSelChanged = Callback(this, &CSrmmToolbarOptions::OnTreeSelChanged);
m_toolBar.OnSelChanging = Callback(this, &CSrmmToolbarOptions::OnTreeSelChanging);
+ m_toolBar.OnChange = Callback(this, &CSrmmToolbarOptions::OnTreeChanged);
m_btnReset.OnClick = Callback(this, &CSrmmToolbarOptions::btnResetClicked);
m_btnSeparator.OnClick = Callback(this, &CSrmmToolbarOptions::btnSeparatorClicked);
@@ -695,24 +696,14 @@ public:
m_btnHidden.Enable(); m_btnHidden.SetState(cbd->m_bCanBeHidden);
}
- void OnTreeClicked(void*)
+ void OnTreeChanged(void*)
{
- TVHITTESTINFO hti = { 0 };
- GetCursorPos(&hti.pt);
- ScreenToClient(m_toolBar.GetHwnd(), &hti.pt);
- if (m_toolBar.HitTest(&hti)) {
- if (hti.flags & TVHT_ONITEMSTATEICON) {
- NotifyChange();
- int iNewState = m_toolBar.GetCheckState(hti.hItem);
- m_btnIM.Enable(iNewState);
- m_btnChat.Enable(iNewState);
- m_btnHidden.Enable(iNewState);
- if (iNewState)
- m_btnIM.SetState(true);
-
- m_toolBar.SelectItem(hti.hItem);
- }
- }
+ int iNewState = !m_toolBar.GetCheckState(m_toolBar.GetSelection());
+ m_btnIM.Enable(iNewState);
+ m_btnChat.Enable(iNewState);
+ m_btnHidden.Enable(iNewState);
+ if (iNewState)
+ m_btnIM.SetState(true);
}
};
diff --git a/src/mir_core/src/ui_utils.cpp b/src/mir_core/src/ui_utils.cpp
index 2c09dc9613..00917d9a8f 100644
--- a/src/mir_core/src/ui_utils.cpp
+++ b/src/mir_core/src/ui_utils.cpp
@@ -1739,6 +1739,7 @@ BOOL CCtrlTreeView::OnNotify(int, NMHDR *pnmh)
if (evt.nmtvkey->wVKey == VK_SPACE) {
if (m_bCheckBox)
InvertCheck(GetSelection());
+ OnChange(this);
NotifyChange();
}
@@ -1757,6 +1758,7 @@ BOOL CCtrlTreeView::OnNotify(int, NMHDR *pnmh)
InvertCheck(hti.hItem);
else
SelectItem(hti.hItem);
+ OnChange(this);
NotifyChange();
}
}
@@ -1775,6 +1777,8 @@ void CCtrlTreeView::InvertCheck(HTREEITEM hItem)
tvi.iImage = tvi.iSelectedImage = !tvi.iImage;
SetItem(&tvi);
+
+ SelectItem(hItem);
}
void CCtrlTreeView::TranslateItem(HTREEITEM hItem)