OSDN Git Service

Add IBugTraqProvider
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / PullFetchDlg.cpp
index 815db97..1267a00 100644 (file)
@@ -25,6 +25,7 @@ void CPullFetchDlg::DoDataExchange(CDataExchange* pDX)
        CDialog::DoDataExchange(pDX);\r
        DDX_Control(pDX, IDC_REMOTE_COMBO, this->m_Remote);\r
        DDX_Control(pDX, IDC_OTHER, this->m_Other);\r
+       DDX_Control(pDX, IDC_REMOTE_BRANCH, this->m_RemoteBranch);\r
 \r
 }\r
 \r
@@ -41,17 +42,23 @@ BOOL CPullFetchDlg::OnInitDialog()
        AddAnchor(IDC_REMOTE_COMBO, TOP_LEFT, TOP_RIGHT);\r
        AddAnchor(IDC_OTHER, TOP_LEFT,TOP_RIGHT);\r
 \r
+       AddAnchor(IDC_REMOTE_BRANCH, TOP_LEFT,TOP_RIGHT);\r
+       \r
        AddAnchor(IDOK,BOTTOM_RIGHT);\r
        AddAnchor(IDCANCEL,BOTTOM_RIGHT);\r
 \r
        CheckRadioButton(IDC_REMOTE_RD,IDC_OTHER_RD,IDC_REMOTE_RD);\r
        m_Remote.EnableWindow(TRUE);\r
        m_Other.EnableWindow(FALSE);\r
+       m_RemoteBranch.EnableWindow(FALSE);\r
 \r
        m_Other.SetURLHistory(TRUE);\r
        m_Other.LoadHistory(_T("Software\\TortoiseGit\\History\\PullURLS"), _T("url"));\r
        m_Other.SetCurSel(0);\r
 \r
+       m_RemoteBranch.LoadHistory(_T("Software\\TortoiseGit\\History\\PullRemoteBranch"), _T("br"));\r
+       m_RemoteBranch.SetCurSel(0);\r
+\r
        if(m_IsPull)\r
                this->SetWindowTextW(_T("Pull"));\r
        else\r
@@ -76,12 +83,15 @@ void CPullFetchDlg::OnBnClickedRd()
        if( GetCheckedRadioButton(IDC_REMOTE_RD,IDC_OTHER_RD) == IDC_REMOTE_RD)\r
        {\r
                m_Remote.EnableWindow(TRUE);\r
-               m_Other.EnableWindow(FALSE);;\r
+               m_Other.EnableWindow(FALSE);\r
+               m_RemoteBranch.EnableWindow(FALSE);\r
+\r
        }\r
        if( GetCheckedRadioButton(IDC_REMOTE_RD,IDC_OTHER_RD) == IDC_OTHER_RD)\r
        {\r
                m_Remote.EnableWindow(FALSE);\r
                m_Other.EnableWindow(TRUE);;\r
+               m_RemoteBranch.EnableWindow(TRUE);\r
        }\r
        \r
 \r
@@ -93,11 +103,17 @@ void CPullFetchDlg::OnBnClickedOk()
        if( GetCheckedRadioButton(IDC_REMOTE_RD,IDC_OTHER_RD) == IDC_REMOTE_RD)\r
        {\r
                m_RemoteURL=m_Remote.GetString();\r
+               m_RemoteBranchName.Empty();\r
                \r
        }\r
        if( GetCheckedRadioButton(IDC_REMOTE_RD,IDC_OTHER_RD) == IDC_OTHER_RD)\r
        {\r
                m_Other.GetWindowTextW(m_RemoteURL);\r
+               m_RemoteBranchName=m_RemoteBranch.GetString();\r
+               \r
        }\r
+\r
+       m_Other.SaveHistory();\r
+       m_RemoteBranch.SaveHistory();\r
        this->OnOK();\r
 }\r