summaryrefslogtreecommitdiff
path: root/plugins/SpellChecker
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-11 16:47:12 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-11 16:47:12 +0000
commit52fe3f7be13509bd336c5efa28b8310a23211034 (patch)
tree70e0948e92b71cd09367545f9655dc343c5cc862 /plugins/SpellChecker
parentfa837bfbc2a705947b14f1ce8ba36d996bb11104 (diff)
- Srmm_ModifyIcon helper applied instead of CallService(MS_MSG_MODIFYICON)
- various fixes related to SRMM icons; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@4426 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SpellChecker')
-rw-r--r--plugins/SpellChecker/src/spellchecker.cpp30
-rw-r--r--plugins/SpellChecker/src/utils.cpp21
2 files changed, 23 insertions, 28 deletions
diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp
index 3a0d162706..f932eac92b 100644
--- a/plugins/SpellChecker/src/spellchecker.cpp
+++ b/plugins/SpellChecker/src/spellchecker.cpp
@@ -71,26 +71,24 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda
static int IconsChanged(WPARAM wParam, LPARAM lParam)
{
- if ( ServiceExists(MS_MSG_MODIFYICON)) {
- StatusIconData sid = { sizeof(sid) };
- sid.szModule = MODULE_NAME;
- sid.hIconDisabled = Skin_GetIcon("spellchecker_disabled");
- sid.flags = MBF_HIDDEN;
+ StatusIconData sid = { sizeof(sid) };
+ sid.szModule = MODULE_NAME;
+ sid.hIconDisabled = Skin_GetIcon("spellchecker_disabled");
+ sid.flags = MBF_HIDDEN;
- for (int i = 0; i < languages.getCount(); i++) {
- sid.dwId = i;
+ for (int i = 0; i < languages.getCount(); i++) {
+ sid.dwId = i;
- char tmp[128];
- mir_snprintf(tmp, SIZEOF(tmp), "%s - %S",
- Translate("Spell Checker"), languages[i]->full_name);
- sid.szTooltip = tmp;
+ char tmp[128];
+ mir_snprintf(tmp, SIZEOF(tmp), "%s - %S",
+ Translate("Spell Checker"), languages[i]->full_name);
+ sid.szTooltip = tmp;
- HICON hIcon = (opts.use_flags) ? Skin_GetIconByHandle(languages[i]->hIcolib) : Skin_GetIcon("spellchecker_enabled");
- sid.hIcon = CopyIcon(hIcon);
- Skin_ReleaseIcon(hIcon);
+ HICON hIcon = (opts.use_flags) ? Skin_GetIconByHandle(languages[i]->hIcolib) : Skin_GetIcon("spellchecker_enabled");
+ sid.hIcon = CopyIcon(hIcon);
+ Skin_ReleaseIcon(hIcon);
- CallService(MS_MSG_MODIFYICON, 0, (LPARAM) &sid);
- }
+ Srmm_ModifyIcon(NULL, &sid);
}
return 0;
diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp
index 06a82da925..9d956eaa65 100644
--- a/plugins/SpellChecker/src/utils.cpp
+++ b/plugins/SpellChecker/src/utils.cpp
@@ -860,21 +860,18 @@ void GetContactLanguage(Dialog *dlg)
void ModifyIcon(Dialog *dlg)
{
- if ( ServiceExists(MS_MSG_MODIFYICON)) {
- StatusIconData sid = {0};
- sid.cbSize = sizeof(sid);
- sid.szModule = MODULE_NAME;
+ StatusIconData sid = { sizeof(sid) };
+ sid.szModule = MODULE_NAME;
- for (int i = 0; i < languages.getCount(); i++) {
- sid.dwId = i;
+ for (int i = 0; i < languages.getCount(); i++) {
+ sid.dwId = i;
- if (languages[i] == dlg->lang)
- sid.flags = (dlg->enabled ? 0 : MBF_DISABLED);
- else
- sid.flags = MBF_HIDDEN;
+ if (languages[i] == dlg->lang)
+ sid.flags = (dlg->enabled ? 0 : MBF_DISABLED);
+ else
+ sid.flags = MBF_HIDDEN;
- CallService(MS_MSG_MODIFYICON, (WPARAM) dlg->hContact, (LPARAM) &sid);
- }
+ Srmm_ModifyIcon(dlg->hContact, &sid);
}
}