From 4d0735ab834be6c541e7e577fbe76c888bf4d09f Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Tue, 14 Apr 2015 20:32:40 +0000 Subject: Tox: second approach for audio support git-svn-id: http://svn.miranda-ng.org/main/trunk@12827 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_icons.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'protocols/Tox/src/tox_icons.cpp') 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 -- cgit v1.2.3