summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-03-07 18:48:03 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-03-07 22:40:54 +0300
commitfab3905d91890102046dcc4554721991ae8ff413 (patch)
tree7514ac3e6739bf09447e9ff5c0926fee7bfe8155 /plugins
parent4138d31dd4609d4c29e7bd0dd8dcdedf5f3245b6 (diff)
Skin_GetProtoIcon - new function to retrieve status icon's handle
Diffstat (limited to 'plugins')
-rw-r--r--plugins/CountryFlags/src/extraimg.cpp2
-rw-r--r--plugins/FavContacts/src/services.cpp2
-rw-r--r--plugins/FingerprintNG/src/fingerprint.cpp2
-rw-r--r--plugins/HistorySweeperLight/src/main.cpp14
-rw-r--r--plugins/HistorySweeperLight/src/options.cpp12
-rw-r--r--plugins/MessageState/src/messagestate.cpp6
-rw-r--r--plugins/MirOTR/src/svcs_srmm.cpp2
-rwxr-xr-xplugins/New_GPG/src/init.cpp4
-rw-r--r--plugins/NoHistory/src/dllmain.cpp4
-rw-r--r--plugins/Popup/src/srmm_menu.cpp8
-rw-r--r--plugins/SecureIM/src/svcs_srmm.cpp8
-rw-r--r--plugins/SpellChecker/src/spellchecker.cpp4
-rw-r--r--plugins/TabSRMM/src/controls.cpp4
-rw-r--r--plugins/UserInfoEx/src/Flags/svc_flags.cpp2
14 files changed, 37 insertions, 37 deletions
diff --git a/plugins/CountryFlags/src/extraimg.cpp b/plugins/CountryFlags/src/extraimg.cpp
index 30edfe8e27..90f48993e6 100644
--- a/plugins/CountryFlags/src/extraimg.cpp
+++ b/plugins/CountryFlags/src/extraimg.cpp
@@ -95,7 +95,7 @@ static void __fastcall SetStatusIcon(MCONTACT hContact,int countryNumber)
if (countryNumber != 0xFFFF || bUseUnknown) {
/* copy icon as status icon API will call DestroyIcon() on it */
sid.hIcon = LoadFlagIcon(countryNumber);
- sid.szTooltip = (char*) CallService(MS_UTILS_GETCOUNTRYBYNUMBER,countryNumber,0);
+ sid.szTooltip.a = (char*) CallService(MS_UTILS_GETCOUNTRYBYNUMBER,countryNumber,0);
}
else sid.flags = MBF_HIDDEN;
diff --git a/plugins/FavContacts/src/services.cpp b/plugins/FavContacts/src/services.cpp
index 70418fd155..b6f1f8d52b 100644
--- a/plugins/FavContacts/src/services.cpp
+++ b/plugins/FavContacts/src/services.cpp
@@ -150,7 +150,7 @@ int ProcessModulesLoaded(WPARAM, LPARAM)
StatusIconData sid = {};
sid.szModule = MODULENAME;
- sid.szTooltip = LPGEN("Favorite Contacts");
+ sid.szTooltip.a = LPGEN("Favorite Contacts");
sid.hIcon = IcoLib_GetIconByHandle(iconList[0].hIcolib);
sid.hIconDisabled = IcoLib_GetIconByHandle(iconList[1].hIcolib);
Srmm_AddIcon(&sid, &g_plugin);
diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp
index fa13019856..cc5d58d3f2 100644
--- a/plugins/FingerprintNG/src/fingerprint.cpp
+++ b/plugins/FingerprintNG/src/fingerprint.cpp
@@ -151,7 +151,7 @@ static void SetSrmmIcon(MCONTACT hContact, LPTSTR ptszMirver)
sid.szModule = MODULENAME;
sid.dwId = 1;
sid.flags = MBF_UNICODE;
- sid.tszTooltip = ptszMirver;
+ sid.szTooltip.w = ptszMirver;
if (mir_wstrlen(ptszMirver))
sid.hIcon = (HICON)ServiceGetClientIconW((WPARAM)ptszMirver, TRUE);
diff --git a/plugins/HistorySweeperLight/src/main.cpp b/plugins/HistorySweeperLight/src/main.cpp
index 04c3164429..b33612d569 100644
--- a/plugins/HistorySweeperLight/src/main.cpp
+++ b/plugins/HistorySweeperLight/src/main.cpp
@@ -79,32 +79,32 @@ static int OnModulesLoaded(WPARAM, LPARAM)
sid.hIcon = LoadIconEx("actG");
if (sweep == 0)
- sid.szTooltip = LPGEN("Keep all events");
+ sid.szTooltip.a = LPGEN("Keep all events");
else if (sweep == 1)
- sid.szTooltip = time_stamp_strings[g_plugin.getByte("StartupShutdownOlder", 0)];
+ sid.szTooltip.a = time_stamp_strings[g_plugin.getByte("StartupShutdownOlder", 0)];
else if (sweep == 2)
- sid.szTooltip = keep_strings[g_plugin.getByte("StartupShutdownKeep", 0)];
+ sid.szTooltip.a = keep_strings[g_plugin.getByte("StartupShutdownKeep", 0)];
else if (sweep == 3)
- sid.szTooltip = LPGEN("Delete all events");
+ sid.szTooltip.a = LPGEN("Delete all events");
sid.flags = MBF_HIDDEN;
Srmm_AddIcon(&sid, &g_plugin);
sid.dwId = 1;
sid.hIcon = LoadIconEx("act1");
- sid.szTooltip = time_stamp_strings[g_plugin.getByte("StartupShutdownOlder", 0)];
+ sid.szTooltip.a = time_stamp_strings[g_plugin.getByte("StartupShutdownOlder", 0)];
sid.flags = MBF_HIDDEN;
Srmm_AddIcon(&sid, &g_plugin);
sid.dwId = 2;
sid.hIcon = LoadIconEx("act2");
- sid.szTooltip = keep_strings[g_plugin.getByte("StartupShutdownKeep", 0)];
+ sid.szTooltip.a = keep_strings[g_plugin.getByte("StartupShutdownKeep", 0)];
sid.flags = MBF_HIDDEN;
Srmm_AddIcon(&sid, &g_plugin);
sid.dwId = 3;
sid.hIcon = LoadIconEx("actDel");
- sid.szTooltip = LPGEN("Delete all events");
+ sid.szTooltip.a = LPGEN("Delete all events");
sid.flags = MBF_HIDDEN;
Srmm_AddIcon(&sid, &g_plugin);
diff --git a/plugins/HistorySweeperLight/src/options.cpp b/plugins/HistorySweeperLight/src/options.cpp
index e8fd5fdffa..314cfb43d1 100644
--- a/plugins/HistorySweeperLight/src/options.cpp
+++ b/plugins/HistorySweeperLight/src/options.cpp
@@ -168,20 +168,20 @@ void SaveSettings(HWND hwndDlg)
sid.szModule = MODULENAME;
sid.dwId = 0;
sid.hIcon = LoadIconEx("actG");
- if (st == 0) sid.szTooltip = LPGEN("Keep all events");
- else if (st == 1) sid.szTooltip = LPGEN(time_stamp_strings[g_plugin.getByte("StartupShutdownOlder", 0)]);
- else if (st == 2) sid.szTooltip = LPGEN(keep_strings[g_plugin.getByte("StartupShutdownKeep", 0)]);
- else if (st == 3) sid.szTooltip = LPGEN("Delete all events");
+ if (st == 0) sid.szTooltip.a = LPGEN("Keep all events");
+ else if (st == 1) sid.szTooltip.a = LPGEN(time_stamp_strings[g_plugin.getByte("StartupShutdownOlder", 0)]);
+ else if (st == 2) sid.szTooltip.a = LPGEN(keep_strings[g_plugin.getByte("StartupShutdownKeep", 0)]);
+ else if (st == 3) sid.szTooltip.a = LPGEN("Delete all events");
Srmm_ModifyIcon(NULL, &sid);
sid.dwId = 1;
sid.hIcon = LoadIconEx("act1");
- sid.szTooltip = time_stamp_strings[g_plugin.getByte("StartupShutdownOlder", 0)];
+ sid.szTooltip.a = time_stamp_strings[g_plugin.getByte("StartupShutdownOlder", 0)];
Srmm_ModifyIcon(NULL, &sid);
sid.dwId = 2;
sid.hIcon = LoadIconEx("act2");
- sid.szTooltip = keep_strings[g_plugin.getByte("StartupShutdownKeep", 0)];
+ sid.szTooltip.a = keep_strings[g_plugin.getByte("StartupShutdownKeep", 0)];
Srmm_ModifyIcon(NULL, &sid);
}
diff --git a/plugins/MessageState/src/messagestate.cpp b/plugins/MessageState/src/messagestate.cpp
index c0ce9dd49d..0e52b1d5ad 100644
--- a/plugins/MessageState/src/messagestate.cpp
+++ b/plugins/MessageState/src/messagestate.cpp
@@ -37,11 +37,11 @@ void SetSRMMIcon(MCONTACT hContact, SRMM_ICON_TYPE type, time_t time)
if (g_plugin.getDword(hActualContact, DBKEY_MESSAGE_READ_TIME_TYPE, -1) == MRD_TYPE_READTIME) {
wchar_t buf[100];
wcsftime(buf, _countof(buf), TranslateT("Last message read at %X %x"), localtime(&time));
- sid.tszTooltip = buf;
+ sid.szTooltip.w = buf;
}
- else sid.tszTooltip = TranslateT("Last message read (unknown time)");
+ else sid.szTooltip.w = TranslateT("Last message read (unknown time)");
}
- else sid.tszTooltip = TranslateW(Tooltips[type]);
+ else sid.szTooltip.w = TranslateW(Tooltips[type]);
}
else sid.flags |= MBF_HIDDEN;
diff --git a/plugins/MirOTR/src/svcs_srmm.cpp b/plugins/MirOTR/src/svcs_srmm.cpp
index c4855a842a..5e006e7841 100644
--- a/plugins/MirOTR/src/svcs_srmm.cpp
+++ b/plugins/MirOTR/src/svcs_srmm.cpp
@@ -120,7 +120,7 @@ void InitSRMM()
sid.hIcon = hIconFinished;
sid.hIconDisabled = hIconNotSecure;
sid.flags = MBF_DISABLED | MBF_HIDDEN;
- sid.szTooltip = LANG_OTR_TOOLTIP;
+ sid.szTooltip.a = LANG_OTR_TOOLTIP;
Srmm_AddIcon(&sid, &g_plugin);
sid.dwId = 1;
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp
index 5bf6631a74..673702f33a 100755
--- a/plugins/New_GPG/src/init.cpp
+++ b/plugins/New_GPG/src/init.cpp
@@ -113,12 +113,12 @@ static int OnModulesLoaded(WPARAM, LPARAM)
sid.flags = MBF_HIDDEN;
sid.dwId = 0x00000001;
sid.hIcon = IcoLib_GetIcon("secured");
- sid.szTooltip = LPGEN("GPG Turn off encryption");
+ sid.szTooltip.a = LPGEN("GPG Turn off encryption");
Srmm_AddIcon(&sid, &g_plugin);
sid.dwId = 0x00000002;
sid.hIcon = IcoLib_GetIcon("unsecured");
- sid.szTooltip = LPGEN("GPG Turn on encryption");
+ sid.szTooltip.a = LPGEN("GPG Turn on encryption");
Srmm_AddIcon(&sid, &g_plugin);
if (globals.bJabberAPI) {
diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp
index f26ddc02e6..4197106333 100644
--- a/plugins/NoHistory/src/dllmain.cpp
+++ b/plugins/NoHistory/src/dllmain.cpp
@@ -220,12 +220,12 @@ void SrmmMenu_Load()
sid.szModule = MODULENAME;
sid.dwId = 0;
- sid.szTooltip = LPGEN("History Enabled");
+ sid.szTooltip.a = LPGEN("History Enabled");
sid.hIcon = sid.hIconDisabled = hIconKeep;
Srmm_AddIcon(&sid, &g_plugin);
sid.dwId = 1;
- sid.szTooltip = LPGEN("History Disabled");
+ sid.szTooltip.a = LPGEN("History Disabled");
sid.hIcon = sid.hIconDisabled = hIconRemove;
Srmm_AddIcon(&sid, &g_plugin);
diff --git a/plugins/Popup/src/srmm_menu.cpp b/plugins/Popup/src/srmm_menu.cpp
index 633532f477..a506c82e1c 100644
--- a/plugins/Popup/src/srmm_menu.cpp
+++ b/plugins/Popup/src/srmm_menu.cpp
@@ -108,22 +108,22 @@ void SrmmMenu_Load()
sid.szModule = MODULENAME;
sid.dwId = 0;
- sid.szTooltip = LPGEN("Popup Mode: Auto");
+ sid.szTooltip.a = LPGEN("Popup Mode: Auto");
sid.hIcon = sid.hIconDisabled = Skin_LoadIcon(SKINICON_OTHER_POPUP);
Srmm_AddIcon(&sid, &g_plugin);
sid.dwId = 1;
- sid.szTooltip = LPGEN("Popup Mode: Favorite");
+ sid.szTooltip.a = LPGEN("Popup Mode: Favorite");
sid.hIcon = sid.hIconDisabled = LoadIconEx(IDI_OPT_FAVORITE);
Srmm_AddIcon(&sid, &g_plugin);
sid.dwId = 2;
- sid.szTooltip = LPGEN("Popup Mode: Ignore fullscreen");
+ sid.szTooltip.a = LPGEN("Popup Mode: Ignore fullscreen");
sid.hIcon = sid.hIconDisabled = LoadIconEx(IDI_OPT_FULLSCREEN);
Srmm_AddIcon(&sid, &g_plugin);
sid.dwId = 3;
- sid.szTooltip = LPGEN("Popup Mode: Block contact");
+ sid.szTooltip.a = LPGEN("Popup Mode: Block contact");
sid.hIcon = sid.hIconDisabled = Skin_LoadIcon(SKINICON_OTHER_NOPOPUP);
Srmm_AddIcon(&sid, &g_plugin);
diff --git a/plugins/SecureIM/src/svcs_srmm.cpp b/plugins/SecureIM/src/svcs_srmm.cpp
index 1d9f0f065f..09323c5cd4 100644
--- a/plugins/SecureIM/src/svcs_srmm.cpp
+++ b/plugins/SecureIM/src/svcs_srmm.cpp
@@ -39,28 +39,28 @@ void InitSRMMIcons()
sid.dwId = MODE_NATIVE;
sid.hIcon = mode2icon(MODE_NATIVE | SECURED, 3);
sid.hIconDisabled = mode2icon(MODE_NATIVE, 3);
- sid.szTooltip = LPGEN("SecureIM [Native]");
+ sid.szTooltip.a = LPGEN("SecureIM [Native]");
Srmm_AddIcon(&sid, &g_plugin);
// PGP
sid.dwId = MODE_PGP;
sid.hIcon = mode2icon(MODE_PGP | SECURED, 3);
sid.hIconDisabled = mode2icon(MODE_PGP, 3);
- sid.szTooltip = LPGEN("SecureIM [PGP]");
+ sid.szTooltip.a = LPGEN("SecureIM [PGP]");
Srmm_AddIcon(&sid, &g_plugin);
// GPG
sid.dwId = MODE_GPG;
sid.hIcon = mode2icon(MODE_GPG | SECURED, 3);
sid.hIconDisabled = mode2icon(MODE_GPG, 3);
- sid.szTooltip = LPGEN("SecureIM [GPG]");
+ sid.szTooltip.a = LPGEN("SecureIM [GPG]");
Srmm_AddIcon(&sid, &g_plugin);
// RSAAES
sid.dwId = MODE_RSAAES;
sid.hIcon = mode2icon(MODE_RSAAES | SECURED, 3);
sid.hIconDisabled = mode2icon(MODE_RSAAES, 3);
- sid.szTooltip = LPGEN("SecureIM [RSA/AES]");
+ sid.szTooltip.a = LPGEN("SecureIM [RSA/AES]");
Srmm_AddIcon(&sid, &g_plugin);
// hook the window events so that we can can change the status of the icon
diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp
index 348946325e..0d99fb96b6 100644
--- a/plugins/SpellChecker/src/spellchecker.cpp
+++ b/plugins/SpellChecker/src/spellchecker.cpp
@@ -74,7 +74,7 @@ static int IconsChanged(WPARAM, LPARAM)
wchar_t tmp[128];
mir_snwprintf(tmp, L"%s - %s", TranslateT("Spell Checker"), languages[i]->full_name);
- sid.tszTooltip = tmp;
+ sid.szTooltip.w = tmp;
HICON hIcon = (opts.use_flags) ? IcoLib_GetIconByHandle(languages[i]->hIcolib) : IcoLib_GetIcon("spellchecker_enabled");
sid.hIcon = CopyIcon(hIcon);
@@ -194,7 +194,7 @@ static int ModulesLoaded(WPARAM, LPARAM)
wchar_t tmp[128];
mir_snwprintf(tmp, L"%s - %s", TranslateT("Spell Checker"), languages[i]->full_name);
- sid.tszTooltip = tmp;
+ sid.szTooltip.w = tmp;
sid.hIcon = (opts.use_flags) ? IcoLib_GetIconByHandle(languages[i]->hIcolib) : IcoLib_GetIcon("spellchecker_enabled");
Srmm_AddIcon(&sid, &g_plugin);
}
diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp
index 7a940de17b..5d0a735fd5 100644
--- a/plugins/TabSRMM/src/controls.cpp
+++ b/plugins/TabSRMM/src/controls.cpp
@@ -970,8 +970,8 @@ LONG_PTR CALLBACK CTabBaseDlg::StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM
else if (sid->dwId == MSG_ICON_SESSION)
wcsncpy_s(wBuf, TranslateT("Session list.\nClick left for a list of open sessions.\nClick right to access favorites and quickly configure message window behavior"), _TRUNCATE);
}
- else if (sid->tszTooltip)
- wcsncpy(wBuf, sid->tszTooltip, _countof(wBuf));
+ else if (sid->szTooltip.w)
+ wcsncpy_s(wBuf, sid->szTooltip.w, _TRUNCATE);
if (wBuf[0]) {
CallService("mToolTip/ShowTipW", (WPARAM)wBuf, (LPARAM)&ti);
diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.cpp b/plugins/UserInfoEx/src/Flags/svc_flags.cpp
index 2dbeb04ac8..b17f9faa0b 100644
--- a/plugins/UserInfoEx/src/Flags/svc_flags.cpp
+++ b/plugins/UserInfoEx/src/Flags/svc_flags.cpp
@@ -103,7 +103,7 @@ void MsgWndData::FlagsIconSet()
sid.flags = MBF_HIDDEN;
if (m_countryID != 0xFFFF || g_bUseUnknownFlag) {
sid.hIcon = LoadFlagIcon(m_countryID);
- sid.szTooltip = Translate((char*)CallService(MS_UTILS_GETCOUNTRYBYNUMBER, m_countryID, 0));
+ sid.szTooltip.a = Translate((char*)CallService(MS_UTILS_GETCOUNTRYBYNUMBER, m_countryID, 0));
}
else sid.flags = MBF_HIDDEN;