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 /protocols/MRA | |
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 'protocols/MRA')
-rw-r--r-- | protocols/MRA/MraIcons.cpp | 29 |
1 files changed, 13 insertions, 16 deletions
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);
}
}
|