OSDN Git Service

Add SetModified at Git Config dialog
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / Settings / SettingGitConfig.cpp
index 9cea0c0..1696776 100644 (file)
@@ -34,6 +34,9 @@ void CSettingGitConfig::DoDataExchange(CDataExchange* pDX)
 \r
 \r
 BEGIN_MESSAGE_MAP(CSettingGitConfig, CPropertyPage)\r
+    ON_BN_CLICKED(IDC_CHECK_GLOBAL, &CSettingGitConfig::OnBnClickedCheckGlobal)\r
+    ON_EN_CHANGE(IDC_GIT_USERNAME, &CSettingGitConfig::OnEnChangeGitUsername)\r
+    ON_EN_CHANGE(IDC_GIT_USEREMAIL, &CSettingGitConfig::OnEnChangeGitUseremail)\r
 END_MESSAGE_MAP()\r
 \r
 BOOL CSettingGitConfig::OnInitDialog()\r
@@ -60,3 +63,43 @@ BOOL CSettingGitConfig::OnInitDialog()
        return TRUE;\r
 }\r
 // CSettingGitConfig message handlers\r
+\r
+void CSettingGitConfig::OnBnClickedCheckGlobal()\r
+{\r
+    // TODO: Add your control notification handler code here\r
+    SetModified();\r
+}\r
+\r
+void CSettingGitConfig::OnEnChangeGitUsername()\r
+{\r
+    // TODO:  If this is a RICHEDIT control, the control will not\r
+    // send this notification unless you override the ISettingsPropPage::OnInitDialog()\r
+    // function and call CRichEditCtrl().SetEventMask()\r
+    // with the ENM_CHANGE flag ORed into the mask.\r
+\r
+    // TODO:  Add your control notification handler code here\r
+    SetModified();\r
+}\r
+\r
+void CSettingGitConfig::OnEnChangeGitUseremail()\r
+{\r
+    // TODO:  If this is a RICHEDIT control, the control will not\r
+    // send this notification unless you override the ISettingsPropPage::OnInitDialog()\r
+    // function and call CRichEditCtrl().SetEventMask()\r
+    // with the ENM_CHANGE flag ORed into the mask.\r
+\r
+    // TODO:  Add your control notification handler code here\r
+    SetModified();\r
+}\r
+\r
+BOOL CSettingGitConfig::OnApply()\r
+{\r
+    CString cmd, out;\r
+    this->UpdateData(FALSE);\r
+\r
+    cmd.Format(_T("git.exe config user.name %s"),this->m_UserName);\r
+    cmd.Format(_T("git.exe config user.email %s"),this->m_UserEmail);\r
+\r
+    SetModified(FALSE);\r
+       return ISettingsPropPage::OnApply();\r
+}
\ No newline at end of file