TortoiseGit日本語言語ファイル作成
Revisión | b3e34065d421004d88d3f03fd428ee9f6498935c (tree) |
---|---|
Tiempo | 2010-01-19 22:22:09 |
Autor | Frank Li <lznuaa@gmai...> |
Commiter | Frank Li |
Fixed issue #275: Load gitweb for 'Browse' button
Signed-off-by: Frank Li <lznuaa@gmail.com>
@@ -25,6 +25,7 @@ CCloneDlg::CCloneDlg(CWnd* pParent /*=NULL*/) | ||
25 | 25 | m_strSVNTags = _T("tags"); |
26 | 26 | m_strSVNBranchs = _T("branches"); |
27 | 27 | |
28 | + m_regBrowseUrl = CRegDWORD(_T("Software\\TortoiseGit\\TortoiseProc\\CloneBrowse"),0); | |
28 | 29 | m_nSVNFrom = 0; |
29 | 30 | } |
30 | 31 |
@@ -37,6 +38,7 @@ void CCloneDlg::DoDataExchange(CDataExchange* pDX) | ||
37 | 38 | CResizableStandAloneDialog::DoDataExchange(pDX); |
38 | 39 | DDX_Control(pDX, IDC_URLCOMBO, m_URLCombo); |
39 | 40 | DDX_Control(pDX, IDC_PUTTYKEYFILE, m_PuttyKeyCombo); |
41 | + DDX_Control(pDX, IDC_CLONE_BROWSE_URL, m_BrowseUrl); | |
40 | 42 | DDX_Text(pDX, IDC_CLONE_DIR, m_Directory); |
41 | 43 | DDX_Check(pDX,IDC_PUTTYKEY_AUTOLOAD, m_bAutoloadPuttyKeyFile); |
42 | 44 |
@@ -89,6 +91,10 @@ BOOL CCloneDlg::OnInitDialog() | ||
89 | 91 | if(window) |
90 | 92 | SHAutoComplete(window->m_hWnd, SHACF_FILESYSTEM); |
91 | 93 | |
94 | + this->m_BrowseUrl.AddEntry(CString(_T("Dir..."))); | |
95 | + this->m_BrowseUrl.AddEntry(CString(_T("Web"))); | |
96 | + m_BrowseUrl.SetCurrentEntry(m_regBrowseUrl); | |
97 | + | |
92 | 98 | m_PuttyKeyCombo.SetPathHistory(TRUE); |
93 | 99 | m_PuttyKeyCombo.LoadHistory(_T("Software\\TortoiseGit\\History\\puttykey"), _T("key")); |
94 | 100 | m_PuttyKeyCombo.SetCurSel(0); |
@@ -154,6 +160,18 @@ void CCloneDlg::OnBnClickedCloneBrowseUrl() | ||
154 | 160 | CBrowseFolder browseFolder; |
155 | 161 | browseFolder.m_style = BIF_EDITBOX | BIF_NEWDIALOGSTYLE | BIF_RETURNFSANCESTORS | BIF_RETURNONLYFSDIRS; |
156 | 162 | CString strCloneDirectory; |
163 | + | |
164 | + int sel = this->m_BrowseUrl.GetCurrentEntry(); | |
165 | + this->m_regBrowseUrl = sel; | |
166 | + | |
167 | + if( sel == 1 ) | |
168 | + { | |
169 | + CString str; | |
170 | + m_URLCombo.GetWindowText(str); | |
171 | + ShellExecute(NULL, _T("open"), str, NULL,NULL, SW_SHOW); | |
172 | + return ; | |
173 | + } | |
174 | + | |
157 | 175 | this->m_URLCombo.GetWindowTextW(strCloneDirectory); |
158 | 176 | if (browseFolder.Show(GetSafeHwnd(), strCloneDirectory) == CBrowseFolder::OK) |
159 | 177 | { |
@@ -2,8 +2,8 @@ | ||
2 | 2 | |
3 | 3 | #include "StandAloneDlg.h" |
4 | 4 | #include "HistoryCombo.h" |
5 | - | |
6 | - | |
5 | +#include "MenuButton.h" | |
6 | +#include "registry.h" | |
7 | 7 | |
8 | 8 | // CCloneDlg dialog |
9 | 9 |
@@ -50,6 +50,9 @@ public: | ||
50 | 50 | CString m_strSVNBranchs; |
51 | 51 | int m_nSVNFrom; |
52 | 52 | |
53 | + CMenuButton m_BrowseUrl; | |
54 | + CRegDWORD m_regBrowseUrl; | |
55 | + | |
53 | 56 | afx_msg void OnBnClickedPuttykeyfileBrowse(); |
54 | 57 | afx_msg void OnBnClickedPuttykeyAutoload(); |
55 | 58 | afx_msg void OnCbnSelchangeUrlcombo(); |