diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-20 23:51:53 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-20 23:51:53 +0000 |
commit | 57abc51aad272a656282a52a460a47abe24e07d6 (patch) | |
tree | c6f3538e63c9c736cfa7129423d1b498273278b6 /plugins/TranslitSwitcher/Src/TranslitSwitcher.cpp | |
parent | b9f120f97699286410fe902f93135235eed0b127 (diff) |
- MS_SKIN2_ADDICON replaced with Skin_AddIcon;
- SKINICONDESC_SIZE* constants removed and replaced with sizeof(sid);
- added SIDF_PATH_UNICODE for all plugins;
- dynamic translation fixed in the icolib options dialog
git-svn-id: http://svn.miranda-ng.org/main/trunk@507 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TranslitSwitcher/Src/TranslitSwitcher.cpp')
-rw-r--r-- | plugins/TranslitSwitcher/Src/TranslitSwitcher.cpp | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/plugins/TranslitSwitcher/Src/TranslitSwitcher.cpp b/plugins/TranslitSwitcher/Src/TranslitSwitcher.cpp index b6f0e43207..e762b2a5a0 100644 --- a/plugins/TranslitSwitcher/Src/TranslitSwitcher.cpp +++ b/plugins/TranslitSwitcher/Src/TranslitSwitcher.cpp @@ -78,7 +78,7 @@ INT_PTR ServiceInvert(WPARAM wParam, LPARAM lParam) int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
{
- HICON hSwitchIcon = NULL, hTranslitIcon = NULL, hInvertIcon = NULL;
+ HANDLE hSwitchIcon = NULL, hTranslitIcon = NULL, hInvertIcon = NULL;
HOTKEYDESC hkd = {0};
hkd.cbSize = sizeof(hkd);
@@ -135,8 +135,7 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam) Hotkey_Register(&hkd);
hOnButtonPressed = HookEvent(ME_MSG_BUTTONPRESSED, OnButtonPressed);
- if (ServiceExists(MS_BB_ADDBUTTON) && ServiceExists(MS_SKIN2_ADDICON))
- {
+ if (ServiceExists(MS_BB_ADDBUTTON)) {
SKINICONDESC sid = {0};
sid.cbSize = sizeof(SKINICONDESC);
sid.flags = SIDF_TCHAR;
@@ -145,27 +144,18 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam) sid.ptszDescription = _T("SwitchLayout and Send");
sid.pszName = "SwitchLayout and Send";
sid.hDefaultIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SWITCHSEND));
- hSwitchIcon = (HICON)CallService(MS_SKIN2_ADDICON, 0, (LPARAM) &sid);
+ hSwitchIcon = Skin_AddIcon(&sid);
sid.ptszDescription = _T("Translit and Send");
sid.pszName = "Translit and Send";
sid.hDefaultIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_TRANSLITSEND));
- hTranslitIcon = (HICON)CallService(MS_SKIN2_ADDICON, 0, (LPARAM) &sid);
+ hTranslitIcon = Skin_AddIcon(&sid);
sid.ptszDescription = _T("Invert Case and Send");
sid.pszName = "Invert Case and Send";
sid.hDefaultIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_INVERTSEND));
- hInvertIcon = (HICON)CallService(MS_SKIN2_ADDICON, 0, (LPARAM) &sid);
- }
- else if (ServiceExists(MS_BB_ADDBUTTON))
- {
- hSwitchIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SWITCHSEND));
- hTranslitIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_TRANSLITSEND));
- hInvertIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_INVERTSEND));
- }
+ hInvertIcon = Skin_AddIcon(&sid);
- if (ServiceExists(MS_BB_ADDBUTTON))
- {
BBButton bbd = {0};
bbd.cbSize = sizeof(BBButton);
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON;
@@ -190,11 +180,6 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam) bbd.dwDefPos = 50;
CallService(MS_BB_ADDBUTTON, 0, (LPARAM)&bbd);
}
-
- DestroyIcon(hSwitchIcon);
- DestroyIcon(hTranslitIcon);
- DestroyIcon(hInvertIcon);
-
return 0;
}
|