From 84b5cac8e0f148250c44fc91d7d9752dca13dbb6 Mon Sep 17 00:00:00 2001
From: George Hazan <george.hazan@gmail.com>
Date: Thu, 28 May 2015 17:16:36 +0000
Subject: - MS_UTILS_GETBITMAPFILTERSTRINGS - end of story, replaced with
 BmpFilterGetStrings(); - parasite mir_strncat's removed from bitmap filter
 creation; - CMString::AllocSysString/SetSysString removed due to complete
 uselessness; - CMString::Detouch - typo fixed.

git-svn-id: http://svn.miranda-ng.org/main/trunk@13881 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
---
 src/modules/utils/bmpfilter.cpp | 92 -----------------------------------------
 1 file changed, 92 deletions(-)

(limited to 'src/modules')

diff --git a/src/modules/utils/bmpfilter.cpp b/src/modules/utils/bmpfilter.cpp
index dddc7b8ca0..cd9d061e20 100644
--- a/src/modules/utils/bmpfilter.cpp
+++ b/src/modules/utils/bmpfilter.cpp
@@ -138,101 +138,9 @@ static INT_PTR BmpFilterLoadBitmapW(WPARAM, LPARAM lParam)
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-static INT_PTR BmpFilterGetStrings(WPARAM wParam, LPARAM lParam)
-{
-	size_t bytesLeft = wParam;
-	char *filter = (char*)lParam, *pfilter;
-
-	mir_strncpy(filter, Translate("All bitmaps"), bytesLeft); bytesLeft -= mir_strlen(filter);
-	mir_strncat(filter, " (*.bmp;*.jpg;*.gif;*.png)", bytesLeft);
-	pfilter = filter + mir_strlen(filter) + 1; bytesLeft = wParam - (pfilter - filter);
-	mir_strncpy(pfilter, "*.BMP;*.RLE;*.JPG;*.JPEG;*.GIF;*.PNG", bytesLeft);
-	pfilter += mir_strlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
-
-	mir_strncpy(pfilter, Translate("Windows bitmaps"), bytesLeft); bytesLeft -= mir_strlen(pfilter);
-	mir_strncat(pfilter, " (*.bmp;*.rle)", bytesLeft);
-	pfilter += mir_strlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
-	mir_strncpy(pfilter, "*.BMP;*.RLE", bytesLeft);
-	pfilter += mir_strlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
-
-	mir_strncpy(pfilter, Translate("JPEG bitmaps"), bytesLeft); bytesLeft -= mir_strlen(pfilter);
-	mir_strncat(pfilter, " (*.jpg;*.jpeg)", bytesLeft);
-	pfilter += mir_strlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
-	mir_strncpy(pfilter, "*.JPG;*.JPEG", bytesLeft);
-	pfilter += mir_strlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
-
-	mir_strncpy(pfilter, Translate("GIF bitmaps"), bytesLeft); bytesLeft -= mir_strlen(pfilter);
-	mir_strncat(pfilter, " (*.gif)", bytesLeft);
-	pfilter += mir_strlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
-	mir_strncpy(pfilter, "*.GIF", bytesLeft);
-	pfilter += mir_strlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
-
-	mir_strncpy(pfilter, Translate("PNG bitmaps"), bytesLeft); bytesLeft -= mir_strlen(pfilter);
-	mir_strncat(pfilter, " (*.png)", bytesLeft);
-	pfilter += mir_strlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
-	mir_strncpy(pfilter, "*.PNG", bytesLeft);
-	pfilter += mir_strlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
-
-	mir_strncpy(pfilter, Translate("All files"), bytesLeft); bytesLeft -= mir_strlen(pfilter);
-	mir_strncat(pfilter, " (*)", bytesLeft);
-	pfilter += mir_strlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
-	mir_strncpy(pfilter, "*", bytesLeft);
-	pfilter += mir_strlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
-
-	if (bytesLeft) *pfilter = '\0';
-	return 0;
-}
-
-static INT_PTR BmpFilterGetStringsW(WPARAM wParam, LPARAM lParam)
-{
-	size_t bytesLeft = wParam;
-	TCHAR *filter = (TCHAR*)lParam, *pfilter;
-
-	mir_tstrncpy(filter, TranslateT("All bitmaps"), bytesLeft); bytesLeft -= mir_tstrlen(filter);
-	mir_tstrncat(filter, _T(" (*.bmp;*.jpg;*.gif;*.png)"), bytesLeft);
-	pfilter = filter + mir_tstrlen(filter) + 1; bytesLeft = wParam - (pfilter - filter);
-	mir_tstrncpy(pfilter, _T("*.BMP;*.RLE;*.JPG;*.JPEG;*.GIF;*.PNG"), bytesLeft);
-	pfilter += mir_tstrlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
-
-	mir_tstrncpy(pfilter, TranslateT("Windows bitmaps"), bytesLeft); bytesLeft -= mir_tstrlen(pfilter);
-	mir_tstrncat(pfilter, _T(" (*.bmp;*.rle)"), bytesLeft);
-	pfilter += mir_tstrlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
-	mir_tstrncpy(pfilter, _T("*.BMP;*.RLE"), bytesLeft);
-	pfilter += mir_tstrlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
-
-	mir_tstrncpy(pfilter, TranslateT("JPEG bitmaps"), bytesLeft); bytesLeft -= mir_tstrlen(pfilter);
-	mir_tstrncat(pfilter, _T(" (*.jpg;*.jpeg)"), bytesLeft);
-	pfilter += mir_tstrlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
-	mir_tstrncpy(pfilter, _T("*.JPG;*.JPEG"), bytesLeft);
-	pfilter += mir_tstrlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
-
-	mir_tstrncpy(pfilter, TranslateT("GIF bitmaps"), bytesLeft); bytesLeft -= mir_tstrlen(pfilter);
-	mir_tstrncat(pfilter, _T(" (*.gif)"), bytesLeft);
-	pfilter += mir_tstrlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
-	mir_tstrncpy(pfilter, _T("*.GIF"), bytesLeft);
-	pfilter += mir_tstrlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
-
-	mir_tstrncpy(pfilter, TranslateT("PNG bitmaps"), bytesLeft); bytesLeft -= mir_tstrlen(pfilter);
-	mir_tstrncat(pfilter, _T(" (*.png)"), bytesLeft);
-	pfilter += mir_tstrlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
-	mir_tstrncpy(pfilter, _T("*.PNG"), bytesLeft);
-	pfilter += mir_tstrlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
-
-	mir_tstrncpy(pfilter, TranslateT("All files"), bytesLeft); bytesLeft -= mir_tstrlen(pfilter);
-	mir_tstrncat(pfilter, _T(" (*)"), bytesLeft);
-	pfilter += mir_tstrlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
-	mir_tstrncpy(pfilter, _T("*"), bytesLeft);
-	pfilter += mir_tstrlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
-
-	if (bytesLeft) *pfilter = '\0';
-	return 0;
-}
-
 int InitBitmapFilter(void)
 {
 	CreateServiceFunction(MS_UTILS_LOADBITMAP, BmpFilterLoadBitmap);
-	CreateServiceFunction(MS_UTILS_GETBITMAPFILTERSTRINGS, BmpFilterGetStrings);
-	CreateServiceFunction(MS_UTILS_GETBITMAPFILTERSTRINGSW, BmpFilterGetStringsW);
 	CreateServiceFunction(MS_UTILS_LOADBITMAPW, BmpFilterLoadBitmapW);
 	return 0;
 }
-- 
cgit v1.2.3