mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-14 20:11:38 -06:00
4.25 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
47f4915611
commit
af1fe52701
@@ -6,22 +6,18 @@
|
||||
|
||||
#include "Common/StringConvert.h"
|
||||
|
||||
#include "Windows/Defs.h"
|
||||
#include "Windows/FileFind.h"
|
||||
#include "Windows/ResourceString.h"
|
||||
|
||||
#include "../../RegistryUtils.h"
|
||||
#include "../../HelpUtils.h"
|
||||
#include "../../LangUtils.h"
|
||||
#include "../../ProgramLocation.h"
|
||||
|
||||
#include "../../MyLoadMenu.h"
|
||||
|
||||
static CIDLangPair kIDLangPairs[] =
|
||||
{
|
||||
{ IDC_LANG_STATIC_LANG, 0x01000401}
|
||||
};
|
||||
|
||||
static LPCWSTR kLangTopic = L"FM/options.htm#language";
|
||||
static LPCWSTR kLangTopic = L"fm/options.htm#language";
|
||||
|
||||
bool CLangPage::OnInit()
|
||||
{
|
||||
@@ -30,53 +26,40 @@ bool CLangPage::OnInit()
|
||||
|
||||
_langCombo.Attach(GetItem(IDC_LANG_COMBO_LANG));
|
||||
|
||||
int index = _langCombo.AddString(TEXT("English (English)"));
|
||||
CSysString s = NWindows::MyLoadString(IDS_LANG_ENGLISH);
|
||||
s += TEXT(" (");
|
||||
s += NWindows::MyLoadString(IDS_LANG_NATIVE);
|
||||
s += TEXT(")");
|
||||
int index = _langCombo.AddString(s);
|
||||
_langCombo.SetItemData(index, _paths.Size());
|
||||
_paths.Add(TEXT(""));
|
||||
_paths.Add(TEXT("-"));
|
||||
_langCombo.SetCurSel(0);
|
||||
|
||||
UString folderPath;
|
||||
if (::GetProgramFolderPath(folderPath))
|
||||
CObjectVector<CLangEx> langs;
|
||||
LoadLangs(langs);
|
||||
for (int i = 0; i < langs.Size(); i++)
|
||||
{
|
||||
folderPath += L"Lang\\";
|
||||
NWindows::NFile::NFind::CEnumeratorW enumerator(folderPath + L"*.txt");
|
||||
NWindows::NFile::NFind::CFileInfoW fileInfo;
|
||||
while (enumerator.Next(fileInfo))
|
||||
const CLangEx &lang = langs[i];
|
||||
UString name;
|
||||
UString englishName, nationalName;
|
||||
if (lang.Lang.GetMessage(0x00000000, englishName))
|
||||
name = englishName;
|
||||
else
|
||||
name = lang.ShortName;
|
||||
if (lang.Lang.GetMessage(0x00000001, nationalName))
|
||||
{
|
||||
if (fileInfo.IsDirectory())
|
||||
continue;
|
||||
CLang lang;
|
||||
UString filePath = folderPath + fileInfo.Name;
|
||||
UString shortName;
|
||||
const kExtSize = 4;
|
||||
if (fileInfo.Name.Right(kExtSize) != L".txt")
|
||||
continue;
|
||||
shortName = fileInfo.Name.Left(fileInfo.Name.Length() - kExtSize);
|
||||
if (lang.Open(GetSystemString(filePath)))
|
||||
if (!nationalName.IsEmpty())
|
||||
{
|
||||
UString name;
|
||||
UString englishName, nationalName;
|
||||
if (lang.GetMessage(0x00000000, englishName))
|
||||
name = englishName;
|
||||
else
|
||||
name = shortName;
|
||||
if (lang.GetMessage(0x00000001, nationalName))
|
||||
{
|
||||
if (!nationalName.IsEmpty())
|
||||
{
|
||||
name += L" (";
|
||||
name += nationalName;
|
||||
name += L")";
|
||||
}
|
||||
}
|
||||
index = _langCombo.AddString(GetSystemString(name));
|
||||
_langCombo.SetItemData(index, _paths.Size());
|
||||
_paths.Add(GetSystemString(shortName));
|
||||
if (g_LangID.CollateNoCase(GetSystemString(shortName)) == 0 ||
|
||||
g_LangID.CollateNoCase(GetSystemString(filePath)) == 0)
|
||||
_langCombo.SetCurSel(index);
|
||||
name += L" (";
|
||||
name += nationalName;
|
||||
name += L")";
|
||||
}
|
||||
}
|
||||
index = _langCombo.AddString(GetSystemString(name));
|
||||
_langCombo.SetItemData(index, _paths.Size());
|
||||
_paths.Add(GetSystemString(lang.ShortName));
|
||||
if (g_LangID.CollateNoCase(GetSystemString(lang.ShortName)) == 0)
|
||||
_langCombo.SetCurSel(index);
|
||||
}
|
||||
return CPropertyPage::OnInit();
|
||||
}
|
||||
@@ -105,4 +88,3 @@ bool CLangPage::OnCommand(int code, int itemID, LPARAM param)
|
||||
}
|
||||
return CPropertyPage::OnCommand(code, itemID, param);
|
||||
}
|
||||
|
||||
|
||||
16
7zip/FileManager/Resource/LangPage/StdAfx.h
Executable file
16
7zip/FileManager/Resource/LangPage/StdAfx.h
Executable file
@@ -0,0 +1,16 @@
|
||||
// stdafx.h
|
||||
|
||||
#ifndef __STDAFX_H
|
||||
#define __STDAFX_H
|
||||
|
||||
#define _WIN32_WINNT 0x0400
|
||||
|
||||
// it's for Windows NT supporting (MENUITEMINFOW)
|
||||
#define WINVER 0x0400
|
||||
|
||||
#include <windows.h>
|
||||
#include <commctrl.h>
|
||||
|
||||
#include "Common/NewHandler.h"
|
||||
|
||||
#endif
|
||||
@@ -1,19 +1,6 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by resource.rc
|
||||
//
|
||||
#define IDD_LANG 900
|
||||
#define IDD_LANG 900
|
||||
#define IDS_LANG_ENGLISH 995
|
||||
#define IDS_LANG_NATIVE 996
|
||||
|
||||
#define IDC_LANG_STATIC_LANG 1000
|
||||
#define IDC_LANG_COMBO_LANG 1001
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 135
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1002
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,99 +1,21 @@
|
||||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
#include "../../../GuiCommon.rc"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
#define xSize2 238
|
||||
#define ySize2 204
|
||||
#define xSize (xSize2 + marg + marg)
|
||||
#define ySize (ySize2 + marg + marg)
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Russian resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
|
||||
#pragma code_page(1251)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // Russian resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_LANG DIALOG DISCARDABLE 0, 0, 210, 154
|
||||
STYLE DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
|
||||
IDD_LANG DIALOG 0, 0, xSize, ySize MY_PAGE_STYLE
|
||||
CAPTION "Language"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
MY_FONT
|
||||
BEGIN
|
||||
LTEXT "Language:",IDC_LANG_STATIC_LANG,7,7,196,8
|
||||
COMBOBOX IDC_LANG_COMBO_LANG,7,20,146,124,CBS_DROPDOWNLIST |
|
||||
CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Language:", IDC_LANG_STATIC_LANG, marg, marg, xSize2, 8
|
||||
COMBOBOX IDC_LANG_COMBO_LANG, marg, 20, 146, ySize2 - 12, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDD_LANG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 203
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 147
|
||||
END
|
||||
IDS_LANG_ENGLISH "English"
|
||||
IDS_LANG_NATIVE "English"
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user