From 703e6701f8bc7e3ee2684bb79c0e171fb3cf6a0c Mon Sep 17 00:00:00 2001
From: dartraiden <wowemuh@gmail.com>
Date: Fri, 5 Jan 2018 18:23:08 +0300
Subject: no need to display langpack author e-mail (some authors already
 retired from project)

---
 plugins/ContextHelp/res/resource.rc  |  2 --
 plugins/ContextHelp/src/help.h       |  1 -
 plugins/ContextHelp/src/helppack.cpp | 46 ------------------------------------
 plugins/ContextHelp/src/options.cpp  | 11 ---------
 plugins/ContextHelp/src/resource.h   |  2 --
 5 files changed, 62 deletions(-)

(limited to 'plugins')

diff --git a/plugins/ContextHelp/res/resource.rc b/plugins/ContextHelp/res/resource.rc
index 05f66326cc..cc9d298f08 100644
--- a/plugins/ContextHelp/res/resource.rc
+++ b/plugins/ContextHelp/res/resource.rc
@@ -133,8 +133,6 @@ BEGIN
     EDITTEXT        IDC_LANGAUTHORS,74,78,220,18,ES_MULTILINE | 
                     ES_AUTOVSCROLL | ES_READONLY | NOT WS_BORDER | 
                     WS_VSCROLL
-    RTEXT           "E-mail:",IDC_LANGEMAILLABEL,5,99,66,8,SS_NOPREFIX
-    CONTROL         "",IDC_LANGEMAIL,"Hyperlink",WS_TABSTOP,76,99,207,10
     RTEXT           "Last modified using:",IDC_LANGMODUSINGLABEL,5,112,66,9,
                     SS_NOPREFIX
     EDITTEXT        IDC_LANGMODUSING,75,112,207,12,ES_AUTOHSCROLL | 
diff --git a/plugins/ContextHelp/src/help.h b/plugins/ContextHelp/src/help.h
index 3eb43f9982..f12c38061e 100644
--- a/plugins/ContextHelp/src/help.h
+++ b/plugins/ContextHelp/src/help.h
@@ -124,7 +124,6 @@ typedef struct {
 	LCID Locale;
 	WORD codepage;
 	char szAuthors[1024];
-	char szAuthorEmail[128];
 	char szLastModifiedUsing[64];
 	char szPluginsIncluded[4080];
 	char szVersion[21];
diff --git a/plugins/ContextHelp/src/helppack.cpp b/plugins/ContextHelp/src/helppack.cpp
index 8bf1fea05b..bfb08f337a 100644
--- a/plugins/ContextHelp/src/helppack.cpp
+++ b/plugins/ContextHelp/src/helppack.cpp
@@ -83,49 +83,6 @@ static void CleanupAuthors(char *szAuthors)
 	}
 }
 
-static void CleanupEmail(char *szAuthorEmail)
-{
-	char c, *p, *pAt;
-	/* replace ' dot ' with '.' (may be removed) */
-	p = strstr(szAuthorEmail, " dot ");
-	if (p != NULL) {
-		*p = '.';
-		MoveMemory(p + 1, p + 5, lstrlenA(p + 5) + 1);
-	}
-	/* also allow ' at ' instead of '@' for obfuscation */
-	p = strstr(szAuthorEmail, " at ");
-	if (p != NULL) {
-		*p = '@';
-		MoveMemory(p + 1, p + 4, lstrlenA(p + 4) + 1);
-	}
-	/* is valid? */
-	pAt = strchr(szAuthorEmail, '@');
-	if (pAt == NULL) {
-		szAuthorEmail[0] = '\0';
-		return;
-	}
-	/* strip-off extra text except exactly one email address
-	* this is needed as a click on the email addres brings up the mail client */
-	for (c = ' ';; c = ',') {
-		p = strchr(pAt, c);
-		if (p != NULL)
-			*p = '\0';
-		p = strrchr(szAuthorEmail, c);
-		if (p != NULL)
-			MoveMemory(szAuthorEmail, p + 1, lstrlenA(p + 1) + 1);
-		if (c == ',')
-			break;
-	}
-	p = strstr(szAuthorEmail, "__");
-	if (p != NULL)
-		MoveMemory(szAuthorEmail, p + 2, lstrlenA(p + 2) + 1);
-	/* lower case */
-	CharLowerA(szAuthorEmail);
-	/* 'none' specified */
-	if (!lstrcmpiA(szAuthorEmail, "none"))
-		szAuthorEmail[0] = '\0';
-}
-
 static void CleanupLastModifiedUsing(char *szLastModifiedUsing, int nSize)
 {
 	char *p;
@@ -208,8 +165,6 @@ static BOOL LoadPackData(HELPPACK_INFO *pack, BOOL fEnabledPacks, const char *ps
 			if ((sizeof(pack->szAuthors) - lstrlenA(pack->szAuthors))>0) /* buffer safe */
 				mir_snprintf(buf, sizeof(pack->szAuthors) - lstrlenA(pack->szAuthors), (pack->szAuthors[0] == '\0') ? "%s" : " %s", pszColon + 1);
 		}
-		else if (!lstrcmpA(line, "Author-email") && !pack->szAuthorEmail[0])
-			lstrcpynA(pack->szAuthorEmail, pszColon + 1, sizeof(pack->szAuthorEmail)); /* buffer safe */
 		else if (!lstrcmpA(line, "Locale") && pack->flags&HPF_NOLOCALE) {
 			pack->Locale = MAKELCID((USHORT)strtol(pszColon + 1, NULL, 16), SORT_DEFAULT);
 			if (pack->Locale)
@@ -230,7 +185,6 @@ static BOOL LoadPackData(HELPPACK_INFO *pack, BOOL fEnabledPacks, const char *ps
 		pack->flags |= HPF_DEFAULT;
 	CleanupLanguage(szLanguageA, pack->Locale);
 	CleanupAuthors(pack->szAuthors);
-	CleanupEmail(pack->szAuthorEmail);
 	CleanupLastModifiedUsing(pack->szLastModifiedUsing, sizeof(pack->szLastModifiedUsing));
 	/* codepage */
 	if (!(pack->flags&HPF_NOLOCALE))
diff --git a/plugins/ContextHelp/src/options.cpp b/plugins/ContextHelp/src/options.cpp
index 3ba9212169..a3234d6bac 100644
--- a/plugins/ContextHelp/src/options.cpp
+++ b/plugins/ContextHelp/src/options.cpp
@@ -240,7 +240,6 @@ static void DisplayPackInfo(HWND hwndDlg, const HELPPACK_INFO *pack)
 		const int controls[] = { IDC_LANGNOTINCLUDEDLABEL, IDC_LANGNOTINCLUDED, IDC_LANGDATELABEL, IDC_LANGDATE,
 			IDC_LANGLOCALELABEL, IDC_LANGLOCALE, IDC_LANGVERSIONLABEL, IDC_LANGVERSION,
 			IDC_LANGMODUSINGLABEL, IDC_LANGMODUSING, IDC_LANGAUTHORSLABEL, IDC_LANGAUTHORS,
-			IDC_LANGEMAILLABEL, IDC_LANGEMAIL };
 		for (int i = 0; i < _countof(controls); i++)
 			ShowWindow(GetDlgItem(hwndDlg, controls[i]), (pack != NULL) ? SW_SHOW : SW_HIDE);
 		ShowWindow(GetDlgItem(hwndDlg, IDC_NOPACK), (pack != NULL) ? SW_HIDE : SW_SHOW);
@@ -307,7 +306,6 @@ static void DisplayPackInfo(HWND hwndDlg, const HELPPACK_INFO *pack)
 	/* general */
 	SetDlgItemTextA(hwndDlg, IDC_LANGMODUSING, pack->szLastModifiedUsing);
 	SetDlgItemTextA(hwndDlg, IDC_LANGAUTHORS, pack->szAuthors);
-	SetDlgItemTextA(hwndDlg, IDC_LANGEMAIL, pack->szAuthorEmail);
 	SetDlgItemText(hwndDlg, IDC_LANGINFOFRAME, TranslateTS(pack->szLanguage));
 }
 
@@ -495,15 +493,6 @@ static INT_PTR CALLBACK LangOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
 
 	case WM_COMMAND:
 		switch (LOWORD(wParam)) {
-		case IDC_LANGEMAIL:
-			{
-				char buf[512];
-				mir_strcpy(buf, "mailto:");
-				if (GetDlgItemTextA(hwndDlg, LOWORD(wParam), &buf[7], _countof(buf) - 7))
-					Utils_OpenUrl(buf);
-				return TRUE;
-			}
-
 		case IDC_MORELANG:
 			Utils_OpenUrl("https://wiki.miranda-ng.org/index.php?title=Download");
 			return TRUE;
diff --git a/plugins/ContextHelp/src/resource.h b/plugins/ContextHelp/src/resource.h
index 6710ecaf41..45ef44fd9c 100644
--- a/plugins/ContextHelp/src/resource.h
+++ b/plugins/ContextHelp/src/resource.h
@@ -18,8 +18,6 @@
 #define IDC_LANGINFOFRAME               1009
 #define IDC_LANGAUTHORSLABEL            1010
 #define IDC_LANGAUTHORS                 1011
-#define IDC_LANGEMAILLABEL              1012
-#define IDC_LANGEMAIL                   1013
 #define IDC_LANGMODUSINGLABEL           1014
 #define IDC_LANGMODUSING                1015
 #define IDC_LANGDATELABEL               1016
-- 
cgit v1.2.3