TortoiseGit日本語言語ファイル作成
Revisión | 588f1a6cb8ca51c1318db041bd0f228c84be313e (tree) |
---|---|
Tiempo | 2010-01-23 21:09:06 |
Autor | Frank Li <lznuaa@gmai...> |
Commiter | Frank Li |
Log can refresh when Click Rev button.
Signed-off-by: Frank Li <lznuaa@gmail.com>
@@ -129,6 +129,7 @@ CGit::CGit(void) | ||
129 | 129 | GetCurrentDirectory(MAX_DIRBUFFER,m_CurrentDir.GetBuffer(MAX_DIRBUFFER)); |
130 | 130 | m_CurrentDir.ReleaseBuffer(); |
131 | 131 | m_IsGitDllInited = false; |
132 | + m_GitDiff=0; | |
132 | 133 | CheckMsysGitDir(); |
133 | 134 | } |
134 | 135 |
@@ -529,7 +529,7 @@ CString CTGitPath::GetRootPathString() const | ||
529 | 529 | |
530 | 530 | CString CTGitPath::GetFilename() const |
531 | 531 | { |
532 | - ATLASSERT(!IsDirectory()); | |
532 | + //ATLASSERT(!IsDirectory()); | |
533 | 533 | return GetFileOrDirectoryName(); |
534 | 534 | } |
535 | 535 |
@@ -34,6 +34,7 @@ | ||
34 | 34 | #include "CommonResource.h" |
35 | 35 | #include "BrowseRefsDlg.h" |
36 | 36 | #include "LogDlg.h" |
37 | +#include "RefLogDlg.h" | |
37 | 38 | |
38 | 39 | #define ID_COMPARE 1 |
39 | 40 | #define ID_BLAME 2 |
@@ -287,6 +288,7 @@ UINT CFileDiffDlg::DiffThread() | ||
287 | 288 | bool bSuccess = true; |
288 | 289 | RefreshCursor(); |
289 | 290 | m_cFileList.ShowText(CString(MAKEINTRESOURCE(IDS_FILEDIFF_WAIT))); |
291 | + m_cFileList.DeleteAllItems(); | |
290 | 292 | m_arFileList.Clear(); |
291 | 293 | #if 0 |
292 | 294 | if (m_bDoPegDiff) |
@@ -1112,9 +1114,27 @@ void CFileDiffDlg::ClickRevButton(CMenuButton *button, GitRev *rev, CEdit *edit) | ||
1112 | 1114 | |
1113 | 1115 | if(entry == 2) /*RefLog*/ |
1114 | 1116 | { |
1117 | + CRefLogDlg dlg; | |
1118 | + if(dlg.DoModal() == IDOK) | |
1119 | + { | |
1120 | + if(FillRevFromString(rev,dlg.m_SelectedHash)) | |
1121 | + return; | |
1122 | + | |
1123 | + edit->SetWindowText(dlg.m_SelectedHash); | |
1124 | + | |
1125 | + }else | |
1126 | + return; | |
1127 | + | |
1115 | 1128 | } |
1116 | 1129 | |
1117 | 1130 | SetURLLabels(); |
1131 | + | |
1132 | + InterlockedExchange(&m_bThreadRunning, TRUE); | |
1133 | + if (AfxBeginThread(DiffThreadEntry, this)==NULL) | |
1134 | + { | |
1135 | + InterlockedExchange(&m_bThreadRunning, FALSE); | |
1136 | + CMessageBox::Show(NULL, IDS_ERR_THREADSTARTFAILED, IDS_APPNAME, MB_OK | MB_ICONERROR); | |
1137 | + } | |
1118 | 1138 | } |
1119 | 1139 | |
1120 | 1140 | void CFileDiffDlg::OnBnClickedRev2btn() |
@@ -87,6 +87,20 @@ BOOL CRefLogDlg::OnInitDialog() | ||
87 | 87 | void CRefLogDlg::OnBnClickedOk() |
88 | 88 | { |
89 | 89 | // TODO: Add your control notification handler code here |
90 | + if (m_RefList.GetSelectedCount() == 1) | |
91 | + { | |
92 | + // get the selected row | |
93 | + POSITION pos = m_RefList.GetFirstSelectedItemPosition(); | |
94 | + int selIndex = m_RefList.GetNextSelectedItem(pos); | |
95 | + if (selIndex < m_RefList.m_arShownList.GetCount()) | |
96 | + { | |
97 | + // all ok, pick up the revision | |
98 | + GitRev* pLogEntry = reinterpret_cast<GitRev *>(m_RefList.m_arShownList.GetAt(selIndex)); | |
99 | + // extract the hash | |
100 | + m_SelectedHash = pLogEntry->m_CommitHash; | |
101 | + } | |
102 | + } | |
103 | + | |
90 | 104 | OnOK(); |
91 | 105 | } |
92 | 106 |
@@ -27,6 +27,7 @@ public: | ||
27 | 27 | CString m_CurrentBranch; |
28 | 28 | public: |
29 | 29 | CRefLogList m_RefList; |
30 | + CString m_SelectedHash; | |
30 | 31 | public: |
31 | 32 | afx_msg void OnBnClickedOk(); |
32 | 33 | }; |