summaryrefslogtreecommitdiff
path: root/secureim/loadicons.cpp
diff options
context:
space:
mode:
authormataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2011-11-26 15:41:10 +0000
committermataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2011-11-26 15:41:10 +0000
commitf04d64869f3b1de54fb343f28f955584780001b8 (patch)
tree5453dc10de3d980de79ffe019fa0b5fcb692a27d /secureim/loadicons.cpp
parent7aff1e4cb053394db57c2814d5fe1e6493e0cc75 (diff)
Project folders rename part 3
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@215 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
Diffstat (limited to 'secureim/loadicons.cpp')
-rw-r--r--secureim/loadicons.cpp104
1 files changed, 0 insertions, 104 deletions
diff --git a/secureim/loadicons.cpp b/secureim/loadicons.cpp
deleted file mode 100644
index 1b9d473..0000000
--- a/secureim/loadicons.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-#include "commonheaders.h"
-
-
-HINSTANCE LoadIconsPack(const char* szIconsPack)
-{
- HINSTANCE hNewIconInst = NULL;
- WORD i;
-
- hNewIconInst = LoadLibrary(szIconsPack);
-
- if (hNewIconInst != NULL)
- {
- for(i=ID_FIRSTICON; i<=ID_LASTICON; i++)
- if (LoadIcon(hNewIconInst, MAKEINTRESOURCE(i)) == NULL)
- {
- FreeLibrary(hNewIconInst);
- hNewIconInst = NULL;
- break;
- }
- }
- return hNewIconInst;
-}
-
-
-
-int ReloadIcons(WPARAM wParam, LPARAM lParam)
-{
- HICON hIcon;
- for (int i=0; icons[i].key; i++) {
- hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)icons[i].name);
- if(icons[i].tbl == TBL_IEC)
- g_hIEC[icons[i].idx]=hIcon;
- else
- if(icons[i].tbl == TBL_ICO)
- g_hICO[icons[i].idx]=hIcon;
- else
- if(icons[i].tbl == TBL_POP)
- g_hPOP[icons[i].idx]=hIcon;
- }
-
- return 0;
-}
-
-
-void InitIcons(void)
-{
- HINSTANCE hNewIconInst = NULL;
-
- if( g_hFolders ) {
- LPSTR pathname = (LPSTR) alloca(MAX_PATH);
- FoldersGetCustomPathEx(g_hFolders, pathname, MAX_PATH, "icons\\", "secureim_icons.dll");
- if (hNewIconInst == NULL)
- hNewIconInst = LoadIconsPack(pathname);
- }
-
- if (hNewIconInst == NULL)
- hNewIconInst = LoadIconsPack("icons\\secureim_icons.dll");
-
- if (hNewIconInst == NULL)
- hNewIconInst = LoadIconsPack("plugins\\secureim_icons.dll");
-
- if (hNewIconInst == NULL)
- g_hIconInst = g_hInst;
- else
- g_hIconInst = hNewIconInst;
-
-
- SKINICONDESC sid;
- memset(&sid,0,sizeof(sid));
-
- sid.cbSize = sizeof(SKINICONDESC);
- sid.pszSection = "SecureIM";
-
- HICON hIcon;
- for (int i=0; icons[i].key; i++) {
- if(ServiceExists(MS_SKIN2_ADDICON)) {
- sid.pszSection = icons[i].section;
- sid.pszName = icons[i].name;
- sid.pszDescription = icons[i].text;
- sid.pszDefaultFile = "secureim_icons.dll";
- sid.iDefaultIndex = icons[i].key;
- sid.hDefaultIcon = (HICON)LoadImage(g_hIconInst, MAKEINTRESOURCE(icons[i].key), IMAGE_ICON, 16, 16, LR_SHARED);
- CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
- hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)icons[i].name);
- }
- else {
- hIcon = (HICON)LoadImage(g_hIconInst, MAKEINTRESOURCE(icons[i].key), IMAGE_ICON, 16, 16, LR_SHARED);
- }
- if(icons[i].tbl == TBL_IEC)
- g_hIEC[icons[i].idx]=hIcon;
- else
- if(icons[i].tbl == TBL_ICO)
- g_hICO[icons[i].idx]=hIcon;
- else
- if(icons[i].tbl == TBL_POP)
- g_hPOP[icons[i].idx]=hIcon;
- }
-
- if(ServiceExists(MS_SKIN2_ADDICON)) {
- AddHookFunction(ME_SKIN2_ICONSCHANGED, ReloadIcons);
- }
-}
-
-// EOF