summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2012-02-08 14:28:23 +0000
committermataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2012-02-08 14:28:23 +0000
commitc2ee4614da32986d542e988d98d5dcf964678e95 (patch)
tree6972a1a5ea5a26e7f460b99f3ba3e146034f47a7
parentb164d030ace150aa292e8009d2d55c05005072b0 (diff)
Popup:
Unicode avatars support git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@268 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
-rw-r--r--Popup/src/avatars.cpp12
-rw-r--r--Popup/src/popup_gdiplus.cpp26
-rw-r--r--Popup/src/popup_gdiplus.h15
3 files changed, 23 insertions, 30 deletions
diff --git a/Popup/src/avatars.cpp b/Popup/src/avatars.cpp
index 93cab8d..68fbac5 100644
--- a/Popup/src/avatars.cpp
+++ b/Popup/src/avatars.cpp
@@ -1,10 +1,10 @@
/*
Popup Plus plugin for Miranda IM
-Copyright © 2002 Luca Santarelli,
- © 2004-2007 Victor Pavlychko
- © 2010 MPK
- © 2010 Merlin_de
+Copyright � 2002 Luca Santarelli,
+ � 2004-2007 Victor Pavlychko
+ � 2010 MPK
+ � 2010 Merlin_de
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -40,10 +40,10 @@ PopupAvatar *PopupAvatar::create(HANDLE hContact)
{
avatarCacheEntry *av = (avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)hContact, 0);
// MessageBox(NULL, _T("00"), _T(MODULNAME_LONG), MB_OK);
- if (av && (strlen(av->szFilename) > 4))
+ if (av && (_tcslen(av->szFilename) > 4))
{
// MessageBox(NULL, _T("01"), _T(MODULNAME_LONG), MB_OK);
- if (!stricmp(av->szFilename+strlen(av->szFilename)-4, ".gif"))
+ if (!_tcsicmp(av->szFilename+_tcslen(av->szFilename)-4, _T(".gif")))
{
// MessageBox(NULL, _T("02"), _T(MODULNAME_LONG), MB_OK);
if (DBGetContactSettingByte(NULL, MODULNAME, "EnableGifAnimation", 1) && GDIPlus_IsAnimatedGIF(av->szFilename))
diff --git a/Popup/src/popup_gdiplus.cpp b/Popup/src/popup_gdiplus.cpp
index ab1c3b2..186fedb 100644
--- a/Popup/src/popup_gdiplus.cpp
+++ b/Popup/src/popup_gdiplus.cpp
@@ -1,10 +1,10 @@
/*
Popup Plus plugin for Miranda IM
-Copyright © 2002 Luca Santarelli,
- © 2004-2007 Victor Pavlychko
- © 2010 MPK
- © 2010 Merlin_de
+Copyright � 2002 Luca Santarelli,
+ � 2004-2007 Victor Pavlychko
+ � 2010 MPK
+ � 2010 Merlin_de
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -114,12 +114,10 @@ HBITMAP SkinEngine_CreateDIB32(int cx, int cy)
}
-BOOL GDIPlus_IsAnimatedGIF(char * szName)
+BOOL GDIPlus_IsAnimatedGIF(TCHAR * szName)
{
int nFrameCount=0;
- WCHAR * temp= mir_a2u(szName);
- Image image(temp);
- mir_free(temp);
+ Image image(szName);
UINT count = 0;
count = image.GetFrameDimensionsCount();
@@ -136,22 +134,18 @@ BOOL GDIPlus_IsAnimatedGIF(char * szName)
return (BOOL) (nFrameCount > 1) && image.GetWidth() && image.GetHeight();
}
-void GDIPlus_GetGIFSize(char * szName, int * width, int * height)
+void GDIPlus_GetGIFSize(TCHAR * szName, int * width, int * height)
{
- WCHAR * temp= mir_a2u(szName);
- Image image(temp);
- mir_free(temp);
+ Image image(szName);
*width = image.GetWidth();
*height = image.GetHeight();
}
-void GDIPlus_ExtractAnimatedGIF(char * szName, int width, int height, HBITMAP * pBitmap, int ** pframesDelay, int * pframesCount, SIZE * pSizeAvatar)
+void GDIPlus_ExtractAnimatedGIF(TCHAR * szName, int width, int height, HBITMAP * pBitmap, int ** pframesDelay, int * pframesCount, SIZE * pSizeAvatar)
{
int nFrameCount=0;
- WCHAR * temp = mir_a2u(szName);
- Bitmap image(temp);
- mir_free(temp);
+ Bitmap image(szName);
PropertyItem * pPropertyItem;
UINT count = 0;
diff --git a/Popup/src/popup_gdiplus.h b/Popup/src/popup_gdiplus.h
index b84700c..74def65 100644
--- a/Popup/src/popup_gdiplus.h
+++ b/Popup/src/popup_gdiplus.h
@@ -1,10 +1,10 @@
/*
Popup Plus plugin for Miranda IM
-Copyright © 2002 Luca Santarelli,
- © 2004-2007 Victor Pavlychko
- © 2010 MPK
- © 2010 Merlin_de
+Copyright � 2002 Luca Santarelli,
+ � 2004-2007 Victor Pavlychko
+ � 2010 MPK
+ � 2010 Merlin_de
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -35,8 +35,7 @@ Last change by : $Author: Merlin_de $
void LoadGDIPlus();
void UnloadGDIPlus();
-BOOL GDIPlus_IsAnimatedGIF(char * szName);
-void GDIPlus_GetGIFSize(char * szName, int * width, int * height);
-void GDIPlus_ExtractAnimatedGIF(char * szName, int width, int height, HBITMAP * pBitmap, int ** pframesDelay, int * pframesCount, SIZE * pSizeAvatar);
+BOOL GDIPlus_IsAnimatedGIF(TCHAR * szName);
+void GDIPlus_GetGIFSize(TCHAR * szName, int * width, int * height);
+void GDIPlus_ExtractAnimatedGIF(TCHAR * szName, int width, int height, HBITMAP * pBitmap, int ** pframesDelay, int * pframesCount, SIZE * pSizeAvatar);
-#endif // __popup_gdiplus_h__