diff options
author | George Hazan <ghazan@miranda.im> | 2019-03-07 22:38:02 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-03-07 22:40:54 +0300 |
commit | 6712ce9307350ef5c04f184b0cb80cfe75af77c5 (patch) | |
tree | 3baa482fecc7e53c7843e8ae89a6bc6678b0570d /plugins/HistorySweeperLight/src/main.cpp | |
parent | fab3905d91890102046dcc4554721991ae8ff413 (diff) |
Srmm_ModifyIcon now changes only tooltip and/or icon, Srmm_SetIconFlags controls flags
Diffstat (limited to 'plugins/HistorySweeperLight/src/main.cpp')
-rw-r--r-- | plugins/HistorySweeperLight/src/main.cpp | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/plugins/HistorySweeperLight/src/main.cpp b/plugins/HistorySweeperLight/src/main.cpp index b33612d569..7d4ecd5311 100644 --- a/plugins/HistorySweeperLight/src/main.cpp +++ b/plugins/HistorySweeperLight/src/main.cpp @@ -53,19 +53,12 @@ static int OnIconPressed(WPARAM hContact, LPARAM lParam) if (!(sicd->flags & MBCF_RIGHTBUTTON) && !mir_strcmp(sicd->szModule, MODULENAME) && g_plugin.getByte("ChangeInMW", 0)) {
int nh = sicd->dwId;
-
- StatusIconData sid = {};
- sid.szModule = MODULENAME;
- sid.dwId = nh;
- sid.flags = MBF_HIDDEN;
- Srmm_ModifyIcon(hContact, &sid);
+ Srmm_SetIconFlags(hContact, MODULENAME, nh, MBF_HIDDEN);
nh = (nh + 1) % 4;
- g_plugin.setByte(hContact, "SweepHistory", (BYTE)nh);
- sid.dwId = nh;
- sid.flags = 0;
- Srmm_ModifyIcon(hContact, &sid);
+ g_plugin.setByte(hContact, "SweepHistory", (BYTE)nh);
+ Srmm_SetIconFlags(hContact, MODULENAME, nh, 0);
}
return 0;
}
@@ -79,33 +72,30 @@ static int OnModulesLoaded(WPARAM, LPARAM) sid.hIcon = LoadIconEx("actG");
if (sweep == 0)
- sid.szTooltip.a = LPGEN("Keep all events");
+ sid.szTooltip.w = LPGENW("Keep all events");
else if (sweep == 1)
- sid.szTooltip.a = time_stamp_strings[g_plugin.getByte("StartupShutdownOlder", 0)];
+ sid.szTooltip.w = time_stamp_strings[g_plugin.getByte("StartupShutdownOlder", 0)];
else if (sweep == 2)
- sid.szTooltip.a = keep_strings[g_plugin.getByte("StartupShutdownKeep", 0)];
+ sid.szTooltip.w = keep_strings[g_plugin.getByte("StartupShutdownKeep", 0)];
else if (sweep == 3)
- sid.szTooltip.a = LPGEN("Delete all events");
+ sid.szTooltip.w = LPGENW("Delete all events");
- sid.flags = MBF_HIDDEN;
+ sid.flags = MBF_HIDDEN | MBF_UNICODE;
Srmm_AddIcon(&sid, &g_plugin);
sid.dwId = 1;
sid.hIcon = LoadIconEx("act1");
- sid.szTooltip.a = time_stamp_strings[g_plugin.getByte("StartupShutdownOlder", 0)];
- sid.flags = MBF_HIDDEN;
+ sid.szTooltip.w = time_stamp_strings[g_plugin.getByte("StartupShutdownOlder", 0)];
Srmm_AddIcon(&sid, &g_plugin);
sid.dwId = 2;
sid.hIcon = LoadIconEx("act2");
- sid.szTooltip.a = keep_strings[g_plugin.getByte("StartupShutdownKeep", 0)];
- sid.flags = MBF_HIDDEN;
+ sid.szTooltip.w = keep_strings[g_plugin.getByte("StartupShutdownKeep", 0)];
Srmm_AddIcon(&sid, &g_plugin);
sid.dwId = 3;
sid.hIcon = LoadIconEx("actDel");
- sid.szTooltip.a = LPGEN("Delete all events");
- sid.flags = MBF_HIDDEN;
+ sid.szTooltip.w = LPGENW("Delete all events");
Srmm_AddIcon(&sid, &g_plugin);
HookEvent(ME_MSG_WINDOWEVENT, OnWindowEvent);
|