OSDN Git Service

Enable Copy file List to commit Message
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / CommitDlg.cpp
index 84220a7..ca21f27 100644 (file)
@@ -1235,9 +1235,9 @@ void CCommitDlg::InsertMenuItems(CMenu& mPopup, int& nCmd)
        mPopup.AppendMenu(MF_STRING | MF_ENABLED, m_nPopupPasteListCmd, sMenuItemText);\r
 }\r
 \r
-bool CCommitDlg::HandleMenuItemClick(int /*cmd*/, CSciEdit * /*pSciEdit*/)\r
+bool CCommitDlg::HandleMenuItemClick(int cmd, CSciEdit * pSciEdit)\r
 {\r
-#if 0\r
+\r
        if (m_bBlock)\r
                return false;\r
        if (cmd == m_nPopupPasteListCmd)\r
@@ -1247,27 +1247,27 @@ bool CCommitDlg::HandleMenuItemClick(int /*cmd*/, CSciEdit * /*pSciEdit*/)
                int nListItems = m_ListCtrl.GetItemCount();\r
                for (int i=0; i<nListItems; ++i)\r
                {\r
-                       CGitStatusListCtrl::FileEntry * entry = m_ListCtrl.GetListEntry(i);\r
-                       if (entry->IsChecked())\r
+                       CTGitPath * entry = (CTGitPath*)m_ListCtrl.GetItemData(i);\r
+                       if (entry&&entry->m_Checked)\r
                        {\r
                                CString line;\r
-                               Git_wc_status_kind status = entry->status;\r
-                               if (status == Git_wc_status_unversioned)\r
-                                       status = Git_wc_status_added;\r
-                               if (status == Git_wc_status_missing)\r
-                                       status = Git_wc_status_deleted;\r
+                               CString status = entry->GetActionName();\r
+                               if(entry->m_Action & CTGitPath::LOGACTIONS_UNVER)\r
+                                       status = _T("Add");\r
+\r
+                               //git_wc_status_kind status = entry->status;\r
                                WORD langID = (WORD)CRegStdWORD(_T("Software\\TortoiseGit\\LanguageID"), GetUserDefaultLangID());\r
                                if (m_ProjectProperties.bFileListInEnglish)\r
                                        langID = 1033;\r
-                               GitStatus::GetStatusString(AfxGetResourceHandle(), status, buf, sizeof(buf)/sizeof(TCHAR), langID);\r
-                               line.Format(_T("%-10s %s\r\n"), buf, (LPCTSTR)m_ListCtrl.GetItemText(i,0));\r
+                               \r
+                               line.Format(_T("%-10s %s\r\n"),status , (LPCTSTR)m_ListCtrl.GetItemText(i,0));\r
                                logmsg += line;\r
                        }\r
                }\r
                pSciEdit->InsertText(logmsg);\r
                return true;\r
        }\r
-#endif\r
+\r
        return false;\r
 }\r
 \r