diff options
-rw-r--r-- | plugins/ContextHelp/res/resource.rc | 2 | ||||
-rw-r--r-- | plugins/ContextHelp/src/help.h | 1 | ||||
-rw-r--r-- | plugins/ContextHelp/src/helppack.cpp | 46 | ||||
-rw-r--r-- | plugins/ContextHelp/src/options.cpp | 11 | ||||
-rw-r--r-- | plugins/ContextHelp/src/resource.h | 2 | ||||
-rw-r--r-- | src/mir_app/res/resource.rc | 4 | ||||
-rw-r--r-- | src/mir_app/src/langpack.h | 2 | ||||
-rw-r--r-- | src/mir_app/src/lpopts.cpp | 17 | ||||
-rw-r--r-- | src/mir_app/src/resource.h | 2 | ||||
-rw-r--r-- | src/mir_core/src/langpack.cpp | 4 |
10 files changed, 3 insertions, 88 deletions
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
diff --git a/src/mir_app/res/resource.rc b/src/mir_app/res/resource.rc index 1ccb6827a8..c3130cb271 100644 --- a/src/mir_app/res/resource.rc +++ b/src/mir_app/res/resource.rc @@ -686,9 +686,7 @@ BEGIN RTEXT "Current language:",IDC_STATIC,5,7,76,8
GROUPBOX "",IDC_LANGINFOFRAME,5,18,291,153,WS_GROUP
RTEXT "Author(s):",IDC_LANGAUTHORSLABEL,9,29,72,9,SS_NOPREFIX
- EDITTEXT IDC_LANGAUTHORS,86,27,206,61,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL
- RTEXT "E-mail:",IDC_LANGEMAILLABEL,9,92,72,8,SS_NOPREFIX
- CONTROL "",IDC_LANGEMAIL,"Hyperlink",WS_TABSTOP,86,92,206,10
+ EDITTEXT IDC_LANGAUTHORS,86,27,206,71,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL
RTEXT "Last modified using:",IDC_LANGMODUSINGLABEL,9,105,72,9,SS_NOPREFIX
EDITTEXT IDC_LANGMODUSING,86,105,206,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
RTEXT "Date:",IDC_LANGDATELABEL,9,118,72,9,SS_NOPREFIX
diff --git a/src/mir_app/src/langpack.h b/src/mir_app/src/langpack.h index eb151d4b70..92d60c0fe8 100644 --- a/src/mir_app/src/langpack.h +++ b/src/mir_app/src/langpack.h @@ -40,7 +40,7 @@ struct LANGPACK_INFO wchar_t tszLanguage[64];
LCID Locale;
WORD codepage;
- CMStringA szAuthors, szAuthorEmail, szLastModifiedUsing;
+ CMStringA szAuthors, szLastModifiedUsing;
FILETIME ftFileDate;
wchar_t tszFileName[MAX_PATH]; /* just the file name itself */
wchar_t tszFullPath[MAX_PATH]; /* full path to the langpack */
diff --git a/src/mir_app/src/lpopts.cpp b/src/mir_app/src/lpopts.cpp index 2e9cc46566..c37af3109a 100644 --- a/src/mir_app/src/lpopts.cpp +++ b/src/mir_app/src/lpopts.cpp @@ -45,7 +45,6 @@ class CLangpackDlg : public CDlgBase CCtrlCombo m_languages;
CCtrlBase m_infoFrame;
CCtrlBase m_authors;
- CCtrlButton m_email;
CCtrlBase m_lastModUsing;
CCtrlBase m_date;
CCtrlBase m_locale;
@@ -63,7 +62,6 @@ protected: void OnDestroy();
void Languages_OnChange(CCtrlBase*);
- void Email_OnClick(CCtrlBase*);
void Reload_OnClick(CCtrlBase*);
public:
@@ -73,13 +71,12 @@ public: CLangpackDlg::CLangpackDlg()
: CDlgBase(g_hInst, IDD_OPT_LANGUAGES),
m_languages(this, IDC_LANGUAGES), m_infoFrame(this, IDC_LANGINFOFRAME),
- m_authors(this, IDC_LANGAUTHORS), m_email(this, IDC_LANGEMAIL),
+ m_authors(this, IDC_LANGAUTHORS),
m_locale(this, IDC_LANGLOCALE), m_lastModUsing(this, IDC_LANGMODUSING),
m_date(this, IDC_LANGDATE), m_reload(this, IDC_RELOAD),
m_more(this, IDC_MORELANG, "https://wiki.miranda-ng.org/index.php?title=Langpacks/en#Download")
{
m_languages.OnChange = Callback(this, &CLangpackDlg::Languages_OnChange);
- m_email.OnClick = Callback(this, &CLangpackDlg::Email_OnClick);
m_reload.OnClick = Callback(this, &CLangpackDlg::Reload_OnClick);
}
@@ -126,7 +123,6 @@ void CLangpackDlg::LoadLangpacks() pack.Locale = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT);
mir_wstrcpy(pack.tszLanguage, L"English");
pack.szAuthors = "Miranda NG team";
- pack.szAuthorEmail = "project-info@miranda-ng.org";
DWORD v = Miranda_GetVersion();
pack.szLastModifiedUsing.Format("%d.%d.%d", ((v >> 24) & 0xFF), ((v >> 16) & 0xFF), ((v >> 8) & 0xFF));
@@ -198,7 +194,6 @@ void CLangpackDlg::DisplayPackInfo(const LANGPACK_INFO *pack) m_lastModUsing.SetText(ptrW(mir_utf8decodeW(pack->szLastModifiedUsing)));
m_authors.SetText(ptrW(mir_utf8decodeW(pack->szAuthors)));
- m_email.SetText(ptrW(mir_utf8decodeW(pack->szAuthorEmail)));
m_infoFrame.SetText(TranslateW(pack->tszLanguage));
}
@@ -212,16 +207,6 @@ void CLangpackDlg::Languages_OnChange(CCtrlBase*) m_reload.Enable((pack->flags & LPF_ENABLED) && !(pack->flags & LPF_DEFAULT));
}
-void CLangpackDlg::Email_OnClick(CCtrlBase*)
-{
- ptrA email(m_email.GetTextA());
- if (email) {
- char buf[512];
- mir_snprintf(buf, "mailto:%s", email);
- Utils_OpenUrl(buf);
- }
-}
-
void CLangpackDlg::Reload_OnClick(CCtrlBase*)
{
m_reload.Enable(FALSE);
diff --git a/src/mir_app/src/resource.h b/src/mir_app/src/resource.h index ad127816eb..04055d5116 100644 --- a/src/mir_app/src/resource.h +++ b/src/mir_app/src/resource.h @@ -170,10 +170,8 @@ #define IDC_LANGAUTHORS 1004
#define IDC_FROM 1005
#define IDC_AUTOMIN 1005
-#define IDC_LANGEMAILLABEL 1005
#define IDC_DATE 1006
#define IDC_DUMPRECV 1006
-#define IDC_LANGEMAIL 1006
#define IDC_AUTOCLEAR 1007
#define IDC_LANGMODUSINGLABEL 1007
#define IDC_MSG 1008
diff --git a/src/mir_core/src/langpack.cpp b/src/mir_core/src/langpack.cpp index 295edb9081..83885656fa 100644 --- a/src/mir_core/src/langpack.cpp +++ b/src/mir_core/src/langpack.cpp @@ -343,10 +343,6 @@ static int LoadLangDescr(LANGPACK_INFO &lpinfo, FILE *fp, char *line, int &start szAuthors.AppendChar(' ');
szAuthors.Append(lrtrim(pszColon));
}
- else if (!mir_strcmp(line, "Author-email")) {
- lpinfo.szAuthorEmail = pszColon;
- lpinfo.szAuthorEmail.Trim();
- }
else if (!mir_strcmp(line, "Locale")) {
char szBuf[20], *stopped;
|