OSDN Git Service

Enable Clean Up and Show log at GitStatusListCtrl
authorFrank Li <lznuaa@gmail.com>
Fri, 23 Jan 2009 01:28:49 +0000 (09:28 +0800)
committerFrank Li <lznuaa@gmail.com>
Fri, 23 Jan 2009 01:28:49 +0000 (09:28 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/Git/GitStatusListCtrl.cpp
src/TortoiseProc/Commands/CleanupCommand.cpp
src/TortoiseProc/Commands/Command.cpp
src/TortoiseProc/LogDlg.cpp

index 982bab7..bc8933d 100644 (file)
@@ -2735,7 +2735,7 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point)
                                {\r
                                        CString sCmd;\r
                                        sCmd.Format(_T("\"%s\" /command:blame /path:\"%s\""),\r
-                                               (LPCTSTR)(CPathUtils::GetAppDirectory()+_T("TortoiseProc.exe")), g_Git.m_CurrentDir+filepath->GetWinPath());\r
+                                               (LPCTSTR)(CPathUtils::GetAppDirectory()+_T("TortoiseProc.exe")), g_Git.m_CurrentDir+_T("\\")+filepath->GetWinPath());\r
 \r
                                        CAppUtils::LaunchApplication(sCmd, NULL, false);\r
                                }\r
@@ -2745,7 +2745,7 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point)
                                {\r
                                        CString sCmd;\r
                                        sCmd.Format(_T("\"%s\" /command:log /path:\"%s\""),\r
-                                               (LPCTSTR)(CPathUtils::GetAppDirectory()+_T("TortoiseProc.exe")), g_Git.m_CurrentDir+filepath->GetWinPath());\r
+                                               (LPCTSTR)(CPathUtils::GetAppDirectory()+_T("TortoiseProc.exe")), g_Git.m_CurrentDir+_T("\\")+filepath->GetWinPath());\r
 \r
                                        CAppUtils::LaunchApplication(sCmd, NULL, false);\r
                                }\r
index fb60e17..af60770 100644 (file)
 bool CleanupCommand::Execute()\r
 {\r
        bool bRet = false;\r
-\r
-       if(CMessageBox::Show(NULL,_T("Are you sure clean all unversion files"),_T("TortoiseGit"),MB_YESNO)==IDYES)\r
+       CString temp;\r
+       temp.Format(_T("Are you sure clean all untracked files"));\r
+       if(CMessageBox::Show(NULL,temp,_T("TortoiseGit"),MB_YESNO)==IDYES)\r
        {\r
                CProgressDlg progress;\r
-               progress.m_GitCmd.Format(_T("Git Clean -d -x -f"));\r
+               progress.m_GitCmd.Format(_T("git clean -d -x -f "));\r
                if(progress.DoModal()==IDOK)\r
                        return TRUE;\r
        }\r
index 6d4cce3..da3db21 100644 (file)
 #include "BlameCommand.h"\r
 #include "SettingsCommand.h"\r
 #include "ConflictEditorCommand.h"\r
+#include "CleanupCommand.h"\r
+\r
 #if 0\r
 \r
 \r
 #include "CatCommand.h"\r
 #include "CheckoutCommand.h"\r
-#include "CleanupCommand.h"\r
+\r
 \r
 \r
 #include "CopyCommand.h"\r
@@ -297,14 +299,15 @@ Command * CommandServer::GetCommand(const CString& sCmd)
                return new SettingsCommand;\r
        case cmdConflictEditor:\r
                return new ConflictEditorCommand;\r
+       case cmdCleanup:\r
+               return new CleanupCommand;\r
 #if 0\r
 \r
        case cmdCat:\r
                return new CatCommand;\r
        case cmdCheckout:\r
                return new CheckoutCommand;\r
-       case cmdCleanup:\r
-               return new CleanupCommand;\r
+\r
 \r
        \r
        case cmdCopy:\r
index 9ec53da..4eec793 100644 (file)
@@ -427,6 +427,8 @@ void CLogDlg::SetDlgTitle(bool bOffline)
        {\r
                if (m_path.IsUrl())\r
                        SetWindowText(m_sTitle + _T(" - ") + m_path.GetUIPathString());\r
+               else if (m_path.IsEmpty())\r
+                       SetWindowText(m_sTitle + _T(" - ") + CString(_T("Whole Project")));\r
                else if (m_path.IsDirectory())\r
                        SetWindowText(m_sTitle + _T(" - ") + m_path.GetWinPathString());\r
                else\r