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/Svc_dbepp/icons.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/Svc_dbepp/icons.cpp')
-rw-r--r-- | plugins/Svc_dbepp/icons.cpp | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/plugins/Svc_dbepp/icons.cpp b/plugins/Svc_dbepp/icons.cpp index f6ac36e95e..ae77539ae0 100644 --- a/plugins/Svc_dbepp/icons.cpp +++ b/plugins/Svc_dbepp/icons.cpp @@ -16,72 +16,64 @@ void addIcons(TCHAR* szModuleFileName) mir_snprintf(name, SIZEOF(name), "DBE++_%d", ICO_KNOWN);
sid.pszName = name;
sid.iDefaultIndex = -ICO_KNOWN;
- CallService(MS_SKIN2_ADDICON,0,(LPARAM)&sid);
+ Skin_AddIcon(&sid);
// open known module
sid.ptszDescription = LPGENT("Open Known Module");
mir_snprintf(name, SIZEOF(name), "DBE++_%d", ICO_KNOWNOPEN);
sid.pszName = name;
sid.iDefaultIndex = -ICO_KNOWNOPEN;
- CallService(MS_SKIN2_ADDICON,0,(LPARAM)&sid);
+ Skin_AddIcon(&sid);
// closed unknown module
sid.ptszDescription = LPGENT("Closed Unknown Module");
mir_snprintf(name, SIZEOF(name), "DBE++_%d", ICO_UNKNOWN);
sid.pszName = name;
sid.iDefaultIndex = -ICO_UNKNOWN;
- CallService(MS_SKIN2_ADDICON,0,(LPARAM)&sid);
+ Skin_AddIcon(&sid);
// open unknown module
sid.ptszDescription = LPGENT("Open Unknown Module");
mir_snprintf(name, SIZEOF(name), "DBE++_%d", ICO_UNKNOWNOPEN);
sid.pszName = name;
sid.iDefaultIndex = -ICO_UNKNOWNOPEN;
- CallService(MS_SKIN2_ADDICON,0,(LPARAM)&sid);
+ Skin_AddIcon(&sid);
// settings contact
sid.ptszDescription = LPGENT("Settings");
mir_snprintf(name, SIZEOF(name), "DBE++_%d", ICO_SETTINGS);
sid.pszName = name;
sid.iDefaultIndex = -ICO_SETTINGS;
- CallService(MS_SKIN2_ADDICON,0,(LPARAM)&sid);
+ Skin_AddIcon(&sid);
// contact group
sid.ptszDescription = LPGENT("Contacts Group");
mir_snprintf(name, SIZEOF(name), "DBE++_%d", ICO_CONTACTS);
sid.pszName = name;
sid.iDefaultIndex = -ICO_CONTACTS;
- CallService(MS_SKIN2_ADDICON,0,(LPARAM)&sid);
+ Skin_AddIcon(&sid);
// unknwon contact
sid.ptszDescription = LPGENT("Unknown Contact");
mir_snprintf(name, SIZEOF(name), "DBE++_%d", ICO_OFFLINE);
sid.pszName = name;
sid.iDefaultIndex = -ICO_OFFLINE;
- CallService(MS_SKIN2_ADDICON,0,(LPARAM)&sid);
+ Skin_AddIcon(&sid);
// known contact
sid.ptszDescription = LPGENT("Known Contact");
mir_snprintf(name, SIZEOF(name), "DBE++_%d", ICO_ONLINE);
sid.pszName = name;
sid.iDefaultIndex = -ICO_ONLINE;
- CallService(MS_SKIN2_ADDICON,0,(LPARAM)&sid);
+ Skin_AddIcon(&sid);
}
HICON LoadSkinnedDBEIcon(int icon)
{
- HICON hIcon = 0;
- if (UsingIconManager)
- {
- char name[32];
- mir_snprintf(name, SIZEOF(name), "DBE++_%d", icon);
-
- hIcon = (HICON)CallService(MS_SKIN2_GETICON,0,(LPARAM)name);
- }
- if (!hIcon)
- return LoadIcon(hInst, MAKEINTRESOURCE(icon));
- else
- return hIcon;
+ char name[32];
+ mir_snprintf(name, SIZEOF(name), "DBE++_%d", icon);
+ HICON hIcon = (HICON)CallService(MS_SKIN2_GETICON,0,(LPARAM)name);
+ return (hIcon) ? hIcon : LoadIcon(hInst, MAKEINTRESOURCE(icon));
}
|