From 0999d9f9a1654c4fcbd1fc4f4fcf27080dd979e2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 21 Oct 2012 14:14:22 +0000 Subject: - a bit less crazy implementation of flags; - fix for icons' names in icolib git-svn-id: http://svn.miranda-ng.org/main/trunk@2023 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CountryFlags/src/main.cpp | 49 ++------------------------------------- 1 file changed, 2 insertions(+), 47 deletions(-) (limited to 'plugins/CountryFlags/src/main.cpp') diff --git a/plugins/CountryFlags/src/main.cpp b/plugins/CountryFlags/src/main.cpp index 462672292a..d63d302bd9 100644 --- a/plugins/CountryFlags/src/main.cpp +++ b/plugins/CountryFlags/src/main.cpp @@ -47,35 +47,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) return TRUE; } -static void InstallFile(const TCHAR *pszFileName,const TCHAR *pszDestSubDir) -{ - TCHAR szFileFrom[MAX_PATH+1],szFileTo[MAX_PATH+1],*p; - HANDLE hFile; - - if (!GetModuleFileName(hInst,szFileFrom,SIZEOF(szFileFrom)-lstrlen(pszFileName))) - return; - p=_tcsrchr(szFileFrom,_T('\\')); - if(p!=NULL) *(++p)=0; - lstrcat(szFileFrom,pszFileName); /* buffer safe */ - - hFile=CreateFile(szFileFrom,0,FILE_SHARE_READ,0,OPEN_EXISTING,0,0); - if(hFile==INVALID_HANDLE_VALUE) return; - CloseHandle(hFile); - - if (!GetModuleFileName(NULL,szFileTo,SIZEOF(szFileTo)-lstrlen(pszDestSubDir)-lstrlen(pszFileName))) - return; - p=_tcsrchr(szFileTo,_T('\\')); - if(p!=NULL) *(++p)=0; - lstrcat(szFileTo,pszDestSubDir); /* buffer safe */ - CreateDirectory(szFileTo,NULL); - lstrcat(szFileTo,pszFileName); /* buffer safe */ - - if (!MoveFile(szFileFrom,szFileTo) && GetLastError()==ERROR_ALREADY_EXISTS) { - DeleteFile(szFileTo); - MoveFile(szFileFrom,szFileTo); - } -} - extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) { return &pluginInfo; @@ -85,29 +56,13 @@ extern "C" __declspec(dllexport) int Load(void) { mir_getLP(&pluginInfo); - /* existance of MS_SYSTEM_GETVERSION and MS_LANGPACK_TRANSLATESTRING - * is checked in MirandaPluginInfo(). - * Not placed in MirandaPluginInfo() to avoid MessageBoxes on plugin options. - * Using ANSI as LANG_UNICODE might not be supported. */ - if(CallService(MS_SYSTEM_GETVERSION,0,0)