diff options
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/srmm_toolbar.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/mir_app/src/srmm_toolbar.cpp b/src/mir_app/src/srmm_toolbar.cpp index bddeef51d4..0cf41733ea 100644 --- a/src/mir_app/src/srmm_toolbar.cpp +++ b/src/mir_app/src/srmm_toolbar.cpp @@ -221,16 +221,23 @@ MIR_APP_DLL(void) Srmm_ClickToolbarIcon(MCONTACT hContact, int idFrom, HWND hwnd /////////////////////////////////////////////////////////////////////////////////////////
+static void disablePush(CCtrlButton &btn)
+{
+ if (btn.IsPushed()) {
+ btn.Push(false);
+ btn.Click();
+ }
+}
+
void CSrmmBaseDialog::ProcessToolbarHotkey(INT_PTR iButtonFrom)
{
switch (iButtonFrom) {
case SRMM_HK_CLEAR:
- m_btnBold.Push(false); m_btnBold.Click();
- m_btnItalic.Push(false); m_btnItalic.Click();
- m_btnUnderline.Push(false); m_btnUnderline.Click();
-
- m_btnColor.Push(false); m_btnColor.Click();
- m_btnBkColor.Push(false); m_btnBkColor.Click();
+ disablePush(m_btnBold);
+ disablePush(m_btnItalic);
+ disablePush(m_btnUnderline);
+ disablePush(m_btnColor);
+ disablePush(m_btnBkColor);
break;
case SRMM_HK_BOLD:
|