+// TortoiseGit - a Windows shell extension for easy version control\r
+\r
+// Copyright (C) 2007-2009 - TortoiseGit\r
+\r
+// This program is free software; you can redistribute it and/or\r
+// modify it under the terms of the GNU General Public License\r
+// as published by the Free Software Foundation; either version 2\r
+// of the License, or (at your option) any later version.\r
+\r
+// This program is distributed in the hope that it will be useful,\r
+// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+// GNU General Public License for more details.\r
+\r
+// You should have received a copy of the GNU General Public License\r
+// along with this program; if not, write to the Free Software Foundation,\r
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
+//\r
+\r
// MergeDlg.cpp : implementation file\r
//\r
\r
: CResizableStandAloneDialog(CMergeDlg::IDD, pParent),\r
CChooseVersion(this)\r
{\r
-\r
+ \r
+ m_pDefaultText = _T("<Auto Generated by Git>");\r
+ \r
}\r
\r
CMergeDlg::~CMergeDlg()\r
\r
DDX_Check(pDX,IDC_CHECK_NOFF,this->m_bNoFF);\r
DDX_Check(pDX,IDC_CHECK_SQUASH,this->m_bSquash);\r
+ DDX_Control(pDX, IDC_LOGMESSAGE, m_cLogMessage);\r
}\r
\r
\r
CHOOSE_VERSION_ADDANCHOR;\r
\r
AddAnchor(IDC_GROUP_OPTION, TOP_LEFT, TOP_RIGHT);\r
-\r
+ AddAnchor(IDC_STATIC_MERGE_MESSAGE,TOP_LEFT,BOTTOM_RIGHT);\r
+ AddAnchor(IDC_LOGMESSAGE,TOP_LEFT,BOTTOM_RIGHT);\r
\r
AddAnchor(IDOK,BOTTOM_RIGHT);\r
AddAnchor(IDCANCEL,BOTTOM_RIGHT);\r
Init();\r
\r
this->SetDefaultChoose(IDC_RADIO_BRANCH);\r
+\r
+ m_ProjectProperties.ReadProps(CTGitPath(g_Git.m_CurrentDir));\r
+\r
+ m_cLogMessage.Init(m_ProjectProperties);\r
+ m_cLogMessage.SetFont((CString)CRegString(_T("Software\\TortoiseGit\\LogFontName"), _T("Courier New")), (DWORD)CRegDWORD(_T("Software\\TortoiseGit\\LogFontSize"), 8));\r
+ m_cLogMessage.RegisterContextMenuHandler(this);\r
+\r
+ m_cLogMessage.SetText(m_pDefaultText);\r
\r
EnableSaveRestore(_T("MergeDlg"));\r
\r
\r
this->UpdateRevsionName();\r
\r
+ this->m_strLogMesage = m_cLogMessage.GetText() ;\r
+ if( m_strLogMesage == CString(this->m_pDefaultText) )\r
+ {\r
+ m_strLogMesage.Empty();\r
+ }\r
+\r
OnOK();\r
}\r
+// TortoiseGit - a Windows shell extension for easy version control\r
+\r
+// Copyright (C) 2007-2009 - TortoiseGit\r
+\r
+// This program is free software; you can redistribute it and/or\r
+// modify it under the terms of the GNU General Public License\r
+// as published by the Free Software Foundation; either version 2\r
+// of the License, or (at your option) any later version.\r
+\r
+// This program is distributed in the hope that it will be useful,\r
+// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+// GNU General Public License for more details.\r
+\r
+// You should have received a copy of the GNU General Public License\r
+// along with this program; if not, write to the Free Software Foundation,\r
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
+//\r
+\r
+\r
#pragma once\r
\r
#include "StandAloneDlg.h"\r
#include "HistoryCombo.h"\r
#include "ChooseVersion.h"\r
+#include "SciEdit.h"\r
// CMergeDlg dialog\r
\r
-class CMergeDlg : public CResizableStandAloneDialog,public CChooseVersion\r
+class CMergeDlg : public CResizableStandAloneDialog,public CChooseVersion , public CSciEditContextMenuInterface\r
{\r
DECLARE_DYNAMIC(CMergeDlg)\r
\r
protected:\r
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support\r
virtual BOOL OnInitDialog();\r
+ \r
+ CSciEdit m_cLogMessage;\r
+ ProjectProperties m_ProjectProperties;\r
\r
+ TCHAR * m_pDefaultText;\r
DECLARE_MESSAGE_MAP()\r
CHOOSE_EVENT_RADIO() ;\r
public:\r
\r
+ CString m_strLogMesage;\r
+\r
afx_msg void OnBnClickedOk();\r
};\r