summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_icons.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-04-14 20:32:40 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-04-14 20:32:40 +0000
commit4d0735ab834be6c541e7e577fbe76c888bf4d09f (patch)
tree8e290ade50e86e7b5f53a2b66bb0f1f2a2119982 /protocols/Tox/src/tox_icons.cpp
parent31ba819bd0994a0a48a174cba37b5985522ff3f8 (diff)
Tox: second approach for audio support
git-svn-id: http://svn.miranda-ng.org/main/trunk@12827 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_icons.cpp')
-rw-r--r--protocols/Tox/src/tox_icons.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/protocols/Tox/src/tox_icons.cpp b/protocols/Tox/src/tox_icons.cpp
index 505dbec2e3..9a62c5069b 100644
--- a/protocols/Tox/src/tox_icons.cpp
+++ b/protocols/Tox/src/tox_icons.cpp
@@ -2,7 +2,8 @@
IconInfo CToxProto::Icons[] =
{
- { LPGENT("Protocol icon"), "main", IDI_TOX },
+ { LPGENT("Protocol icon"), "main", IDI_TOX },
+ { LPGENT("Audio call"), "audio_call", IDI_AUDIO_CALL },
};
void CToxProto::InitIcons()
@@ -27,18 +28,15 @@ void CToxProto::InitIcons()
sid.ptszDescription = Icons[i].Description;
sid.iDefaultIndex = -Icons[i].IconId;
Icons[i].Handle = Skin_AddIcon(&sid);
- }
+ }
}
HANDLE CToxProto::GetIconHandle(const char *name)
{
for (size_t i = 0; i < SIZEOF(Icons); i++)
- {
if (mir_strcmpi(Icons[i].Name, name) == 0)
- {
return Icons[i].Handle;
- }
- }
+
return 0;
}
@@ -48,16 +46,13 @@ HANDLE CToxProto::GetSkinIconHandle(const char *name)
mir_snprintf(iconName, SIZEOF(iconName), "%s_%s", MODULE, name);
HANDLE hIcon = Skin_GetIconHandle(iconName);
if (hIcon == NULL)
- {
hIcon = GetIconHandle(name);
- }
+
return hIcon;
}
void CToxProto::UninitIcons()
{
for (size_t i = 0; i < SIZEOF(Icons); i++)
- {
Skin_RemoveIcon(Icons[i].Name);
- }
} \ No newline at end of file