OSDN Git Service

Double click conflict item to launch conflict edit and double click group header...
authorFrank Li <lznuaa@gmail.com>
Tue, 21 Apr 2009 05:26:42 +0000 (13:26 +0800)
committerFrank Li <lznuaa@gmail.com>
Tue, 21 Apr 2009 05:36:48 +0000 (13:36 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/Git/GitStatusListCtrl.cpp
src/Resources/TortoiseProcENG.rc
src/TortoiseProc/GitDiff.cpp
src/TortoiseProc/GitDiff.h

index 9720e0b..4521750 100644 (file)
@@ -3880,7 +3880,7 @@ void CGitStatusListCtrl::OnNMDblclk(NMHDR *pNMHDR, LRESULT *pResult)
        *pResult = 0;\r
        if (m_bBlock)\r
                return;\r
-#if 0\r
+\r
        if (pNMLV->iItem < 0)\r
        {\r
                if (!IsGroupViewEnabled())\r
@@ -3907,7 +3907,8 @@ void CGitStatusListCtrl::OnNMDblclk(NMHDR *pNMHDR, LRESULT *pResult)
                        GetItem(&lv);\r
                        if (lv.iGroupId == group)\r
                        {\r
-                               FileEntry * entry = GetListEntry(i);\r
+                               CTGitPath *entry=(CTGitPath*)GetItemData(i);\r
+\r
                                if (!bFirst)\r
                                {\r
                                        bCheck = !GetCheck(i);\r
@@ -3932,18 +3933,16 @@ void CGitStatusListCtrl::OnNMDblclk(NMHDR *pNMHDR, LRESULT *pResult)
                NotifyCheck();\r
                return;\r
        }\r
-#endif\r
-//     FileEntry * entry = GetListEntry(pNMLV->iItem);\r
-//     if (entry)\r
-       {\r
-//             if (entry->isConflicted)\r
-//             {\r
-//                     gitDiff::StartConflictEditor(entry->GetPath());\r
-//             }\r
-//             else\r
-               {\r
-                       StartDiff(pNMLV->iItem);\r
-               }\r
+\r
+       CTGitPath *file=(CTGitPath*)GetItemData(pNMLV->iItem);\r
+\r
+       if( file->m_Action&CTGitPath::LOGACTIONS_UNMERGED )\r
+       {\r
+               CAppUtils::ConflictEdit(*file,false);\r
+\r
+       }else\r
+       {\r
+               StartDiff(pNMLV->iItem);\r
        }\r
 \r
 }\r
index 098d40c..2f66a06 100644 (file)
Binary files a/src/Resources/TortoiseProcENG.rc and b/src/Resources/TortoiseProcENG.rc differ
index 553e9f7..49ea5e6 100644 (file)
@@ -116,7 +116,3 @@ int CGitDiff::Diff(CTGitPath * pPath,CTGitPath * pPath2, git_revnum_t & rev1, gi
        return 0;\r
 }\r
 \r
-int CGitDiff::StartConflictEditor(CTGitPath* /*file*/)\r
-{\r
-       return 0;\r
-}
\ No newline at end of file
index 0fe8ffa..a2e5385 100644 (file)
@@ -13,5 +13,4 @@ public:
        // Use two path to handle rename cases\r
        static int Diff(CTGitPath * pPath1, CTGitPath *pPath2 ,git_revnum_t & rev1, git_revnum_t & rev2, bool blame=false, bool unified=false);\r
        static int DiffNull(CTGitPath *pPath, git_revnum_t &rev1);\r
-       static int StartConflictEditor(CTGitPath* filepath);\r
 };\r