summaryrefslogtreecommitdiff
path: root/plugins/CountryFlags
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-06-15 18:52:16 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-06-15 18:52:16 +0000
commit58973a21a30bf95427fd43c456e41e35c386218c (patch)
tree1413fba069ecd351b2c99fa5a53e52c68d8a662c /plugins/CountryFlags
parent55b5cf8a5506f03350e5c80ac86f5717425e4d10 (diff)
another portion of "#ifsef Unicode" removal
git-svn-id: http://svn.miranda-ng.org/main/trunk@434 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/CountryFlags')
-rw-r--r--plugins/CountryFlags/icons.c10
-rw-r--r--plugins/CountryFlags/version.h6
2 files changed, 5 insertions, 11 deletions
diff --git a/plugins/CountryFlags/icons.c b/plugins/CountryFlags/icons.c
index 607308b57a..4558fbd5ca 100644
--- a/plugins/CountryFlags/icons.c
+++ b/plugins/CountryFlags/icons.c
@@ -231,11 +231,11 @@ void InitIcons(void)
char szId[20];
int i,index;
HICON hIcon;
-#if defined(_UNICODE)
+
WCHAR szName[64];
LCID locale;
locale=(LCID)CallService(MS_LANGPACK_GETLOCALE,0,0);
-#endif
+
/* register icons */
ZeroMemory(&sid,sizeof(sid));
@@ -252,13 +252,11 @@ void InitIcons(void)
phIconHandles=(HANDLE*)mir_alloc(nCountriesCount*sizeof(HANDLE));
if(phIconHandles!=NULL)
for(i=0;i<nCountriesCount;++i) {
-#if defined(_UNICODE)
+
MultiByteToWideChar(locale,0,countries[i].szName,-1,szName,SIZEOF(szName));
szName[SIZEOF(szName)-1]=L'\0';
sid.pwszDescription=TranslateW(szName);
-#else
- sid.pszDescription=Translate(countries[i].szName);
-#endif
+
/* create identifier */
wsprintfA(szId,(countries[i].id==0xFFFF)?"%s0x%X":"%s%i","flags_",countries[i].id); /* buffer safe */
index=CountryNumberToBitmapIndex(countries[i].id);
diff --git a/plugins/CountryFlags/version.h b/plugins/CountryFlags/version.h
index 9154d087e9..a778ed0026 100644
--- a/plugins/CountryFlags/version.h
+++ b/plugins/CountryFlags/version.h
@@ -28,8 +28,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define FILE_VERSION_STR "0.1.0.3"
#endif
-#ifdef _UNICODE
- #define PLUGIN_WEBSITE "http://addons.miranda-im.org/details.php?action=viewfile&id=3463"
-#else
- #define PLUGIN_WEBSITE "http://addons.miranda-im.org/details.php?action=viewfile&id=3462"
-#endif
+#define PLUGIN_WEBSITE "http://addons.miranda-im.org/details.php?action=viewfile&id=3463"