void CFormatPatchDlg::OnBnClickedButtonTo() { CLogDlg dlg; CString revision; m_cTo.GetWindowText(revision); dlg.SetParams(CTGitPath(), CTGitPath(), revision, revision, 0); // tell the dialog to use mode for selecting revisions dlg.SetSelect(true); // only one revision must be selected however dlg.SingleSelection(true); if (dlg.DoModal() == IDOK && !dlg.GetSelectedHash().empty()) { m_cTo.AddString(dlg.GetSelectedHash().at(0).ToString()); CheckRadioButton(IDC_RADIO_SINCE, IDC_RADIO_RANGE, IDC_RADIO_RANGE); OnBnClickedRadio(); } }
void CPushDlg::OnBnClickedButtonBrowseSourceBranch() { switch (m_BrowseLocalRef.GetCurrentEntry()) { case 0: /* Browse Refence*/ { if(CBrowseRefsDlg::PickRefForCombo(&m_BranchSource, gPickRef_Head)) OnCbnSelchangeBranchSource(); } break; case 1: /* Log */ { CLogDlg dlg; dlg.SetSelect(true); if(dlg.DoModal() == IDOK) { if (dlg.GetSelectedHash().IsEmpty()) return; m_BranchSource.SetWindowText(dlg.GetSelectedHash()); OnCbnSelchangeBranchSource(); } } break; case 2: /*RefLog*/ { CRefLogDlg dlg; if(dlg.DoModal() == IDOK) { m_BranchSource.SetWindowText(dlg.m_SelectedHash); OnCbnSelchangeBranchSource(); } } break; } }
void CRequestPullDlg::OnBnClickedButtonLocalBranch() { // use the git log to allow selection of a version CLogDlg dlg; CString revision; m_cStartRevision.GetWindowText(revision); dlg.SetParams(CTGitPath(), CTGitPath(), revision, revision, 0); // tell the dialog to use mode for selecting revisions dlg.SetSelect(true); // only one revision must be selected however dlg.SingleSelection(true); if ( dlg.DoModal() == IDOK ) m_cStartRevision.SetWindowText(dlg.GetSelectedHash().at(0).ToString()); }
void CRepositoryBrowser::OnBnClickedButtonRevision() { // use the git log to allow selection of a version CLogDlg dlg; // tell the dialog to use mode for selecting revisions dlg.SetSelect(true); // only one revision must be selected however dlg.SingleSelection(true); if (dlg.DoModal() == IDOK) { // get selected hash if any m_sRevision = dlg.GetSelectedHash(); Refresh(); } }
void CRequestPullDlg::OnBnClickedButtonLocalBranch() { // use the git log to allow selection of a version CLogDlg dlg; // tell the dialog to use mode for selecting revisions dlg.SetSelect(true); // only one revision must be selected however dlg.SingleSelection(true); if ( dlg.DoModal() == IDOK ) { // get selected hash if any CString selectedHash = dlg.GetSelectedHash(); // load into window, do this even if empty so that it is clear that nothing has been selected m_cStartRevision.SetWindowText( selectedHash ); } }
void CRepositoryBrowser::OnBnClickedButtonRevision() { // use the git log to allow selection of a version CLogDlg dlg; dlg.SetParams(CTGitPath(), CTGitPath(), m_sRevision, m_sRevision, 0); // tell the dialog to use mode for selecting revisions dlg.SetSelect(true); dlg.ShowWorkingTreeChanges(false); // only one revision must be selected however dlg.SingleSelection(true); if (dlg.DoModal() == IDOK) { m_sRevision = dlg.GetSelectedHash().at(0).ToString(); Refresh(); } }
void CBisectStartDlg::OnBnClickedButtonBad() { // use the git log to allow selection of a version CLogDlg dlg; CString revision; m_cFirstBadRevision.GetWindowText(revision); dlg.SetParams(CTGitPath(), CTGitPath(), revision, revision, 0); // tell the dialog to use mode for selecting revisions dlg.SetSelect(true); // only one revision must be selected however dlg.SingleSelection(true); if (dlg.DoModal() == IDOK) { // get selected hash if any CString selectedHash = dlg.GetSelectedHash(); // load into window, do this even if empty so that it is clear that nothing has been selected m_cFirstBadRevision.SetWindowText(selectedHash); OnChangedRevision(); } }
void CFileDiffDlg::ClickRevButton(CMenuButton *button, GitRev *rev, CACEdit *edit) { INT_PTR entry=button->GetCurrentEntry(); if(entry == 0) /* Browse Refence*/ { { CString str = CBrowseRefsDlg::PickRef(); if(str.IsEmpty()) return; if(FillRevFromString(rev,str)) return; edit->SetWindowText(str); } } if(entry == 1) /*Log*/ { CLogDlg dlg; CString revision; edit->GetWindowText(revision); dlg.SetParams(CTGitPath(), CTGitPath(), revision, revision, 0); dlg.SetSelect(true); if(dlg.DoModal() == IDOK) { if (dlg.GetSelectedHash().empty()) return; if (FillRevFromString(rev, dlg.GetSelectedHash().at(0).ToString())) return; edit->SetWindowText(dlg.GetSelectedHash().at(0).ToString()); } else return; } if(entry == 2) /*RefLog*/ { CRefLogDlg dlg; if(dlg.DoModal() == IDOK) { if(FillRevFromString(rev,dlg.m_SelectedHash)) return; edit->SetWindowText(dlg.m_SelectedHash); } else return; } SetURLLabels(); InterlockedExchange(&m_bThreadRunning, TRUE); if (AfxBeginThread(DiffThreadEntry, this)==NULL) { InterlockedExchange(&m_bThreadRunning, FALSE); CMessageBox::Show(NULL, IDS_ERR_THREADSTARTFAILED, IDS_APPNAME, MB_OK | MB_ICONERROR); } KillTimer(IDT_INPUT); }