diff options
author | George Hazan <george.hazan@gmail.com> | 2023-11-15 18:47:44 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-11-15 18:47:44 +0300 |
commit | 7bc82359efba8a0fde2bcfe1b80fb7c19b60827a (patch) | |
tree | fb9d4a2dd690306ce82078ec2cd5bc843f8e5185 /src/mir_app | |
parent | 446cce28b7da52bd7263665b1a4c74e05cfd18b6 (diff) |
fixes #3931 (Langpacks: delete "Last-Modified-Using" fileld)
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/res/resource.rc | 2 | ||||
-rw-r--r-- | src/mir_app/src/langpack.h | 2 | ||||
-rw-r--r-- | src/mir_app/src/lpopts.cpp | 43 | ||||
-rw-r--r-- | src/mir_app/src/resource.h | 2 |
4 files changed, 20 insertions, 29 deletions
diff --git a/src/mir_app/res/resource.rc b/src/mir_app/res/resource.rc index 047b809dd6..f72a3d07fe 100644 --- a/src/mir_app/res/resource.rc +++ b/src/mir_app/res/resource.rc @@ -694,8 +694,6 @@ BEGIN 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,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
EDITTEXT IDC_LANGDATE,86,118,206,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
RTEXT "Locale:",IDC_STATIC,9,132,72,9,SS_NOPREFIX
diff --git a/src/mir_app/src/langpack.h b/src/mir_app/src/langpack.h index 1683e3e0ac..00e3be3814 100644 --- a/src/mir_app/src/langpack.h +++ b/src/mir_app/src/langpack.h @@ -42,7 +42,7 @@ struct LANGPACK_INFO wchar_t tszLanguage[64];
LCID Locale;
uint16_t codepage;
- CMStringA szAuthors, szLastModifiedUsing;
+ CMStringA szAuthors;
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 24818c95b2..eb7700b4c4 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;
- CCtrlBase m_lastModUsing;
CCtrlBase m_date;
CCtrlBase m_locale;
CCtrlButton m_reload;
@@ -72,7 +71,7 @@ CLangpackDlg::CLangpackDlg() : CDlgBase(g_plugin, IDD_OPT_LANGUAGES),
m_languages(this, IDC_LANGUAGES), m_infoFrame(this, IDC_LANGINFOFRAME),
m_authors(this, IDC_LANGAUTHORS),
- m_locale(this, IDC_LANGLOCALE), m_lastModUsing(this, IDC_LANGMODUSING),
+ m_locale(this, IDC_LANGLOCALE),
m_date(this, IDC_LANGDATE), m_reload(this, IDC_RELOAD),
m_more(this, IDC_MORELANG, "https://wiki.miranda-ng.org/index.php?title=Langpacks#Download")
{
@@ -118,29 +117,26 @@ void CLangpackDlg::LoadLangpacks() FindClose(hFind);
}
- { // default langpack: English
- LANGPACK_INFO pack;
- pack.flags = LPF_DEFAULT;
- pack.Locale = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT);
- mir_wstrcpy(pack.tszLanguage, L"English");
- pack.szAuthors = "Miranda NG team";
- uint32_t v = Miranda_GetVersion();
- pack.szLastModifiedUsing.Format("%d.%d.%d", ((v >> 24) & 0xFF), ((v >> 16) & 0xFF), ((v >> 8) & 0xFF));
-
- if (GetModuleFileName(nullptr, pack.tszFullPath, _countof(pack.tszFullPath))) {
- mir_wstrcpy(pack.tszFileName, L"default");
- HANDLE hFile = CreateFile(pack.tszFileName, 0, FILE_SHARE_READ, nullptr, OPEN_EXISTING, 0, nullptr);
- if (hFile != INVALID_HANDLE_VALUE) {
- GetFileTime(hFile, nullptr, nullptr, &pack.ftFileDate);
- CloseHandle(hFile);
- }
+ // default langpack: English
+ LANGPACK_INFO pack;
+ pack.flags = LPF_DEFAULT;
+ pack.Locale = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT);
+ mir_wstrcpy(pack.tszLanguage, L"English");
+ pack.szAuthors = "Miranda NG team";
+
+ if (GetModuleFileName(nullptr, pack.tszFullPath, _countof(pack.tszFullPath))) {
+ mir_wstrcpy(pack.tszFileName, L"default");
+ HANDLE hFile = CreateFile(pack.tszFileName, 0, FILE_SHARE_READ, nullptr, OPEN_EXISTING, 0, nullptr);
+ if (hFile != INVALID_HANDLE_VALUE) {
+ GetFileTime(hFile, nullptr, nullptr, &pack.ftFileDate);
+ CloseHandle(hFile);
}
+ }
- if (!isPackFound)
- pack.flags |= LPF_ENABLED;
+ if (!isPackFound)
+ pack.flags |= LPF_ENABLED;
- LoadLangpack(&pack);
- }
+ LoadLangpack(&pack);
}
void CLangpackDlg::LoadLangpack(LANGPACK_INFO *pack)
@@ -188,9 +184,8 @@ void CLangpackDlg::DisplayPackInfo(const LANGPACK_INFO *pack) wchar_t szDate[128]; szDate[0] = 0;
if (FileTimeToSystemTime(&pack->ftFileDate, &stFileDate))
GetDateFormat(Langpack_GetDefaultLocale(), DATE_SHORTDATE, &stFileDate, nullptr, szDate, _countof(szDate));
- m_date.SetText(szDate);
- m_lastModUsing.SetText(ptrW(mir_utf8decodeW(pack->szLastModifiedUsing)));
+ m_date.SetText(szDate);
m_authors.SetText(ptrW(mir_utf8decodeW(pack->szAuthors)));
m_infoFrame.SetText(TranslateW(pack->tszLanguage));
}
diff --git a/src/mir_app/src/resource.h b/src/mir_app/src/resource.h index fc3489b180..b7f4337a30 100644 --- a/src/mir_app/src/resource.h +++ b/src/mir_app/src/resource.h @@ -191,10 +191,8 @@ #define IDC_DATE 1006
#define IDC_DUMPRECV 1006
#define IDC_AUTOCLEAR 1007
-#define IDC_LANGMODUSINGLABEL 1007
#define IDC_MSG 1008
#define IDC_PROXYDNS 1008
-#define IDC_LANGMODUSING 1008
#define IDC_NAME 1009
#define IDC_PROXYTYPE 1009
#define IDC_LANGDATELABEL 1009
|