OSDN Git Service

Add Crash Report
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / CommitDlg.h
1 // TortoiseGit - a Windows shell extension for easy version control\r
2 \r
3 // Copyright (C) 2003-2008 - TortoiseGit\r
4 \r
5 // This program is free software; you can redistribute it and/or\r
6 // modify it under the terms of the GNU General Public License\r
7 // as published by the Free Software Foundation; either version 2\r
8 // of the License, or (at your option) any later version.\r
9 \r
10 // This program is distributed in the hope that it will be useful,\r
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of\r
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
13 // GNU General Public License for more details.\r
14 \r
15 // You should have received a copy of the GNU General Public License\r
16 // along with this program; if not, write to the Free Software Foundation,\r
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
18 //\r
19 #pragma once\r
20 \r
21 #include "StandAloneDlg.h"\r
22 #include "GitStatusListCtrl.h"\r
23 #include "ProjectProperties.h"\r
24 #include "RegHistory.h"\r
25 #include "Registry.h"\r
26 #include "SciEdit.h"\r
27 #include "SplitterControl.h"\r
28 #include "PathWatcher.h"\r
29 #include "BugTraqAssociations.h"\r
30 #include "Tooltip.h"\r
31 //#include "..\IBugTraqProvider\IBugTraqProvider_h.h"\r
32 #include "Git.h"\r
33 \r
34 #include <regex>\r
35 using namespace std;\r
36 \r
37 #define ENDDIALOGTIMER 100\r
38 #define REFRESHTIMER   101\r
39 \r
40 \r
41 /**\r
42  * \ingroup TortoiseProc\r
43  * Dialog to enter log messages used in a commit.\r
44  */\r
45 class CCommitDlg : public CResizableStandAloneDialog, public CSciEditContextMenuInterface\r
46 {\r
47         DECLARE_DYNAMIC(CCommitDlg)\r
48 \r
49 public:\r
50         CCommitDlg(CWnd* pParent = NULL);   // standard constructor\r
51         virtual ~CCommitDlg();\r
52 \r
53         // CSciEditContextMenuInterface\r
54         virtual void            InsertMenuItems(CMenu& mPopup, int& nCmd);\r
55         virtual bool            HandleMenuItemClick(int cmd, CSciEdit * pSciEdit);\r
56 \r
57 private:\r
58         static UINT StatusThreadEntry(LPVOID pVoid);\r
59         UINT StatusThread();\r
60         void UpdateOKButton();\r
61 \r
62 // Dialog Data\r
63         enum { IDD = IDD_COMMITDLG };\r
64 \r
65 protected:\r
66         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support\r
67 \r
68         virtual BOOL OnInitDialog();\r
69         virtual void OnOK();\r
70         virtual void OnCancel();\r
71         virtual BOOL PreTranslateMessage(MSG* pMsg);\r
72         virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam);\r
73         afx_msg void OnBnClickedSelectall();\r
74         afx_msg void OnBnClickedHelp();\r
75         afx_msg void OnBnClickedShowunversioned();\r
76         afx_msg void OnBnClickedHistory();\r
77         afx_msg void OnBnClickedBugtraqbutton();\r
78         afx_msg void OnEnChangeLogmessage();\r
79         afx_msg void OnStnClickedExternalwarning();\r
80         afx_msg LRESULT OnGitStatusListCtrlItemCountChanged(WPARAM, LPARAM);\r
81         afx_msg LRESULT OnGitStatusListCtrlNeedsRefresh(WPARAM, LPARAM);\r
82         afx_msg LRESULT OnGitStatusListCtrlCheckChanged(WPARAM, LPARAM);\r
83         afx_msg LRESULT OnAutoListReady(WPARAM, LPARAM);\r
84         afx_msg LRESULT OnFileDropped(WPARAM, LPARAM lParam);\r
85         afx_msg void OnTimer(UINT_PTR nIDEvent);\r
86     afx_msg void OnSize(UINT nType, int cx, int cy);\r
87         void Refresh();\r
88         void GetAutocompletionList();\r
89         void ScanFile(const CString& sFilePath, const CString& sRegex);\r
90         void DoSize(int delta);\r
91         void SetSplitterRange();\r
92         void SaveSplitterPos();\r
93         void ParseRegexFile(const CString& sFile, std::map<CString, CString>& mapRegex);\r
94 \r
95         DECLARE_MESSAGE_MAP()\r
96 \r
97 \r
98 public:\r
99         CTGitPathList           m_pathList;\r
100         CTGitPathList           m_updatedPathList;\r
101         CTGitPathList           m_selectedPathList;\r
102         CTGitPathList           m_checkedPathList;\r
103         BOOL                            m_bRecursive;\r
104         CSciEdit                        m_cLogMessage;\r
105         CString                         m_sLogMessage;\r
106         BOOL                            m_bKeepLocks;\r
107         CString                         m_sBugID;\r
108         CString                         m_sChangeList;\r
109         BOOL                            m_bKeepChangeList;\r
110         INT_PTR                         m_itemsCount;\r
111         bool                            m_bSelectFilesForCommit;\r
112 //      CComPtr<IBugTraqProvider> m_BugTraqProvider;\r
113 \r
114 private:\r
115         CWinThread*                     m_pThread;\r
116         std::set<CString>       m_autolist;\r
117         CGitStatusListCtrl      m_ListCtrl;\r
118         BOOL                            m_bShowUnversioned;\r
119         volatile LONG           m_bBlock;\r
120         volatile LONG           m_bThreadRunning;\r
121         volatile LONG           m_bRunThread;\r
122         CToolTips                       m_tooltips;\r
123         CRegDWORD                       m_regAddBeforeCommit;\r
124         CRegDWORD                       m_regKeepChangelists;\r
125         ProjectProperties       m_ProjectProperties;\r
126         CButton                         m_SelectAll;\r
127         CString                         m_sWindowTitle;\r
128         static UINT                     WM_AUTOLISTREADY;\r
129         int                                     m_nPopupPasteListCmd;\r
130         CRegHistory                     m_History;\r
131         bool                            m_bCancelled;\r
132         CSplitterControl        m_wndSplitter;\r
133         CRect                           m_DlgOrigRect;\r
134         CRect                           m_LogMsgOrigRect;\r
135         CPathWatcher            m_pathwatcher;\r
136 \r
137 //      CBugTraqAssociation m_bugtraq_association;\r
138 \r
139 public:\r
140         afx_msg void OnBnClickedSignOff();\r
141         afx_msg void OnStnClickedCommitlabel();\r
142 };\r