Skip to content
This repository was archived by the owner on Apr 20, 2020. It is now read-only.

Commit abcaf15

Browse files
committed
添加上繁体
1 parent 5fe4efc commit abcaf15

5 files changed

Lines changed: 14 additions & 89 deletions

File tree

src/TLib/tmisc.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
Update : 2017-06-12(Mon)
88
Copyright : H.Shirouzu
99
Reference :
10-
Modify : Mapaler 2015-09-09
1110
======================================================================== */
1211

1312
#include "tlib.h"
@@ -1094,22 +1093,6 @@ HWND CloseHelpAll()
10941093

10951094
HWND ShowHelpW(HWND hOwner, const WCHAR *help_dir, const WCHAR *help_file, const WCHAR *section)
10961095
{
1097-
if (NULL != strstr(WtoA(help_file), "http"))
1098-
{
1099-
//从help_file中发现“http”字符,打开URL
1100-
//Found "http" in help_file string, open web URL.
1101-
WCHAR path[MAX_PATH];
1102-
1103-
MakePathW(path, L"", help_file);
1104-
if (section)
1105-
wcscpy(path + wcslen(path), section);
1106-
::ShellExecuteW(NULL, NULL, path, NULL, NULL, SW_SHOW);
1107-
return NULL;
1108-
}
1109-
else
1110-
{
1111-
//从help_file中未发现“http”字符,打开chm
1112-
//Not found "http" in help_file string, open chm file.
11131096
#if defined(ENABLE_HTML_HELP)
11141097
if (!pHtmlHelpW) {
11151098
InitHtmlHelp();
@@ -1126,7 +1109,6 @@ HWND ShowHelpW(HWND hOwner, const WCHAR *help_dir, const WCHAR *help_file, const
11261109
}
11271110
#endif
11281111
return NULL;
1129-
}
11301112
}
11311113

11321114
HWND ShowHelpU8(HWND hOwner, const char *help_dir, const char *help_file, const char *section)

src/fastcopy.rc

67 KB
Binary file not shown.

src/install/install.cpp

Lines changed: 2 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,73 +1494,6 @@ BOOL TInstSheet::EvCreate(LPARAM lParam)
14941494
*/
14951495
BOOL BrowseDirDlg(TWin *parentWin, UINT editCtl, const WCHAR *title, BOOL *is_x64)
14961496
{
1497-
1498-
HRESULT hr = S_OK;
1499-
1500-
// Create a new common open file dialog.
1501-
IFileOpenDialog *pfd = NULL;
1502-
hr = CoCreateInstance(CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER,
1503-
IID_PPV_ARGS(&pfd));
1504-
if (SUCCEEDED(hr))
1505-
{
1506-
// Set the dialog as a folder picker.
1507-
DWORD dwOptions;
1508-
hr = pfd->GetOptions(&dwOptions);
1509-
if (SUCCEEDED(hr))
1510-
{
1511-
hr = pfd->SetOptions(dwOptions | FOS_PICKFOLDERS);
1512-
}
1513-
1514-
// Set the title of the dialog.
1515-
if (SUCCEEDED(hr))
1516-
{
1517-
hr = pfd->SetTitle(title);
1518-
}
1519-
1520-
// Show the open file dialog.
1521-
if (SUCCEEDED(hr))
1522-
{
1523-
hr = pfd->Show(parentWin->hWnd);
1524-
if (SUCCEEDED(hr))
1525-
{
1526-
// Get the selection from the user.
1527-
IShellItem *psiResult = NULL;
1528-
hr = pfd->GetResult(&psiResult);
1529-
if (SUCCEEDED(hr))
1530-
{
1531-
PWSTR pszPath = NULL;
1532-
hr = psiResult->GetDisplayName(SIGDN_FILESYSPATH, &pszPath);
1533-
if (SUCCEEDED(hr))
1534-
{
1535-
//MessageBoxW(parentWin->hWnd, pszPath, L"The selected folder is", MB_OK);
1536-
::SetDlgItemText(parentWin->hWnd, editCtl, WtoAs(pszPath));
1537-
CoTaskMemFree(pszPath);
1538-
}
1539-
psiResult->Release();
1540-
}
1541-
}
1542-
else
1543-
{
1544-
if (hr == HRESULT_FROM_WIN32(ERROR_CANCELLED))
1545-
{
1546-
// User cancelled the dialog...
1547-
}
1548-
}
1549-
}
1550-
1551-
pfd->Release();
1552-
}
1553-
1554-
// Report the error.
1555-
if (FAILED(hr))
1556-
{
1557-
// If it's not that the user cancelled the dialog, report the error in a
1558-
// message box.
1559-
//The original sorce code at : https://code.msdn.microsoft.com/CppShellCommonFileDialog-c18192c7
1560-
if (hr != HRESULT_FROM_WIN32(ERROR_CANCELLED))
1561-
{
1562-
//XP不支持的情况
1563-
15641497
IMalloc *iMalloc = NULL;
15651498
BROWSEINFOW brInfo;
15661499
LPITEMIDLIST pidlBrowse;
@@ -1570,7 +1503,7 @@ BOOL BrowseDirDlg(TWin *parentWin, UINT editCtl, const WCHAR *title, BOOL *is_x6
15701503
if (!SUCCEEDED(SHGetMalloc(&iMalloc)))
15711504
return FALSE;
15721505

1573-
/*if (IsWin7()) {
1506+
if (IsWin7()) {
15741507
WCHAR buf[MAX_PATH];
15751508
GetParentDirW(fileBuf, buf);
15761509
vector<Wstr> wvec;
@@ -1581,7 +1514,7 @@ BOOL BrowseDirDlg(TWin *parentWin, UINT editCtl, const WCHAR *title, BOOL *is_x6
15811514
MakePathW(fileBuf, wvec[0].s(), L"");
15821515
parentWin->SetDlgItemTextW(editCtl, fileBuf);
15831516
return TRUE;
1584-
}*/
1517+
}
15851518

15861519
TBrowseDirDlg dirDlg(fileBuf, is_x64);
15871520
brInfo.hwndOwner = parentWin->hWnd;
@@ -1607,8 +1540,6 @@ BOOL BrowseDirDlg(TWin *parentWin, UINT editCtl, const WCHAR *title, BOOL *is_x6
16071540

16081541
iMalloc->Release();
16091542
return ret;
1610-
}
1611-
}
16121543
}
16131544

16141545
/*

src/install/install.rc

9.88 KB
Binary file not shown.

src/utility.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
Update : 2018-05-28(Mon)
77
Copyright : H.Shirouzu
88
License : GNU General Public License version 3
9+
Modify : Mapaler 2015-09-09
910
======================================================================== */
1011

1112
#include <stdio.h>
@@ -1119,6 +1120,17 @@ ssize_t comma_double(char *s, double val, int precision)
11191120

11201121
void ShowHelp(const WCHAR *dir, const WCHAR *file, const WCHAR *section)
11211122
{
1123+
//从help_file中发现“http”字符,打开URL
1124+
//Found "http" in help_file string, open web URL.
1125+
if (wcsstr(file, L"http")) {
1126+
WCHAR path[MAX_PATH];
1127+
1128+
MakePathW(path, L"", file);
1129+
if (section)
1130+
wcscpy(path + wcslen(path), section);
1131+
::ShellExecuteW(NULL, NULL, path, NULL, NULL, SW_SHOW);
1132+
return;
1133+
}
11221134
if (wcsstr(file, L".chm::")) {
11231135
ShowHelpW(0, dir, file, section);
11241136
return;

0 commit comments

Comments
 (0)