summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-09-14 19:25:29 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-09-14 19:25:29 +0000
commit98a324d2fb4babc09e94a10fef819f3409477eb2 (patch)
tree3db8dabae7922ae053d4748ba733d361d18f56df /plugins/UserInfoEx
parent25f87650dab37f5a7380ae2121c7529cb3ac801a (diff)
UserInfoEx: fix #685
git-svn-id: http://svn.miranda-ng.org/main/trunk@15353 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx')
-rw-r--r--plugins/UserInfoEx/src/dlg_propsheet.cpp4
-rw-r--r--plugins/UserInfoEx/src/mir_icolib.cpp12
-rw-r--r--plugins/UserInfoEx/src/mir_icolib.h1
3 files changed, 11 insertions, 6 deletions
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp
index ff76ea1994..1354e4cc50 100644
--- a/plugins/UserInfoEx/src/dlg_propsheet.cpp
+++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp
@@ -274,7 +274,7 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM)
HICON hDefIcon = IcoLib_GetIcon(ICO_TREE_DEFAULT);
if (!hDefIcon)
- hDefIcon = (HICON)LoadImage(ghInst, MAKEINTRESOURCE(IDI_DEFAULT), IMAGE_ICON, metrics.x, metrics.y, 0);
+ hDefIcon = (HICON)IcoLib_GetIcon(ICO_COMMON_DEFAULT, false);
// add the default icon to imagelist
ImageList_AddIcon(psh._hImages, hDefIcon);
@@ -552,7 +552,7 @@ void DlgContactInfoInitTreeIcons()
if (psh._hImages = ImageList_Create(metrics.x, metrics.y, ILC_COLOR32 | ILC_MASK, 0, 1)) {
HICON hDefIcon = IcoLib_GetIcon(ICO_TREE_DEFAULT);
if (!hDefIcon)
- hDefIcon = (HICON)LoadImage(ghInst, MAKEINTRESOURCE(IDI_DEFAULT), IMAGE_ICON, metrics.x, metrics.y, 0);
+ hDefIcon = (HICON)IcoLib_GetIcon(ICO_COMMON_DEFAULT, false);
// add the default icon to imagelist
ImageList_AddIcon(psh._hImages, hDefIcon);
diff --git a/plugins/UserInfoEx/src/mir_icolib.cpp b/plugins/UserInfoEx/src/mir_icolib.cpp
index 448e67b7ec..587da1a03e 100644
--- a/plugins/UserInfoEx/src/mir_icolib.cpp
+++ b/plugins/UserInfoEx/src/mir_icolib.cpp
@@ -314,20 +314,24 @@ HICON IcoLib_RegisterIcon(LPSTR szIconID, LPSTR szDescription, LPSTR szSection,
*
* @return nothing
**/
-static IconItem main = { LPGEN("Main"), ICO_COMMON_MAIN, IDI_MAIN };
+static IconItem common[] =
+{
+ { LPGEN("Main"), ICO_COMMON_MAIN, IDI_MAIN },
+ { LPGEN("Default"), ICO_COMMON_DEFAULT, IDI_DEFAULT }
+};
void IcoLib_LoadModule()
{
- Icon_Register(ghInst, SECT_COMMON, &main, 1);
+ Icon_Register(ghInst, SECT_COMMON, common, 2);
LPTSTR szDefaultFile = IcoLib_GetDefaultIconFileName();
IcoLib_CheckIconPackVersion(szDefaultFile);
// load default icon if required
- ghDefIcon = (HICON)LoadImage(ghInst, MAKEINTRESOURCE(IDI_DEFAULT), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0);
+ ghDefIcon = (HICON)IcoLib_GetIcon(ICO_COMMON_DEFAULT, false);
for (int i = 0; i < _countof(icoDesc); i++)
IcoLib_RegisterIconHandleEx(
- icoDesc[i].pszName, icoDesc[i].pszDesc, icoDesc[i].pszSection,
+ icoDesc[i].pszName, icoDesc[i].pszDesc, icoDesc[i].pszSection,
szDefaultFile, icoDesc[i].idResource, icoDesc[i].size, ghDefIcon);
}
diff --git a/plugins/UserInfoEx/src/mir_icolib.h b/plugins/UserInfoEx/src/mir_icolib.h
index 7f726c9964..7ac5bd5e36 100644
--- a/plugins/UserInfoEx/src/mir_icolib.h
+++ b/plugins/UserInfoEx/src/mir_icolib.h
@@ -32,6 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// icons
#define ICO_COMMON_MAIN MODNAME"_common_main"
+#define ICO_COMMON_DEFAULT MODNAME"_common_default"
#define ICO_COMMON_IM MODNAME"_common_im"
#define ICO_COMMON_FEMALE MODNAME"_common_female"
#define ICO_COMMON_MALE MODNAME"_common_male"