From b376d5d7718b091ae2c2179ebac5168cf2dfcdad Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 16 Mar 2013 10:40:04 +0000 Subject: fixed checking jpg format if png not founded git-svn-id: http://svn.miranda-ng.org/main/trunk@4061 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/IEView/src/TemplateHTMLBuilder.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'plugins/IEView') diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp index 6a65eab30c..247b927888 100644 --- a/plugins/IEView/src/TemplateHTMLBuilder.cpp +++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp @@ -200,12 +200,12 @@ void TemplateHTMLBuilder::buildHeadTemplate(IEView *view, IEVIEWEVENT *event, Pr szNameIn = Utils::dupString(" "); } sprintf(tempStr, "%snoavatar.png", tempBase); + szNoAvatar = Utils::UTF8Encode(tempStr); + if (access(szNoAvatar, 0) == -1) + { + sprintf(tempStr, "%snoavatar.jpg", tempBase); szNoAvatar = Utils::UTF8Encode(tempStr); - if (access(szNoAvatar, 0) != -1) - { - sprintf(tempStr, "%snoavatar.jpg", tempBase); - szNoAvatar = Utils::UTF8Encode(tempStr); - } + } szAvatarIn = getAvatar(event->hContact, szRealProto); if (szAvatarIn == NULL) { szAvatarIn = Utils::dupString(szNoAvatar); @@ -376,12 +376,12 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event, szNameIn = Utils::dupString(" "); } sprintf(tempStr, "%snoavatar.png", tempBase); + szNoAvatar = Utils::UTF8Encode(tempStr); + if (access(szNoAvatar, 0) == -1) + { + sprintf(tempStr, "%snoavatar.jpg", tempBase); szNoAvatar = Utils::UTF8Encode(tempStr); - if (access(szNoAvatar, 0) != -1) - { - sprintf(tempStr, "%snoavatar.jpg", tempBase); - szNoAvatar = Utils::UTF8Encode(tempStr); - } + } if(event->hContact != NULL) { szAvatarIn = getAvatar(event->hContact, szRealProto); -- cgit v1.2.3