From fb79260bc31f4838cd9a1941be975ae77830f085 Mon Sep 17 00:00:00 2001 From: Frank Li Date: Fri, 21 May 2010 15:28:59 +0800 Subject: [PATCH] Fixed issue #440: Don't enable 'Apply' button until the data are ok in Settings/Git/Remote Signed-off-by: Frank Li --- src/TortoiseProc/Settings/SettingGitRemote.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/TortoiseProc/Settings/SettingGitRemote.cpp b/src/TortoiseProc/Settings/SettingGitRemote.cpp index e5b0b8ef2..17ad30bd4 100644 --- a/src/TortoiseProc/Settings/SettingGitRemote.cpp +++ b/src/TortoiseProc/Settings/SettingGitRemote.cpp @@ -219,7 +219,11 @@ void CSettingGitRemote::OnEnChangeEditRemote() m_ChangedMask|=REMOTE_NAME; - this->SetModified(); + this->UpdateData(); + if( (!this->m_strRemote.IsEmpty())&&(!this->m_strUrl.IsEmpty()) ) + this->SetModified(); + else + this->SetModified(0); } void CSettingGitRemote::OnEnChangeEditUrl() @@ -231,7 +235,12 @@ void CSettingGitRemote::OnEnChangeEditUrl() // TODO: Add your control notification handler code here m_ChangedMask|=REMOTE_URL; - this->SetModified(); + + this->UpdateData(); + if( (!this->m_strRemote.IsEmpty())&&(!this->m_strUrl.IsEmpty()) ) + this->SetModified(); + else + this->SetModified(0); } void CSettingGitRemote::OnEnChangeEditPuttyKey() @@ -243,7 +252,12 @@ void CSettingGitRemote::OnEnChangeEditPuttyKey() // TODO: Add your control notification handler code here m_ChangedMask|=REMOTE_PUTTYKEY; - this->SetModified(); + + this->UpdateData(); + if( (!this->m_strRemote.IsEmpty())&&(!this->m_strUrl.IsEmpty()) ) + this->SetModified(); + else + this->SetModified(0); } void CSettingGitRemote::Save(CString key,CString value) { -- 2.11.4.GIT