diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-22 14:59:36 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-22 14:59:36 +0000 |
commit | 20015ea138dd46c88610d6d08486fba9d5fb5839 (patch) | |
tree | af7c7226361eec6ee5bd5af821c1ea9df2acc6c2 /src/modules | |
parent | 976b4e385bbecf922057853ceb793f9cdb578b31 (diff) |
separate arrays removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@2433 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/skin/skinicons.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/modules/skin/skinicons.cpp b/src/modules/skin/skinicons.cpp index b4e69eb602..02b7d141f1 100644 --- a/src/modules/skin/skinicons.cpp +++ b/src/modules/skin/skinicons.cpp @@ -30,9 +30,10 @@ struct StandardIconDescription int resource_id;
int pf2;
LPCSTR section;
+ HANDLE hIcolib;
};
-static const struct StandardIconDescription mainIcons[] =
+static struct StandardIconDescription mainIcons[] =
{
{ SKINICON_OTHER_MIRANDA, LPGEN("Miranda NG"), -IDI_MIRANDA },
{ SKINICON_EVENT_MESSAGE, LPGEN("Message"), -IDI_RECVMSG },
@@ -85,9 +86,7 @@ static const struct StandardIconDescription mainIcons[] = { SKINICON_OTHER_STATUS_LOCKED, LPGEN("Locked status"), -IDI_STATUS_LOCKED, 0, "Status Icons" },
};
-HANDLE hMainIcons[SIZEOF(mainIcons)];
-
-static const struct StandardIconDescription statusIcons[] =
+static struct StandardIconDescription statusIcons[] =
{
{ ID_STATUS_OFFLINE, LPGEN("Offline"), -IDI_OFFLINE, 0xFFFFFFFF },
{ ID_STATUS_ONLINE, LPGEN("Online"), -IDI_ONLINE, PF2_ONLINE },
@@ -101,8 +100,6 @@ static const struct StandardIconDescription statusIcons[] = { ID_STATUS_OUTTOLUNCH, LPGEN("Out to lunch"), -IDI_OUTTOLUNCH, PF2_OUTTOLUNCH }
};
-HANDLE hStatusIcons[SIZEOF(statusIcons)];
-
const char *mainIconsFmt = "core_main_";
const char *statusIconsFmt = "core_status_";
const char *protoIconsFmt = LPGEN("%s Icons");
@@ -333,7 +330,7 @@ HANDLE GetSkinIconHandle(int idx) {
for (int i=0; i < SIZEOF(mainIcons); i++)
if (idx == mainIcons[i].id)
- return hMainIcons[i];
+ return mainIcons[i].hIcolib;
return NULL;
}
@@ -460,7 +457,7 @@ int LoadSkinIcons(void) sid.pszSection = mainIcons[i].section == NULL ? "Main Icons" : (char*)mainIcons[i].section;
sid.pszDescription = (char*)mainIcons[i].description;
sid.iDefaultIndex = mainIcons[i].resource_id;
- hMainIcons[i] = IcoLib_AddNewIcon(0, &sid);
+ mainIcons[i].hIcolib = IcoLib_AddNewIcon(0, &sid);
}
//
// Add global icons to list
@@ -474,7 +471,7 @@ int LoadSkinIcons(void) sid.pszName = iconName;
sid.pszDescription = (char*)statusIcons[i].description;
sid.iDefaultIndex = statusIcons[i].resource_id;
- hStatusIcons[i] = IcoLib_AddNewIcon(0, &sid);
+ statusIcons[i].hIcolib = IcoLib_AddNewIcon(0, &sid);
}
return 0;
}
|