diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/MirOTR/MirOTR/src/svcs_srmm.cpp | 1 | ||||
-rw-r--r-- | plugins/Scriver/src/globals.cpp | 33 | ||||
-rw-r--r-- | plugins/Scriver/src/globals.h | 1 | ||||
-rw-r--r-- | plugins/Scriver/src/msgs.cpp | 8 | ||||
-rw-r--r-- | plugins/SpellChecker/src/spellchecker.cpp | 6 |
5 files changed, 10 insertions, 39 deletions
diff --git a/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp b/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp index f203f7d246..7f7987b7b4 100644 --- a/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp +++ b/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp @@ -118,7 +118,6 @@ void InitSRMM() StatusIconData sid = { sizeof(sid) };
sid.szModule = MODULENAME;
- sid.dwId = 0;
sid.hIcon = hIconFinished;
sid.hIconDisabled = hIconNotSecure;
sid.flags = MBF_DISABLED | MBF_HIDDEN;
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp index deb259b09f..de9442118d 100644 --- a/plugins/Scriver/src/globals.cpp +++ b/plugins/Scriver/src/globals.cpp @@ -107,23 +107,6 @@ void RegisterIcons(void) /////////////////////////////////////////////////////////////////////////////////////////
-HICON hIconList[SIZEOF(iconList)];
-
-BOOL IsStaticIcon(HICON hIcon)
-{
- for (int i = 0; i < SIZEOF(hIconList); i++)
- if (hIcon == hIconList[i])
- return TRUE;
-
- return FALSE;
-}
-
-void ReleaseIconSmart(HICON hIcon)
-{
- if (!IsStaticIcon(hIcon))
- Skin_ReleaseIcon(hIcon);
-}
-
int ImageList_AddIcon_Ex(HIMAGELIST hIml, int id) {
HICON hIcon = LoadSkinnedIcon(id);
int res = ImageList_AddIcon(hIml, hIcon);
@@ -153,10 +136,6 @@ int ImageList_AddIcon_ProtoEx(HIMAGELIST hIml, const char* szProto, int status) void ReleaseIcons()
{
- for (int i = 0; i < SIZEOF(hIconList); i++)
- if (hIconList[i] != NULL)
- Skin_ReleaseIcon(hIconList[i]);
-
Skin_ReleaseIcon(g_dat.hMsgIcon);
Skin_ReleaseIcon(g_dat.hMsgIconBig);
Skin_ReleaseIcon(g_dat.hIconChatBig);
@@ -166,20 +145,18 @@ HICON GetCachedIcon(const char *name) {
for (int i = 0; i < SIZEOF(iconList); i++)
if (!strcmp(iconList[i].szName, name))
- return hIconList[i];
+ return Skin_GetIconByHandle(iconList[i].hIcolib);
return NULL;
}
-void LoadGlobalIcons() {
+void LoadGlobalIcons()
+{
int i;
- int overlayIcon;
- for (i = 0; i < SIZEOF(iconList); i++)
- hIconList[i] = Skin_GetIcon(iconList[i].szName);
g_dat.hMsgIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
g_dat.hMsgIconBig = LoadSkinnedIconBig(SKINICON_EVENT_MESSAGE);
- g_dat.hIconChatBig = Skin_GetIcon("chat_window");
+ g_dat.hIconChatBig = Skin_GetIcon("chat_window", true);
ImageList_RemoveAll(g_dat.hButtonIconList);
ImageList_RemoveAll(g_dat.hChatButtonIconList);
@@ -195,7 +172,7 @@ void LoadGlobalIcons() { ImageList_AddIcon(g_dat.hChatButtonIconList, GetCachedIcon(chatButtonIcons[i]));
ImageList_AddIcon(g_dat.hHelperIconList, GetCachedIcon("scriver_OVERLAY"));
- overlayIcon = ImageList_AddIcon(g_dat.hHelperIconList, GetCachedIcon("scriver_OVERLAY"));
+ int overlayIcon = ImageList_AddIcon(g_dat.hHelperIconList, GetCachedIcon("scriver_OVERLAY"));
ImageList_SetOverlayImage(g_dat.hHelperIconList, overlayIcon, 1);
for (i=IDI_GOOGLE; i < IDI_LASTICON; i++) {
HICON hIcon = (HICON)LoadImage(g_hInst, MAKEINTRESOURCE(i), IMAGE_ICON, 0, 0, 0);
diff --git a/plugins/Scriver/src/globals.h b/plugins/Scriver/src/globals.h index 17d542d110..20cd1e1a19 100644 --- a/plugins/Scriver/src/globals.h +++ b/plugins/Scriver/src/globals.h @@ -135,7 +135,6 @@ int ImageList_AddIcon_Ex(HIMAGELIST hIml, int id); int ImageList_AddIcon_Ex2(HIMAGELIST hIml, HICON hIcon);
int ImageList_ReplaceIcon_Ex(HIMAGELIST hIml, int nIndex, int id);
int ImageList_AddIcon_ProtoEx(HIMAGELIST hIml, const char* szProto, int status);
-void ReleaseIconSmart(HICON hIcon);
void StreamInTestEvents(HWND hEditWnd, GlobalMessageData *gdat);
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index 2cd0c51bf3..3d75a9223c 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -389,8 +389,8 @@ static void RegisterStatusIcons() StatusIconData sid = { sizeof(sid) };
sid.szModule = SRMMMOD;
sid.dwId = 1;
- sid.hIcon = CopyIcon(GetCachedIcon("scriver_TYPING"));
- sid.hIconDisabled = CopyIcon(GetCachedIcon("scriver_TYPINGOFF"));
+ sid.hIcon = GetCachedIcon("scriver_TYPING");
+ sid.hIconDisabled = GetCachedIcon("scriver_TYPINGOFF");
sid.flags = MBF_HIDDEN;
Srmm_AddIcon(&sid);
}
@@ -400,8 +400,8 @@ void ChangeStatusIcons() StatusIconData sid = { sizeof(sid) };
sid.szModule = SRMMMOD;
sid.dwId = 1;
- sid.hIcon = CopyIcon(GetCachedIcon("scriver_TYPING"));
- sid.hIconDisabled = CopyIcon(GetCachedIcon("scriver_TYPINGOFF"));
+ sid.hIcon = GetCachedIcon("scriver_TYPING");
+ sid.hIconDisabled = GetCachedIcon("scriver_TYPINGOFF");
sid.flags = MBF_HIDDEN;
Srmm_ModifyIcon(NULL, &sid);
}
diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp index 31f5e40057..f3358554aa 100644 --- a/plugins/SpellChecker/src/spellchecker.cpp +++ b/plugins/SpellChecker/src/spellchecker.cpp @@ -212,11 +212,7 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) mir_sntprintf(tmp, SIZEOF(tmp), _T("%s - %s"), TranslateT("Spell Checker"), languages[i]->full_name); sid.tszTooltip = tmp; - - HICON hIcon = (opts.use_flags) ? Skin_GetIconByHandle(languages[i]->hIcolib) : Skin_GetIcon("spellchecker_enabled"); - sid.hIcon = CopyIcon(hIcon); - Skin_ReleaseIcon(hIcon); - + sid.hIcon = (opts.use_flags) ? Skin_GetIconByHandle(languages[i]->hIcolib) : Skin_GetIcon("spellchecker_enabled"); Srmm_AddIcon(&sid); } |