Signed-off-by: Frank Li <lznuaa@gmail.com>
}\r
else if(!pullBranch.IsEmpty())\r
{\r
- m_ctrlRemoteBranch.AddString(pullBranch);\r
+ int index=m_ctrlRemoteBranch.FindStringExact(0,pullBranch);\r
+ if( index<0 )\r
+ m_ctrlRemoteBranch.AddString(pullBranch);\r
+ else\r
+ m_ctrlRemoteBranch.SetCurSel(index);\r
}\r
//else if(!this->m_RegKeyRemoteBranch.IsEmpty())\r
else\r
EnableSaveRestore(_T("SyncDlg"));\r
\r
this->m_ctrlURL.LoadHistory(CString(_T("Software\\TortoiseGit\\History\\SyncURL\\"))+WorkingDir, _T("url"));\r
- \r
+\r
+ STRING_VECTOR list;\r
+ \r
+ if(!g_Git.GetRemoteList(list))\r
+ { \r
+ for(unsigned int i=0;i<list.size();i++)\r
+ {\r
+ m_ctrlURL.AddString(list[i]);\r
+ }\r
+ } \r
m_ctrlURL.SetCurSel(0);\r
m_ctrlRemoteBranch.SetCurSel(0);\r
\r
{\r
if(!remote.IsEmpty())\r
{\r
+ if(this->m_ctrlURL.FindStringExact(0,remote)>=0)\r
+ return;\r
this->m_ctrlURL.AddString(remote);\r
}\r
}\r