summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/msgdialog.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-03-07 22:38:02 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-03-07 22:40:54 +0300
commit6712ce9307350ef5c04f184b0cb80cfe75af77c5 (patch)
tree3baa482fecc7e53c7843e8ae89a6bc6678b0570d /plugins/Scriver/src/msgdialog.cpp
parentfab3905d91890102046dcc4554721991ae8ff413 (diff)
Srmm_ModifyIcon now changes only tooltip and/or icon, Srmm_SetIconFlags controls flags
Diffstat (limited to 'plugins/Scriver/src/msgdialog.cpp')
-rw-r--r--plugins/Scriver/src/msgdialog.cpp23
1 files changed, 7 insertions, 16 deletions
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 2abee8259e..91db9a165a 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -769,17 +769,13 @@ void CSrmmWindow::UpdateStatusBar()
SendMessage(m_hwndParent, CM_UPDATESTATUSBAR, (WPARAM)&sbd, (LPARAM)m_hwnd);
UpdateReadChars();
- StatusIconData sid = {};
- sid.szModule = SRMM_MODULE;
- sid.flags = MBF_DISABLED;
- Srmm_ModifyIcon(m_hContact, &sid);
- sid.dwId = 1;
- if (IsTypingNotificationSupported() && g_dat.flags2 & SMF2_SHOWTYPINGSWITCH)
- sid.flags = (g_plugin.getByte(m_hContact, SRMSGSET_TYPING, g_plugin.getByte(SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW))) ? 0 : MBF_DISABLED;
- else
- sid.flags = MBF_HIDDEN;
+ Srmm_SetIconFlags(m_hContact, SRMM_MODULE, 0, MBF_DISABLED);
- Srmm_ModifyIcon(m_hContact, &sid);
+ if (IsTypingNotificationSupported() && g_dat.flags2 & SMF2_SHOWTYPINGSWITCH) {
+ int mode = g_plugin.getByte(m_hContact, SRMSGSET_TYPING, g_plugin.getByte(SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW));
+ Srmm_SetIconFlags(m_hContact, SRMM_MODULE, 1, mode ? 0 : MBF_DISABLED);
+ }
+ else Srmm_SetIconFlags(m_hContact, SRMM_MODULE, 1, MBF_HIDDEN);
}
}
@@ -1273,14 +1269,9 @@ INT_PTR CSrmmWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
case DM_SWITCHTYPING:
if (IsTypingNotificationSupported()) {
- StatusIconData sid = {};
- sid.szModule = SRMM_MODULE;
- sid.dwId = 1;
-
BYTE typingNotify = (g_plugin.getByte(m_hContact, SRMSGSET_TYPING, g_plugin.getByte(SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW)));
g_plugin.setByte(m_hContact, SRMSGSET_TYPING, (BYTE)!typingNotify);
- sid.flags = typingNotify ? MBF_DISABLED : 0;
- Srmm_ModifyIcon(m_hContact, &sid);
+ Srmm_SetIconFlags(m_hContact, SRMM_MODULE, 1, typingNotify ? MBF_DISABLED : 0);
}
break;