OSDN Git Service

Enable Double Click to diff base At Log dialog
authorFrank Li <lznuaa@gmail.com>
Mon, 9 Mar 2009 13:57:02 +0000 (21:57 +0800)
committerFrank Li <lznuaa@gmail.com>
Mon, 9 Mar 2009 13:57:02 +0000 (21:57 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/TortoiseProc/GitLogListBase.cpp

index d9310bc..77d6527 100644 (file)
@@ -1296,9 +1296,20 @@ void CGitLogListBase::CopySelectionToClipBoard(bool HashOnly)
 \r
 void CGitLogListBase::DiffSelectedRevWithPrevious()\r
 {\r
-#if 0\r
        if (m_bThreadRunning)\r
                return;\r
+\r
+       int FirstSelect=-1, LastSelect=-1;\r
+       POSITION pos = GetFirstSelectedItemPosition();\r
+       FirstSelect = GetNextSelectedItem(pos);\r
+       while(pos)\r
+       {\r
+               LastSelect = GetNextSelectedItem(pos);\r
+       }\r
+\r
+       ContextMenuAction(ID_COMPAREWITHPREVIOUS,FirstSelect,LastSelect);\r
+\r
+#if 0\r
        UpdateLogInfoLabel();\r
        int selIndex = m_LogList.GetSelectionMark();\r
        if (selIndex < 0)\r
@@ -1537,8 +1548,8 @@ void CGitLogListBase::OnNMDblclkLoglist(NMHDR * /*pNMHDR*/, LRESULT *pResult)
        // a double click on an entry in the revision list has happened\r
        *pResult = 0;\r
 \r
-  if (CRegDWORD(_T("Software\\TortoiseGit\\DiffByDoubleClickInLog"), FALSE))\r
-         DiffSelectedRevWithPrevious();\r
+       if (CRegDWORD(_T("Software\\TortoiseGit\\DiffByDoubleClickInLog"), FALSE))\r
+               DiffSelectedRevWithPrevious();\r
 }\r
 \r
 int CGitLogListBase::FetchLogAsync(void * data)\r