summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/AimOscar/theme.cpp2
-rw-r--r--protocols/FacebookRM/theme.cpp2
-rw-r--r--protocols/Gadu-Gadu/icolib.c2
-rw-r--r--protocols/IRCG/options.cpp5
-rw-r--r--protocols/IcqOscarJ/iconlib.cpp7
-rw-r--r--protocols/JabberG/jabber_icolib.cpp8
-rw-r--r--protocols/MRA/MraIcons.cpp29
-rw-r--r--protocols/MSN/msn_opts.cpp2
-rw-r--r--protocols/NewsAggregator/Src/Icons.cpp2
-rw-r--r--protocols/Omegle/theme.cpp2
-rw-r--r--protocols/Quotes/IconLib.cpp2
-rw-r--r--protocols/Twitter/theme.cpp2
-rw-r--r--protocols/Weather/weather_icons.cpp2
-rw-r--r--protocols/YAMN/main.cpp2
-rw-r--r--protocols/Yahoo/icolib.cpp2
15 files changed, 34 insertions, 37 deletions
diff --git a/protocols/AimOscar/theme.cpp b/protocols/AimOscar/theme.cpp
index 326401052c..e0bf133f61 100644
--- a/protocols/AimOscar/theme.cpp
+++ b/protocols/AimOscar/theme.cpp
@@ -94,7 +94,7 @@ void InitIcons(void)
sid.pszDescription = (char*)iconList[i].szDescr;
sid.iDefaultIndex = -iconList[i].defIconID;
- hIconLibItem[i] = (HANDLE)CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
+ hIconLibItem[i] = Skin_AddIcon(&sid);
}
}
diff --git a/protocols/FacebookRM/theme.cpp b/protocols/FacebookRM/theme.cpp
index c3d2fca65b..1fdbeace0b 100644
--- a/protocols/FacebookRM/theme.cpp
+++ b/protocols/FacebookRM/theme.cpp
@@ -80,7 +80,7 @@ void InitIcons(void)
sid.pszDescription = (char*)icons[i].descr;
sid.iDefaultIndex = -icons[i].defIconID;
- hIconLibItem[i] = (HANDLE)CallService(MS_SKIN2_ADDICON,0,(LPARAM)&sid);
+ hIconLibItem[i] = Skin_AddIcon(&sid);
} else { // External icons
hIconLibItem[i] = (HANDLE)CallService(MS_SKIN2_GETICONHANDLE,0,
(LPARAM)icons[i].section);
diff --git a/protocols/Gadu-Gadu/icolib.c b/protocols/Gadu-Gadu/icolib.c
index 55ceb60cf0..58d5c2fe2a 100644
--- a/protocols/Gadu-Gadu/icolib.c
+++ b/protocols/Gadu-Gadu/icolib.c
@@ -69,7 +69,7 @@ void gg_icolib_init()
sid.pszName = szSettingName;
sid.pszDescription = (char*)iconList[i].szDescr;
sid.iDefaultIndex = -iconList[i].defIconID;
- hIconLibItem[i] = (HANDLE) CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
+ hIconLibItem[i] = Skin_AddIcon(&sid);
}
}
diff --git a/protocols/IRCG/options.cpp b/protocols/IRCG/options.cpp
index 2152e340c9..e3f8bd1746 100644
--- a/protocols/IRCG/options.cpp
+++ b/protocols/IRCG/options.cpp
@@ -238,8 +238,9 @@ void AddIcons(void)
sid.ptszDescription = iconList[i].szDescr;
sid.iDefaultIndex = -iconList[i].defIconID;
sid.cx = sid.cy = iconList[i].iSize;
- hIconLibItems[i] = ( HANDLE )CallService( MS_SKIN2_ADDICON, 0, ( LPARAM )&sid );
-} }
+ hIconLibItems[i] = Skin_AddIcon(&sid );
+ }
+}
void UninitIcons(void)
{
diff --git a/protocols/IcqOscarJ/iconlib.cpp b/protocols/IcqOscarJ/iconlib.cpp
index bc378bc094..3d95822a1f 100644
--- a/protocols/IcqOscarJ/iconlib.cpp
+++ b/protocols/IcqOscarJ/iconlib.cpp
@@ -41,11 +41,10 @@
IcqIconHandle IconLibDefine(const char *desc, const char *section, const char *module, const char *ident, const TCHAR *def_file, int def_idx)
{
SKINICONDESC sid = {0};
-
- sid.cbSize = SKINICONDESC_SIZE;
+ sid.cbSize = sizeof(sid);
sid.pwszSection = make_unicode_string(section);
sid.pwszDescription = make_unicode_string(desc);
- sid.flags = SIDF_UNICODE | SIDF_PATH_TCHAR;
+ sid.flags = SIDF_ALL_TCHAR;
char szName[MAX_PATH + 128];
null_snprintf(szName, sizeof(szName), "%s_%s", module ? module : ICQ_PROTOCOL_NAME, ident);
@@ -55,7 +54,7 @@ IcqIconHandle IconLibDefine(const char *desc, const char *section, const char *m
IcqIconHandle hIcon = (IcqIconHandle)SAFE_MALLOC(sizeof(IcqIconHandle_s));
hIcon->szName = null_strdup(sid.pszName);
- hIcon->hIcoLib = (HANDLE)CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
+ hIcon->hIcoLib = Skin_AddIcon(&sid);
SAFE_FREE(&sid.pwszSection);
SAFE_FREE(&sid.pwszDescription);
diff --git a/protocols/JabberG/jabber_icolib.cpp b/protocols/JabberG/jabber_icolib.cpp
index c85198a59c..12c9387ced 100644
--- a/protocols/JabberG/jabber_icolib.cpp
+++ b/protocols/JabberG/jabber_icolib.cpp
@@ -143,7 +143,7 @@ void CIconPool::RegisterIcon(const char *name, const char *filename, int iconid,
sid.ptszDescription = szDescription;
sid.flags = SIDF_TCHAR;
sid.iDefaultIndex = iconid;
- item->m_hIcolibItem = (HANDLE)CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
+ item->m_hIcolibItem = Skin_AddIcon(&sid);
m_items.insert(item);
}
@@ -294,7 +294,7 @@ void CJabberProto::IconsInit( void )
mir_snprintf( szSettingName, SIZEOF(szSettingName), "%s_%s", m_szModuleName, iconList[i].szName );
sid.iDefaultIndex = -iconList[i].defIconID;
- m_phIconLibItems[i] = ( HANDLE )CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
+ m_phIconLibItems[i] = Skin_AddIcon(&sid);
} }
HANDLE CJabberProto::GetIconHandle( int iconId )
@@ -421,7 +421,7 @@ static HICON LoadTransportIcon(char *filename,int i,char *IconName,TCHAR *SectNa
sid.pszDefaultFile=szMyPath;
sid.iDefaultIndex=i;
sid.flags = SIDF_TCHAR;
- CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
+ Skin_AddIcon(&sid);
}
return ((HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)IconName));
}
@@ -690,7 +690,7 @@ static void sttProcessIcons( int iAmount )
sid.pszName = szSettingName;
sid.pszDescription = sharedIconList[i].szDescr;
sid.iDefaultIndex = -sharedIconList[i].defIconID;
- sharedIconList[i].hIcon = ( HANDLE )CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
+ sharedIconList[i].hIcon = Skin_AddIcon(&sid);
} }
void g_IconsInit()
diff --git a/protocols/MRA/MraIcons.cpp b/protocols/MRA/MraIcons.cpp
index f910f6adc5..0da6ee011e 100644
--- a/protocols/MRA/MraIcons.cpp
+++ b/protocols/MRA/MraIcons.cpp
@@ -8,28 +8,26 @@ void AddIcoLibItems(LPWSTR lpwszRootSectionName,LPWSTR lpwszSubSectionName,const
{
char szBuff[MAX_PATH];
WCHAR wszSection[MAX_PATH],wszPath[MAX_FILEPATH];
- SKINICONDESC sid={0};
-
- sid.cbSize=SKINICONDESC_SIZE;
- sid.pwszSection=wszSection;
- sid.pwszDefaultFile=wszPath;
- sid.cx=sid.cy=16;
- sid.flags=SIDF_ALL_UNICODE;
+ SKINICONDESC sid={0};
+ sid.cbSize = sizeof(sid);
+ sid.pwszSection = wszSection;
+ sid.pwszDefaultFile = wszPath;
+ sid.cx = sid.cy = 16;
+ sid.flags = SIDF_ALL_UNICODE;
if (lpwszSubSectionName==NULL) lpwszSubSectionName=L"";
GetModuleFileName(masMraSettings.hInstance,wszPath,SIZEOF(wszPath));
mir_sntprintf(wszSection,SIZEOF(wszSection),L"%s%s%s",lpwszRootSectionName,PROTOCOL_NAMEW,lpwszSubSectionName);
- for (SIZE_T i=0;i<dwCount;i++)
- {
+ for (SIZE_T i=0;i<dwCount;i++) {
mir_snprintf(szBuff,SIZEOF(szBuff),"%s_%s",PROTOCOL_NAMEA,pgdiItems[i].lpszName);
sid.pszName=szBuff;
sid.pwszDescription=pgdiItems[i].lpwszDescr;
sid.iDefaultIndex=-pgdiItems[i].defIcon;
sid.hDefaultIcon=(HICON)LoadImage(masMraSettings.hInstance,MAKEINTRESOURCE(pgdiItems[i].defIcon),IMAGE_ICON,0,0,LR_SHARED);
if (sid.hDefaultIcon==NULL) sid.hDefaultIcon=(HICON)LoadImage(NULL,MAKEINTRESOURCE(pgdiItems[i].defIcon),IMAGE_ICON,0,0,LR_SHARED);
- hResult[i]=(HANDLE)CallService(MS_SKIN2_ADDICON,0,(LPARAM)&sid);
+ hResult[i] = Skin_AddIcon(&sid);
}
}
@@ -100,20 +98,19 @@ void InitXStatusIcons()
int iCurIndex;
char szBuff[MAX_PATH];
WCHAR wszSection[MAX_PATH],wszPath[MAX_FILEPATH];
- SKINICONDESC sid={0};
- sid.cbSize=SKINICONDESC_SIZE;
+ SKINICONDESC sid={0};
+ sid.cbSize = sizeof(sid);
sid.pwszSection=wszSection;
sid.pwszDefaultFile=wszPath;
sid.cx=sid.cy=16;
sid.flags=SIDF_ALL_UNICODE;
if (masMraSettings.hDLLXStatusIcons)
- {
GetModuleFileName(masMraSettings.hDLLXStatusIcons,wszPath,SIZEOF(wszPath));
- }else{
+ else
bzero(wszPath,sizeof(wszPath));
- }
+
mir_sntprintf(wszSection,SIZEOF(wszSection),L"Status Icons/%s/Custom Status",PROTOCOL_NAMEW);
masMraSettings.hXStatusAdvancedStatusIcons[0]=NULL;
@@ -130,7 +127,7 @@ void InitXStatusIcons()
}else{
sid.hDefaultIcon=NULL;
}
- masMraSettings.hXStatusAdvancedStatusIcons[i]=(HANDLE)CallService(MS_SKIN2_ADDICON,0,(LPARAM)&sid);
+ masMraSettings.hXStatusAdvancedStatusIcons[i] = Skin_AddIcon(&sid);
}
}
diff --git a/protocols/MSN/msn_opts.cpp b/protocols/MSN/msn_opts.cpp
index c55755f1b9..b611b2559a 100644
--- a/protocols/MSN/msn_opts.cpp
+++ b/protocols/MSN/msn_opts.cpp
@@ -73,7 +73,7 @@ void MsnInitIcons(void)
sid.pszName = szSettingName;
sid.pszDescription = (char*)iconList[i].szDescr;
sid.iDefaultIndex = -iconList[i].defIconID;
- hIconLibItem[i] = (HANDLE)CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
+ hIconLibItem[i] = Skin_AddIcon(&sid);
}
}
diff --git a/protocols/NewsAggregator/Src/Icons.cpp b/protocols/NewsAggregator/Src/Icons.cpp
index 096a38086b..16b782fd3c 100644
--- a/protocols/NewsAggregator/Src/Icons.cpp
+++ b/protocols/NewsAggregator/Src/Icons.cpp
@@ -58,7 +58,7 @@ VOID InitIcons()
sid.ptszDescription = iconList[i].szDescr;
sid.iDefaultIndex = -iconList[i].defIconID;
- iconList[i].hIconLibItem = ( HANDLE )CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
+ iconList[i].hIconLibItem = Skin_AddIcon(&sid);
}
}
diff --git a/protocols/Omegle/theme.cpp b/protocols/Omegle/theme.cpp
index 73ef80a46c..d7f7fc7e9b 100644
--- a/protocols/Omegle/theme.cpp
+++ b/protocols/Omegle/theme.cpp
@@ -73,7 +73,7 @@ void InitIcons(void)
sid.pszDescription = (char*)icons[i].descr;
sid.iDefaultIndex = -icons[i].defIconID;
- hIconLibItem[i] = (HANDLE)CallService(MS_SKIN2_ADDICON,0,(LPARAM)&sid);
+ hIconLibItem[i] = Skin_AddIcon(&sid);
} else { // External icons
hIconLibItem[i] = (HANDLE)CallService(MS_SKIN2_GETICONHANDLE,0,
(LPARAM)icons[i].section);
diff --git a/protocols/Quotes/IconLib.cpp b/protocols/Quotes/IconLib.cpp
index 9702bfe3d8..6957a35d0b 100644
--- a/protocols/Quotes/IconLib.cpp
+++ b/protocols/Quotes/IconLib.cpp
@@ -70,7 +70,7 @@ void Quotes_IconsInit()
sid.pszName = const_cast<char*>(sName.c_str());
sid.ptszDescription = iconList[i].szDescr;
sid.iDefaultIndex = -iconList[i].defIconID;
- iconList[i].hIconLibItem = reinterpret_cast<HANDLE>(CallService(MS_SKIN2_ADDICON,0,reinterpret_cast<LPARAM>(&sid)));
+ iconList[i].hIconLibItem = Skin_AddIcon(&sid);
}
}
diff --git a/protocols/Twitter/theme.cpp b/protocols/Twitter/theme.cpp
index f17e7d700a..11dea3cb44 100644
--- a/protocols/Twitter/theme.cpp
+++ b/protocols/Twitter/theme.cpp
@@ -74,7 +74,7 @@ void InitIcons(void)
sid.pszDescription = (char*)icons[i].descr;
sid.iDefaultIndex = -icons[i].defIconID;
- hIconLibItem[i] = (HANDLE)CallService(MS_SKIN2_ADDICON,0,(LPARAM)&sid);
+ hIconLibItem[i] = Skin_AddIcon(&sid);
}
else // External icons
{
diff --git a/protocols/Weather/weather_icons.cpp b/protocols/Weather/weather_icons.cpp
index ada253bb07..6669a64515 100644
--- a/protocols/Weather/weather_icons.cpp
+++ b/protocols/Weather/weather_icons.cpp
@@ -61,7 +61,7 @@ void InitIcons(void)
sid.pszDescription = iconList[i].szDescr;
sid.iDefaultIndex = -iconList[i].defIconID;
- iconList[i].hIconLibItem = ( HANDLE )CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
+ iconList[i].hIconLibItem = ( HANDLE )Skin_AddIcon(&sid);
} }
HICON LoadIconEx(const char* name, BOOL big)
diff --git a/protocols/YAMN/main.cpp b/protocols/YAMN/main.cpp
index e876465609..7ea9386c4c 100644
--- a/protocols/YAMN/main.cpp
+++ b/protocols/YAMN/main.cpp
@@ -320,7 +320,7 @@ static void LoadIcons()
sid.pszName = iconList[i].szName;
sid.pszDescription = iconList[i].szDescr;
sid.iDefaultIndex = -iconList[i].defIconID;
- iconList[i].hIcon = ( HANDLE )CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
+ iconList[i].hIcon = Skin_AddIcon(&sid);
} }
HANDLE WINAPI g_GetIconHandle( int idx )
diff --git a/protocols/Yahoo/icolib.cpp b/protocols/Yahoo/icolib.cpp
index 7f87f2c890..868624380e 100644
--- a/protocols/Yahoo/icolib.cpp
+++ b/protocols/Yahoo/icolib.cpp
@@ -56,7 +56,7 @@ void CYahooProto::IconsInit( void )
sid.pszName = szSettingName;
sid.pszDescription = (char* )iconList[i].szDescr;
sid.iDefaultIndex = -iconList[i].defIconID;
- hIconLibItem[i] = (HANDLE)CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
+ hIconLibItem[i] = Skin_AddIcon(&sid);
}
}