diff options
author | George Hazan <george.hazan@gmail.com> | 2016-06-29 17:07:45 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-06-29 17:07:45 +0000 |
commit | 00fbddd5438d83614465a84bc81031df7c023fc0 (patch) | |
tree | 3ae4663d7556c3242ec7633ecc5d522020160be0 | |
parent | 477783f8ee49db7a48a0712bc073755bec54ab95 (diff) |
fix for old iconlib handle arrays
git-svn-id: http://svn.miranda-ng.org/main/trunk@17048 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/Gadu-Gadu/src/icolib.cpp | 4 | ||||
-rw-r--r-- | protocols/Twitter/src/theme.cpp | 19 |
2 files changed, 10 insertions, 13 deletions
diff --git a/protocols/Gadu-Gadu/src/icolib.cpp b/protocols/Gadu-Gadu/src/icolib.cpp index 0a81610891..3a5d05451a 100644 --- a/protocols/Gadu-Gadu/src/icolib.cpp +++ b/protocols/Gadu-Gadu/src/icolib.cpp @@ -41,8 +41,6 @@ extern IconItem iconList[] = { LPGEN("Concurrent sessions"), "sessions", IDI_SESSIONS }
};
-HANDLE hIconLibItem[_countof(iconList)];
-
void gg_icolib_init()
{
Icon_Register(hInstance, "Protocols/" GGDEF_PROTO, iconList, _countof(iconList), GGDEF_PROTO);
@@ -59,7 +57,7 @@ HANDLE GetIconHandle(int iconId) {
for(int i = 0; i < _countof(iconList); i++)
if (iconList[i].defIconID == iconId)
- return hIconLibItem[i];
+ return iconList[i].hIcolib;
return NULL;
}
diff --git a/protocols/Twitter/src/theme.cpp b/protocols/Twitter/src/theme.cpp index c0703f2040..8470ea3bee 100644 --- a/protocols/Twitter/src/theme.cpp +++ b/protocols/Twitter/src/theme.cpp @@ -24,19 +24,18 @@ extern OBJLIST<TwitterProto> g_Instances; static IconItem icons[] =
{
- { LPGEN("Twitter Icon"), "twitter", IDI_TWITTER },
- { LPGEN("Tweet"), "tweet", IDI_TWITTER },
- { LPGEN("Reply to Tweet"), "reply", IDI_TWITTER },
+ { LPGEN("Twitter Icon"), "twitter", IDI_TWITTER },
+ { LPGEN("Tweet"), "tweet", IDI_TWITTER },
+ { LPGEN("Reply to Tweet"), "reply", IDI_TWITTER },
- { LPGEN("Visit Homepage"), "homepage", 0 },
+ { LPGEN("Visit Homepage"), "homepage", 0 },
};
void TwitterInitSounds(void)
{
-SkinAddNewSoundEx("TwitterNewContact", LPGEN("Twitter"), LPGEN("First tweet from new contact"));
-SkinAddNewSoundEx("TwitterNew", LPGEN("Twitter"), LPGEN("New tweet"));
+ SkinAddNewSoundEx("TwitterNewContact", LPGEN("Twitter"), LPGEN("First tweet from new contact"));
+ SkinAddNewSoundEx("TwitterNew", LPGEN("Twitter"), LPGEN("New tweet"));
}
-static HANDLE hIconLibItem[_countof(icons)];
// TODO: uninit
void InitIcons(void)
@@ -45,11 +44,11 @@ void InitIcons(void) icons[_countof(icons) - 1].hIcolib = Skin_GetIconHandle(SKINICON_EVENT_URL);
}
-HANDLE GetIconHandle(const char* name)
+HANDLE GetIconHandle(const char *name)
{
for (size_t i = 0; i < _countof(icons); i++)
if (mir_strcmp(icons[i].szName, name) == 0)
- return hIconLibItem[i];
+ return icons[i].hIcolib;
return 0;
}
@@ -94,7 +93,7 @@ void InitContactMenus() CMenuItem mi;
mi.flags = CMIF_NOTOFFLINE | CMIF_TCHAR;
- SET_UID(mi,0xfc4e1245, 0xc8e0, 0x4de2, 0x92, 0x15, 0xfc, 0xcf, 0x48, 0xf9, 0x41, 0x56);
+ SET_UID(mi, 0xfc4e1245, 0xc8e0, 0x4de2, 0x92, 0x15, 0xfc, 0xcf, 0x48, 0xf9, 0x41, 0x56);
mi.position = -2000006000;
mi.hIcolibItem = GetIconHandle("reply");
mi.name.t = LPGENT("Reply...");
|