X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=src%2FTortoiseProc%2FImportPatchDlg.cpp;h=f23abbb75f72e11cb215bb917303f967bf426c7c;hb=208f0143d3299b1b617737502d49488c4c5683e1;hp=0881ba0b44c86cbe1c74e5398de512e05e704391;hpb=01ed9d0cab6b52fb9922679acd9969e7fffeeb8f;p=tortoisegit%2FTortoiseGitJp.git diff --git a/src/TortoiseProc/ImportPatchDlg.cpp b/src/TortoiseProc/ImportPatchDlg.cpp index 0881ba0..f23abbb 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() @@ -39,8 +39,28 @@ BOOL CImportPatchDlg::OnInitDialog() AddAnchor(IDOK,BOTTOM_RIGHT); AddAnchor(IDCANCEL,BOTTOM_RIGHT); + AddAnchor(IDHELP, BOTTOM_RIGHT); + + 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; } @@ -87,7 +107,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); + } } } @@ -145,11 +171,16 @@ void CImportPatchDlg::OnBnClickedButtonRemove() void CImportPatchDlg::OnBnClickedOk() { + m_PathList.Clear(); + for(int i=0;i