summaryrefslogtreecommitdiff
path: root/plugins/NoHistory
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/NoHistory
parentfab3905d91890102046dcc4554721991ae8ff413 (diff)
Srmm_ModifyIcon now changes only tooltip and/or icon, Srmm_SetIconFlags controls flags
Diffstat (limited to 'plugins/NoHistory')
-rw-r--r--plugins/NoHistory/src/dllmain.cpp19
1 files changed, 4 insertions, 15 deletions
diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp
index 4197106333..08412fae4f 100644
--- a/plugins/NoHistory/src/dllmain.cpp
+++ b/plugins/NoHistory/src/dllmain.cpp
@@ -157,14 +157,8 @@ INT_PTR ServiceToggle(WPARAM hContact, LPARAM)
remove = !remove;
g_plugin.setByte(hContact, DBSETTING_REMOVE, remove != 0);
- StatusIconData sid = {};
- sid.szModule = MODULENAME;
-
- for (int i = 0; i < 2; ++i) {
- sid.dwId = i;
- sid.flags = (i == remove) ? 0 : MBF_HIDDEN;
- Srmm_ModifyIcon(hContact, &sid);
- }
+ for (int i = 0; i < 2; ++i)
+ Srmm_SetIconFlags(hContact, MODULENAME, i, (i == remove) ? 0 : MBF_HIDDEN);
return 0;
}
@@ -183,13 +177,8 @@ int WindowEvent(WPARAM, LPARAM lParam)
bool chat_room = (proto && db_get_b(hContact, proto, "ChatRoom", 0) != 0);
int remove = g_plugin.getByte(hContact, DBSETTING_REMOVE) != 0;
- StatusIconData sid = {};
- sid.szModule = MODULENAME;
- for (int i=0; i < 2; ++i) {
- sid.dwId = i;
- sid.flags = (chat_room ? MBF_HIDDEN : (i == remove) ? 0 : MBF_HIDDEN);
- Srmm_ModifyIcon(hContact, &sid);
- }
+ for (int i = 0; i < 2; ++i)
+ Srmm_SetIconFlags(hContact, MODULENAME, i, chat_room ? MBF_HIDDEN : (i == remove) ? 0 : MBF_HIDDEN);
}
return 0;