X-Git-Url: http://git.sourceforge.jp/view?p=tortoisegit%2FTortoiseGitJp.git;a=blobdiff_plain;f=src%2FTortoiseProc%2FImportPatchDlg.cpp;h=c0f45448c40d7466b0c3db2dea0ea83961b2848d;hp=611ed08c9d2b1c54cebf6178c19ba9f51b0f2745;hb=564155123b9d391d4969e164cfe414678c35e3c7;hpb=61801e95cd64d237f455da2312a050c3e878ee9a;ds=sidebyside diff --git a/src/TortoiseProc/ImportPatchDlg.cpp b/src/TortoiseProc/ImportPatchDlg.cpp index 611ed08..c0f4544 100644 --- a/src/TortoiseProc/ImportPatchDlg.cpp +++ b/src/TortoiseProc/ImportPatchDlg.cpp @@ -4,7 +4,7 @@ #include "stdafx.h" #include "TortoiseProc.h" #include "ImportPatchDlg.h" - +#include "git.h" // CImportPatchDlg dialog @@ -13,7 +13,7 @@ IMPLEMENT_DYNAMIC(CImportPatchDlg, CResizableStandAloneDialog) CImportPatchDlg::CImportPatchDlg(CWnd* pParent /*=NULL*/) : CResizableStandAloneDialog(CImportPatchDlg::IDD, pParent) { - + m_cList.m_ContextMenuMask &=~ m_cList.GetMenuMask(CPatchListCtrl::MENU_APPLY); } CImportPatchDlg::~CImportPatchDlg() @@ -43,14 +43,21 @@ BOOL CImportPatchDlg::OnInitDialog() this->AddOthersToAnchor(); m_PathList.SortByPathname(true); + m_cList.SetExtendedStyle( m_cList.GetExtendedStyle()| LVS_EX_CHECKBOXES ); for(int i=0;iGetWindowText(title); + this->SetWindowText(title+_T(" - ")+g_Git.m_CurrentDir); EnableSaveRestore(_T("ImportDlg")); return TRUE; @@ -99,7 +106,13 @@ void CImportPatchDlg::OnBnClickedButtonAdd() pos=dlg.GetStartPosition(); while(pos) { - m_cList.InsertItem(0,dlg.GetNextPathName(pos)); + CString file=dlg.GetNextPathName(pos); + file.Trim(); + if(!file.IsEmpty()) + { + m_cList.InsertItem(0,file); + m_cList.SetCheck(0,true); + } } } @@ -161,9 +174,12 @@ void CImportPatchDlg::OnBnClickedOk() for(int i=0;i