OSDN Git Service

Add SetModified at Git Config dialog
authorFrank Li <lznuaa@gmail.com>
Tue, 31 Mar 2009 10:07:10 +0000 (18:07 +0800)
committerFrank Li <lznuaa@gmail.com>
Tue, 31 Mar 2009 10:07:10 +0000 (18:07 +0800)
src/TortoiseProc/Settings/SettingGitConfig.cpp
src/TortoiseProc/Settings/SettingGitConfig.h
src/TortoiseProc/Settings/SettingGitRemote.cpp
src/TortoiseProc/Settings/SettingGitRemote.h

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
index e696c20..f8d2b77 100644 (file)
@@ -20,9 +20,14 @@ public:
 protected:\r
        virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support\r
        BOOL OnInitDialog();\r
+    BOOL OnApply();\r
+\r
        DECLARE_MESSAGE_MAP()\r
 public:\r
     CString m_UserName;\r
     CString m_UserEmail;\r
     BOOL m_bGlobal;\r
+    afx_msg void OnBnClickedCheckGlobal();\r
+    afx_msg void OnEnChangeGitUsername();\r
+    afx_msg void OnEnChangeGitUseremail();\r
 };\r
index 0329290..d71f45c 100644 (file)
@@ -38,6 +38,10 @@ BEGIN_MESSAGE_MAP(CSettingGitRemote, CPropertyPage)
     ON_BN_CLICKED(IDC_BUTTON_BROWSE, &CSettingGitRemote::OnBnClickedButtonBrowse)\r
     ON_BN_CLICKED(IDC_BUTTON_ADD, &CSettingGitRemote::OnBnClickedButtonAdd)\r
     ON_LBN_SELCHANGE(IDC_LIST_REMOTE, &CSettingGitRemote::OnLbnSelchangeListRemote)\r
+    ON_EN_CHANGE(IDC_EDIT_REMOTE, &CSettingGitRemote::OnEnChangeEditRemote)\r
+    ON_EN_CHANGE(IDC_EDIT_URL, &CSettingGitRemote::OnEnChangeEditUrl)\r
+    ON_BN_CLICKED(IDC_CHECK_ISAUTOLOADPUTTYKEY, &CSettingGitRemote::OnBnClickedCheckIsautoloadputtykey)\r
+    ON_EN_CHANGE(IDC_EDIT_PUTTY_KEY, &CSettingGitRemote::OnEnChangeEditPuttyKey)\r
 END_MESSAGE_MAP()\r
 \r
 \r
@@ -57,3 +61,38 @@ void CSettingGitRemote::OnLbnSelchangeListRemote()
 {\r
     // TODO: Add your control notification handler code here\r
 }\r
+\r
+void CSettingGitRemote::OnEnChangeEditRemote()\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
+}\r
+\r
+void CSettingGitRemote::OnEnChangeEditUrl()\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
+}\r
+\r
+void CSettingGitRemote::OnBnClickedCheckIsautoloadputtykey()\r
+{\r
+    // TODO: Add your control notification handler code here\r
+}\r
+\r
+void CSettingGitRemote::OnEnChangeEditPuttyKey()\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
+}\r
index 1f4989f..113b0da 100644 (file)
@@ -31,4 +31,8 @@ public:
     afx_msg void OnBnClickedButtonBrowse();\r
     afx_msg void OnBnClickedButtonAdd();\r
     afx_msg void OnLbnSelchangeListRemote();\r
+    afx_msg void OnEnChangeEditRemote();\r
+    afx_msg void OnEnChangeEditUrl();\r
+    afx_msg void OnBnClickedCheckIsautoloadputtykey();\r
+    afx_msg void OnEnChangeEditPuttyKey();\r
 };\r