OSDN Git Service

Add "Save reversion as" ... menu item at File List
authorFrank Li <lznuaa@gmail.com>
Sat, 7 Mar 2009 10:46:33 +0000 (18:46 +0800)
committerFrank Li <lznuaa@gmail.com>
Mon, 9 Mar 2009 13:23:32 +0000 (21:23 +0800)
src/Git/GitStatusListCtrl.cpp
src/Git/GitStatusListCtrl.h
src/TortoiseProc/LogDlg.cpp
src/TortoiseProc/RebaseDlg.cpp

index f0dae49..fdc8b62 100644 (file)
@@ -63,43 +63,7 @@ const UINT CGitStatusListCtrl::SVNSLNM_ADDFILE
 const UINT CGitStatusListCtrl::SVNSLNM_CHECKCHANGED\r
                                        = ::RegisterWindowMessage(_T("GITSLNM_CHECKCHANGED"));\r
 \r
-#define IDSVNLC_REVERT                  1\r
-#define IDSVNLC_COMPARE                         2\r
-#define IDSVNLC_OPEN                    3\r
-#define IDSVNLC_DELETE                  4\r
-#define IDSVNLC_IGNORE                  5\r
-#define IDSVNLC_GNUDIFF1                6\r
-#define IDSVNLC_UPDATE           7\r
-#define IDSVNLC_LOG              8\r
-#define IDSVNLC_EDITCONFLICT     9\r
-#define IDSVNLC_IGNOREMASK         10\r
-#define IDSVNLC_ADD                        11\r
-#define IDSVNLC_RESOLVECONFLICT 12\r
-#define IDSVNLC_LOCK                   13\r
-#define IDSVNLC_LOCKFORCE              14\r
-#define IDSVNLC_UNLOCK                 15\r
-#define IDSVNLC_UNLOCKFORCE            16\r
-#define IDSVNLC_OPENWITH               17\r
-#define IDSVNLC_EXPLORE                        18\r
-#define IDSVNLC_RESOLVETHEIRS  19\r
-#define IDSVNLC_RESOLVEMINE            20\r
-#define IDSVNLC_REMOVE                 21\r
-#define IDSVNLC_COMMIT                 22\r
-#define IDSVNLC_PROPERTIES             23\r
-#define IDSVNLC_COPY                   24\r
-#define IDSVNLC_COPYEXT                        25\r
-#define IDSVNLC_REPAIRMOVE             26\r
-#define IDSVNLC_REMOVEFROMCS   27\r
-#define IDSVNLC_CREATECS               28\r
-#define IDSVNLC_CREATEIGNORECS 29\r
-#define IDSVNLC_CHECKGROUP             30\r
-#define IDSVNLC_UNCHECKGROUP   31\r
-#define IDSVNLC_ADD_RECURSIVE   32\r
-#define IDSVNLC_COMPAREWC              33\r
-#define IDSVNLC_BLAME                  34\r
-// the IDSVNLC_MOVETOCS *must* be the last index, because it contains a dynamic submenu where \r
-// the submenu items get command ID's sequent to this number\r
-#define IDSVNLC_MOVETOCS               35\r
+\r
 \r
 \r
 BEGIN_MESSAGE_MAP(CGitStatusListCtrl, CListCtrl)\r
@@ -235,7 +199,7 @@ int CGitStatusListCtrl::GetIndex(const CTGitPath& path)
 }\r
 #endif \r
 \r
-void CGitStatusListCtrl::Init(DWORD dwColumns, const CString& sColumnInfoContainer, DWORD dwContextMenus /* = GitSLC_POPALL */, bool bHasCheckboxes /* = true */)\r
+void CGitStatusListCtrl::Init(DWORD dwColumns, const CString& sColumnInfoContainer, unsigned __int64 dwContextMenus /* = GitSLC_POPALL */, bool bHasCheckboxes /* = true */)\r
 {\r
        Locker lock(m_critSec);\r
 \r
@@ -2438,6 +2402,12 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point)
                                {\r
                                        popup.AppendMenuIcon(IDSVNLC_REVERT, IDS_MENUREVERT, IDI_REVERT);\r
                                }\r
+\r
+                               if ((m_dwContextMenus & GetContextMenuBit(IDSVNLC_REVERTTOREV)) && ( !this->m_CurrentVersion.IsEmpty() )\r
+                                       && this->m_CurrentVersion != GIT_REV_ZERO)\r
+                               {\r
+                                       popup.AppendMenuIcon(IDSVNLC_REVERTTOREV, IDS_LOG_POPUP_REVERTTOREV, IDI_REVERT);\r
+                               }\r
                        }\r
 \r
                        if ((GetSelectedCount() == 1)&&(!(wcStatus & CTGitPath::LOGACTIONS_UNVER))\r
@@ -2453,17 +2423,26 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point)
                                }\r
                        }\r
 //                     if ((wcStatus != git_wc_status_deleted)&&(wcStatus != git_wc_status_missing) && (GetSelectedCount() == 1))\r
-//                     {\r
+                       if ( (GetSelectedCount() == 1) )\r
+                       {\r
+                               if (m_dwContextMenus & this->GetContextMenuBit(IDSVNLC_SAVEAS) ) \r
+                               {\r
+                                       popup.AppendMenuIcon(IDSVNLC_SAVEAS, IDS_LOG_POPUP_SAVE, IDI_SAVEAS);\r
+                               }\r
+\r
                                if (m_dwContextMenus & SVNSLC_POPOPEN)\r
                                {\r
+                                       popup.AppendMenuIcon(IDSVNLC_VIEWREV, IDS_LOG_POPUP_VIEWREV);\r
                                        popup.AppendMenuIcon(IDSVNLC_OPEN, IDS_REPOBROWSE_OPEN, IDI_OPEN);\r
                                        popup.AppendMenuIcon(IDSVNLC_OPENWITH, IDS_LOG_POPUP_OPENWITH, IDI_OPEN);\r
                                }\r
+                               \r
                                if (m_dwContextMenus & SVNSLC_POPEXPLORE)\r
                                {\r
                                        popup.AppendMenuIcon(IDSVNLC_EXPLORE, IDS_STATUSLIST_CONTEXT_EXPLORE, IDI_EXPLORER);\r
                                }\r
-//                     }\r
+       \r
+                       }\r
                        if (GetSelectedCount() > 0)\r
                        {\r
 //                             if (((wcStatus == git_wc_status_unversioned)||(wcStatus == git_wc_status_ignored))&&(m_dwContextMenus & SVNSLC_POPDELETE))\r
index 13d5733..0c023c5 100644 (file)
@@ -102,28 +102,28 @@ SVNSLC_SHOWINCOMPLETE|SVNSLC_SHOWEXTERNAL|SVNSLC_SHOWINEXTERNALS)
 \r
 #define SVNSLC_SHOWALL (SVNSLC_SHOWVERSIONED|SVNSLC_SHOWUNVERSIONED)\r
 \r
-#define SVNSLC_POPALL                                  0xFFFFFFFF\r
-#define SVNSLC_POPCOMPAREWITHBASE              0x00000001\r
-#define SVNSLC_POPCOMPARE                              0x00000002\r
-#define SVNSLC_POPGNUDIFF                              0x00000004\r
-#define SVNSLC_POPREVERT                               0x00000008\r
-#define SVNSLC_POPUPDATE                               0x00000010\r
-#define SVNSLC_POPSHOWLOG                              0x00000020\r
-#define SVNSLC_POPOPEN                                 0x00000040\r
-#define SVNSLC_POPDELETE                               0x00000080\r
-#define SVNSLC_POPADD                                  0x00000100\r
-#define SVNSLC_POPIGNORE                               0x00000200\r
-#define SVNSLC_POPCONFLICT                             0x00000400\r
-#define SVNSLC_POPRESOLVE                              0x00000800\r
-#define SVNSLC_POPLOCK                                 0x00001000\r
-#define SVNSLC_POPUNLOCK                               0x00002000\r
-#define SVNSLC_POPUNLOCKFORCE                  0x00004000\r
-#define SVNSLC_POPEXPLORE                              0x00008000\r
-#define SVNSLC_POPCOMMIT                               0x00010000\r
-#define SVNSLC_POPPROPERTIES                   0x00020000\r
-#define SVNSLC_POPREPAIRMOVE                   0x00040000\r
-#define SVNSLC_POPCHANGELISTS                  0x00080000\r
-#define SVNSLC_POPBLAME                                        0x00100000\r
+#define SVNSLC_POPALL                                  0xFFFFFFFFFFFFFFFF\r
+#define SVNSLC_POPCOMPAREWITHBASE              CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_COMPARE) \r
+#define SVNSLC_POPCOMPARE                              CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_COMPAREWC) \r
+#define SVNSLC_POPGNUDIFF                              CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_GNUDIFF1) \r
+#define SVNSLC_POPREVERT                               CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_REVERT) \r
+#define SVNSLC_POPUPDATE                               CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_UPDATE)\r
+#define SVNSLC_POPSHOWLOG                              CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_LOG)\r
+#define SVNSLC_POPOPEN                                 CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_OPEN)\r
+#define SVNSLC_POPDELETE                               CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_DELETE)\r
+#define SVNSLC_POPADD                                  CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_ADD)\r
+#define SVNSLC_POPIGNORE                               CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_IGNORE)\r
+#define SVNSLC_POPCONFLICT                             CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_EDITCONFLICT)\r
+#define SVNSLC_POPRESOLVE                              CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_RESOLVECONFLICT)\r
+#define SVNSLC_POPLOCK                                 CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_LOCK)\r
+#define SVNSLC_POPUNLOCK                               CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_UNLOCK)\r
+#define SVNSLC_POPUNLOCKFORCE                  CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_UNLOCKFORCE)\r
+#define SVNSLC_POPEXPLORE                              CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_EXPLORE)\r
+#define SVNSLC_POPCOMMIT                               CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_COMMIT)\r
+#define SVNSLC_POPPROPERTIES                   CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_PROPERTIES)\r
+#define SVNSLC_POPREPAIRMOVE                   CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_REPAIRMOVE)\r
+#define SVNSLC_POPCHANGELISTS                  CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_CHECKGROUP)\r
+#define SVNSLC_POPBLAME                                        CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_BLAME)\r
 \r
 #define SVNSLC_IGNORECHANGELIST                        _T("ignore-on-commit")\r
 \r
@@ -159,7 +159,52 @@ class CGitStatusListCtrl :
        public CListCtrl\r
 {\r
 public:\r
+       enum\r
+       {\r
+               IDSVNLC_REVERT = 1,\r
+               IDSVNLC_COMPARE,\r
+               IDSVNLC_OPEN,   \r
+               IDSVNLC_DELETE,\r
+               IDSVNLC_IGNORE,\r
+               IDSVNLC_GNUDIFF1                 ,\r
+               IDSVNLC_UPDATE          ,\r
+               IDSVNLC_LOG              ,\r
+               IDSVNLC_EDITCONFLICT     ,\r
+               IDSVNLC_IGNOREMASK          ,\r
+               IDSVNLC_ADD                         ,\r
+               IDSVNLC_RESOLVECONFLICT ,\r
+               IDSVNLC_LOCK                    ,\r
+               IDSVNLC_LOCKFORCE               ,\r
+               IDSVNLC_UNLOCK                  ,\r
+               IDSVNLC_UNLOCKFORCE             ,\r
+               IDSVNLC_OPENWITH                ,\r
+               IDSVNLC_EXPLORE                 ,\r
+               IDSVNLC_RESOLVETHEIRS   ,\r
+               IDSVNLC_RESOLVEMINE             ,\r
+               IDSVNLC_REMOVE                  ,\r
+               IDSVNLC_COMMIT                  ,\r
+               IDSVNLC_PROPERTIES              ,\r
+               IDSVNLC_COPY                    ,\r
+               IDSVNLC_COPYEXT                 ,\r
+               IDSVNLC_REPAIRMOVE              ,\r
+               IDSVNLC_REMOVEFROMCS    ,\r
+               IDSVNLC_CREATECS                ,\r
+               IDSVNLC_CREATEIGNORECS  ,\r
+               IDSVNLC_CHECKGROUP              ,\r
+               IDSVNLC_UNCHECKGROUP    ,\r
+               IDSVNLC_ADD_RECURSIVE   ,\r
+               IDSVNLC_COMPAREWC               ,\r
+               IDSVNLC_BLAME                   ,\r
+               IDSVNLC_SAVEAS                  ,\r
+               IDSVNLC_REVERTTOREV             ,\r
+               IDSVNLC_VIEWREV                 ,\r
+               IDSVNLC_FINDENTRY       ,\r
+// the IDSVNLC_MOVETOCS *must* be the last index, because it contains a dynamic submenu where \r
+// the submenu items get command ID's sequent to this number\r
+               IDSVNLC_MOVETOCS                ,\r
+       };\r
        int GetColumnIndex(int colmask);\r
+       static inline unsigned __int64 GetContextMenuBit(int i){ return ((unsigned __int64 )0x1)<<i ;}\r
        /**\r
         * Sent to the parent window (using ::SendMessage) after a context menu\r
         * command has finished if the item count has changed.\r
@@ -487,7 +532,7 @@ public:
         *                       Use the GitSLC_POPxxx defines.\r
         * \param bHasCheckboxes TRUE if the control should show check boxes on the left of each file entry.\r
         */\r
-       void Init(DWORD dwColumns, const CString& sColumnInfoContainer, DWORD dwContextMenus = (SVNSLC_POPALL ^ SVNSLC_POPCOMMIT), bool bHasCheckboxes = true);\r
+       void Init(DWORD dwColumns, const CString& sColumnInfoContainer, unsigned __int64 dwContextMenus = (SVNSLC_POPALL ^ SVNSLC_POPCOMMIT), bool bHasCheckboxes = true);\r
        /**\r
         * Sets a background image for the list control.\r
         * The image is shown in the right bottom corner.\r
@@ -866,7 +911,7 @@ private:
        bool                                            m_bShowFolders;\r
        bool                                            m_bShowIgnores;\r
        bool                                            m_bUpdate;\r
-       DWORD                                           m_dwContextMenus;\r
+       unsigned __int64                        m_dwContextMenus;\r
        BOOL                                            m_bBlock;\r
        BOOL                                            m_bBlockUI;\r
        bool                                            m_bBusy;\r
index c2b5dbe..bb49da2 100644 (file)
@@ -766,24 +766,27 @@ GitRev g_rev;
 \r
 void CLogDlg::CopyChangedSelectionToClipBoard()\r
 {\r
-#if 0\r
+\r
        POSITION pos = m_LogList.GetFirstSelectedItemPosition();\r
        if (pos == NULL)\r
                return; // nothing is selected, get out of here\r
 \r
        CString sPaths;\r
 \r
-       PLOGENTRYDATA pLogEntry = reinterpret_cast<PLOGENTRYDATA>(m_arShownList.GetAt(m_LogList.GetNextSelectedItem(pos)));\r
-       if (pos)\r
+//     CGitRev* pLogEntry = reinterpret_cast<CGitRev* >(m_LogList.m_arShownList.GetAt(m_LogList.GetNextSelectedItem(pos)));\r
+//     if (pos)\r
        {\r
                POSITION pos = m_ChangedFileListCtrl.GetFirstSelectedItemPosition();\r
                while (pos)\r
                {\r
                        int nItem = m_ChangedFileListCtrl.GetNextSelectedItem(pos);\r
-                       sPaths += m_currentChangedPathList[nItem].GetGitPathString();\r
+                       CTGitPath *path = (CTGitPath*)m_ChangedFileListCtrl.GetItemData(nItem);\r
+                       if(path)\r
+                               sPaths += path->GetGitPathString();\r
                        sPaths += _T("\r\n");\r
                }\r
        }\r
+#if 0\r
        else\r
        {\r
                // only one revision is selected in the log dialog top pane\r
@@ -816,9 +819,10 @@ void CLogDlg::CopyChangedSelectionToClipBoard()
                        }\r
                }\r
        }\r
+#endif\r
        sPaths.Trim();\r
        CStringUtils::WriteAsciiStringToClipboard(sPaths, GetSafeHwnd());\r
-#endif\r
+\r
 }\r
 \r
 BOOL CLogDlg::IsDiffPossible(LogChangedPath * /*changedpath*/, git_revnum_t rev)\r
@@ -1792,261 +1796,6 @@ void CLogDlg::OnBnClickedStatbutton()
 \r
 }\r
 \r
-#if 0\r
-void CLogDlg::OnNMCustomdrawLoglist(NMHDR *pNMHDR, LRESULT *pResult)\r
-{\r
-\r
-       NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<NMLVCUSTOMDRAW*>( pNMHDR );\r
-       // Take the default processing unless we set this to something else below.\r
-       *pResult = CDRF_DODEFAULT;\r
-\r
-       if (m_bNoDispUpdates)\r
-               return;\r
-\r
-       switch (pLVCD->nmcd.dwDrawStage)\r
-       {\r
-       case CDDS_PREPAINT:\r
-               {\r
-                       *pResult = CDRF_NOTIFYITEMDRAW;\r
-                       return;\r
-               }\r
-               break;\r
-       case CDDS_ITEMPREPAINT:\r
-               {\r
-                       // This is the prepaint stage for an item. Here's where we set the\r
-                       // item's text color. \r
-                       \r
-                       // Tell Windows to send draw notifications for each subitem.\r
-                       *pResult = CDRF_NOTIFYSUBITEMDRAW;\r
-\r
-                       COLORREF crText = GetSysColor(COLOR_WINDOWTEXT);\r
-\r
-                       if (m_arShownList.GetCount() > (INT_PTR)pLVCD->nmcd.dwItemSpec)\r
-                       {\r
-                               GitRev* data = (GitRev*)m_arShownList.GetAt(pLVCD->nmcd.dwItemSpec);\r
-                               if (data)\r
-                               {\r
-#if 0\r
-                                       if (data->bCopiedSelf)\r
-                                       {\r
-                                               // only change the background color if the item is not 'hot' (on vista with themes enabled)\r
-                                               if (!theme.IsAppThemed() || !m_bVista || ((pLVCD->nmcd.uItemState & CDIS_HOT)==0))\r
-                                                       pLVCD->clrTextBk = GetSysColor(COLOR_MENU);\r
-                                       }\r
-\r
-                                       if (data->bCopies)\r
-                                               crText = m_Colors.GetColor(CColors::Modified);\r
-#endif\r
-//                                     if ((data->childStackDepth)||(m_mergedRevs.find(data->Rev) != m_mergedRevs.end()))\r
-//                                             crText = GetSysColor(COLOR_GRAYTEXT);\r
-//                                     if (data->Rev == m_wcRev)\r
-//                                     {\r
-//                                             SelectObject(pLVCD->nmcd.hdc, m_boldFont);\r
-                                               // We changed the font, so we're returning CDRF_NEWFONT. This\r
-                                               // tells the control to recalculate the extent of the text.\r
-//                                             *pResult = CDRF_NOTIFYSUBITEMDRAW | CDRF_NEWFONT;\r
-//                                     }\r
-                               }\r
-                       }\r
-                       if (m_arShownList.GetCount() == (INT_PTR)pLVCD->nmcd.dwItemSpec)\r
-                       {\r
-                               if (m_bStrictStopped)\r
-                                       crText = GetSysColor(COLOR_GRAYTEXT);\r
-                       }\r
-                       // Store the color back in the NMLVCUSTOMDRAW struct.\r
-                       pLVCD->clrText = crText;\r
-                       return;\r
-               }\r
-               break;\r
-       case CDDS_ITEMPREPAINT|CDDS_ITEM|CDDS_SUBITEM:\r
-               {\r
-                       if ((m_bStrictStopped)&&(m_arShownList.GetCount() == (INT_PTR)pLVCD->nmcd.dwItemSpec))\r
-                       {\r
-                               pLVCD->nmcd.uItemState &= ~(CDIS_SELECTED|CDIS_FOCUS);\r
-                       }\r
-                       if (pLVCD->iSubItem == 1)\r
-                       {\r
-                               *pResult = CDRF_DODEFAULT;\r
-\r
-                               if (m_arShownList.GetCount() <= (INT_PTR)pLVCD->nmcd.dwItemSpec)\r
-                                       return;\r
-\r
-                               int             nIcons = 0;\r
-                               int             iconwidth = ::GetSystemMetrics(SM_CXSMICON);\r
-                               int             iconheight = ::GetSystemMetrics(SM_CYSMICON);\r
-\r
-                               GitRev* pLogEntry = reinterpret_cast<GitRev *>(m_arShownList.GetAt(pLVCD->nmcd.dwItemSpec));\r
-\r
-                               // Get the selected state of the\r
-                               // item being drawn.\r
-                               LVITEM   rItem;\r
-                               SecureZeroMemory(&rItem, sizeof(LVITEM));\r
-                               rItem.mask  = LVIF_STATE;\r
-                               rItem.iItem = pLVCD->nmcd.dwItemSpec;\r
-                               rItem.stateMask = LVIS_SELECTED | LVIS_FOCUSED;\r
-                               m_LogList.GetItem(&rItem);\r
-\r
-                               CRect rect;\r
-                               m_LogList.GetSubItemRect(pLVCD->nmcd.dwItemSpec, pLVCD->iSubItem, LVIR_BOUNDS, rect);\r
-\r
-                               // Fill the background\r
-                               if (theme.IsAppThemed() && m_bVista)\r
-                               {\r
-                                       theme.Open(m_hWnd, L"Explorer");\r
-                                       int state = LISS_NORMAL;\r
-                                       if (rItem.state & LVIS_SELECTED)\r
-                                       {\r
-                                               if (::GetFocus() == m_LogList.m_hWnd)\r
-                                                       state |= LISS_SELECTED;\r
-                                               else\r
-                                                       state |= LISS_SELECTEDNOTFOCUS;\r
-                                       }\r
-                                       else\r
-                                       {\r
-#if 0\r
-                                               if (pLogEntry->bCopiedSelf)\r
-                                               {\r
-                                                       // unfortunately, the pLVCD->nmcd.uItemState does not contain valid\r
-                                                       // information at this drawing stage. But we can check the whether the\r
-                                                       // previous stage changed the background color of the item\r
-                                                       if (pLVCD->clrTextBk == GetSysColor(COLOR_MENU))\r
-                                                       {\r
-                                                               HBRUSH brush;\r
-                                                               brush = ::CreateSolidBrush(::GetSysColor(COLOR_MENU));\r
-                                                               if (brush)\r
-                                                               {\r
-                                                                       ::FillRect(pLVCD->nmcd.hdc, &rect, brush);\r
-                                                                       ::DeleteObject(brush);\r
-                                                               }\r
-                                                       }\r
-                                               }\r
-#endif\r
-                                       }\r
-\r
-                                       if (theme.IsBackgroundPartiallyTransparent(LVP_LISTDETAIL, state))\r
-                                               theme.DrawParentBackground(m_hWnd, pLVCD->nmcd.hdc, &rect);\r
-\r
-                                       theme.DrawBackground(pLVCD->nmcd.hdc, LVP_LISTDETAIL, state, &rect, NULL);\r
-                               }\r
-                               else\r
-                               {\r
-                                       HBRUSH brush;\r
-                                       if (rItem.state & LVIS_SELECTED)\r
-                                       {\r
-                                               if (::GetFocus() == m_LogList.m_hWnd)\r
-                                                       brush = ::CreateSolidBrush(::GetSysColor(COLOR_HIGHLIGHT));\r
-                                               else\r
-                                                       brush = ::CreateSolidBrush(::GetSysColor(COLOR_BTNFACE));\r
-                                       }\r
-                                       else\r
-                                       {\r
-                                               //if (pLogEntry->bCopiedSelf)\r
-                                               //      brush = ::CreateSolidBrush(::GetSysColor(COLOR_MENU));\r
-                                               //else\r
-                                                       brush = ::CreateSolidBrush(::GetSysColor(COLOR_WINDOW));\r
-                                       }\r
-                                       if (brush == NULL)\r
-                                               return;\r
-\r
-                                       ::FillRect(pLVCD->nmcd.hdc, &rect, brush);\r
-                                       ::DeleteObject(brush);\r
-                               }\r
-\r
-                               // Draw the icon(s) into the compatible DC\r
-                               if (pLogEntry->m_Action & CTGitPath::LOGACTIONS_MODIFIED)\r
-                                       ::DrawIconEx(pLVCD->nmcd.hdc, rect.left + ICONITEMBORDER, rect.top, m_hModifiedIcon, iconwidth, iconheight, 0, NULL, DI_NORMAL);\r
-                               nIcons++;\r
-\r
-                               if (pLogEntry->m_Action & CTGitPath::LOGACTIONS_ADDED)\r
-                                       ::DrawIconEx(pLVCD->nmcd.hdc, rect.left+nIcons*iconwidth + ICONITEMBORDER, rect.top, m_hAddedIcon, iconwidth, iconheight, 0, NULL, DI_NORMAL);\r
-                               nIcons++;\r
-\r
-                               if (pLogEntry->m_Action & CTGitPath::LOGACTIONS_DELETED)\r
-                                       ::DrawIconEx(pLVCD->nmcd.hdc, rect.left+nIcons*iconwidth + ICONITEMBORDER, rect.top, m_hDeletedIcon, iconwidth, iconheight, 0, NULL, DI_NORMAL);\r
-                               nIcons++;\r
-\r
-                               if (pLogEntry->m_Action & CTGitPath::LOGACTIONS_REPLACED)\r
-                                       ::DrawIconEx(pLVCD->nmcd.hdc, rect.left+nIcons*iconwidth + ICONITEMBORDER, rect.top, m_hReplacedIcon, iconwidth, iconheight, 0, NULL, DI_NORMAL);\r
-                               nIcons++;\r
-                               *pResult = CDRF_SKIPDEFAULT;\r
-                               return;\r
-                       }\r
-               }\r
-               break;\r
-       }\r
-       *pResult = CDRF_DODEFAULT;\r
-\r
-}\r
-#endif\r
-\r
-void CLogDlg::OnNMCustomdrawChangedFileList(NMHDR *pNMHDR, LRESULT *pResult)\r
-{\r
-\r
-       NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<NMLVCUSTOMDRAW*>( pNMHDR );\r
-       // Take the default processing unless we set this to something else below.\r
-       *pResult = CDRF_DODEFAULT;\r
-\r
-//     if (m_bNoDispUpdates)\r
-//             return;\r
-\r
-       // First thing - check the draw stage. If it's the control's prepaint\r
-       // stage, then tell Windows we want messages for every item.\r
-\r
-       if ( CDDS_PREPAINT == pLVCD->nmcd.dwDrawStage )\r
-       {\r
-               *pResult = CDRF_NOTIFYITEMDRAW;\r
-       }\r
-       else if ( CDDS_ITEMPREPAINT == pLVCD->nmcd.dwDrawStage )\r
-       {\r
-               // This is the prepaint stage for an item. Here's where we set the\r
-               // item's text color. Our return value will tell Windows to draw the\r
-               // item itself, but it will use the new color we set here.\r
-\r
-               // Tell Windows to paint the control itself.\r
-               *pResult = CDRF_DODEFAULT;\r
-\r
-               COLORREF crText = GetSysColor(COLOR_WINDOWTEXT);\r
-               bool bGrayed = false;\r
-#if 0\r
-               if ((m_cHidePaths.GetState() & 0x0003)==BST_INDETERMINATE)\r
-               {\r
-                       if ((m_currentChangedArray)&&((m_currentChangedArray->GetCount() > (INT_PTR)pLVCD->nmcd.dwItemSpec)))\r
-                       {\r
-                               //if ((*m_currentChangedArray)[(pLVCD->nmcd.dwItemSpec)]sPath.Left(m_sRelativeRoot.GetLength()).Compare(m_sRelativeRoot)!=0)\r
-                               {\r
-                                       crText = GetSysColor(COLOR_GRAYTEXT);\r
-                                       bGrayed = true;\r
-                               }\r
-                       }\r
-                       else if (m_currentChangedPathList.GetCount() > (INT_PTR)pLVCD->nmcd.dwItemSpec)\r
-                       {\r
-                               //if (m_currentChangedPathList[pLVCD->nmcd.dwItemSpec].GetGitPathString().Left(m_sRelativeRoot.GetLength()).Compare(m_sRelativeRoot)!=0)\r
-                               {\r
-                                       crText = GetSysColor(COLOR_GRAYTEXT);\r
-                                       bGrayed = true;\r
-                               }\r
-                       }\r
-               }\r
-\r
-#endif\r
-               if ((!bGrayed)&&(m_currentChangedArray)&&(m_currentChangedArray->GetCount() > (INT_PTR)pLVCD->nmcd.dwItemSpec))\r
-               {\r
-                       DWORD action = ((*m_currentChangedArray)[pLVCD->nmcd.dwItemSpec]).m_Action;\r
-                       if (action == CTGitPath::LOGACTIONS_MODIFIED)\r
-                               crText = m_Colors.GetColor(CColors::Modified);\r
-                       if (action == CTGitPath::LOGACTIONS_REPLACED)\r
-                               crText = m_Colors.GetColor(CColors::Deleted);\r
-                       if (action == CTGitPath::LOGACTIONS_ADDED)\r
-                               crText = m_Colors.GetColor(CColors::Added);\r
-                       if (action == CTGitPath::LOGACTIONS_DELETED)\r
-                               crText = m_Colors.GetColor(CColors::Deleted);\r
-               }\r
-\r
-               // Store the color back in the NMLVCUSTOMDRAW struct.\r
-               pLVCD->clrText = crText;\r
-       }\r
-}\r
-\r
 void CLogDlg::DoSizeV1(int delta)\r
 {\r
 \r
index 6ae5349..51125f3 100644 (file)
@@ -124,7 +124,7 @@ BOOL CRebaseDlg::OnInitDialog()
        \r
        m_tooltips.Create(this);\r
 \r
-       m_FileListCtrl.Init(SVNSLC_COLEXT | SVNSLC_COLSTATUS |IDS_STATUSLIST_COLADD|IDS_STATUSLIST_COLDEL , _T("RebaseDlg"),(SVNSLC_POPALL ^ SVNSLC_POPCOMMIT),false);\r
+       m_FileListCtrl.Init(SVNSLC_COLEXT | SVNSLC_COLSTATUS |SVNSLC_COLADD|SVNSLC_COLDEL , _T("RebaseDlg"),(SVNSLC_POPALL ^ SVNSLC_POPCOMMIT),false);\r
 \r
        m_ctrlTabCtrl.AddTab(&m_FileListCtrl,_T("Conflict File"));\r
        m_ctrlTabCtrl.AddTab(&m_LogMessageCtrl,_T("Commit Message"),1);\r