X-Git-Url: http://git.sourceforge.jp/view?p=tortoisegit%2FTortoiseGitJp.git;a=blobdiff_plain;f=src%2FTortoiseProc%2FImportPatchDlg.cpp;h=c0f45448c40d7466b0c3db2dea0ea83961b2848d;hp=8503a3ad8ffd0467ac321347dedf5d23665dee41;hb=564155123b9d391d4969e164cfe414678c35e3c7;hpb=e1130385d0bec0c6fa5f5b7b99b32b6f70bf2a62;ds=sidebyside diff --git a/src/TortoiseProc/ImportPatchDlg.cpp b/src/TortoiseProc/ImportPatchDlg.cpp index 8503a3a..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() @@ -40,6 +40,25 @@ BOOL CImportPatchDlg::OnInitDialog() AddAnchor(IDOK,BOTTOM_RIGHT); AddAnchor(IDCANCEL,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 +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); + } } } @@ -145,13 +170,16 @@ void CImportPatchDlg::OnBnClickedButtonRemove() void CImportPatchDlg::OnBnClickedOk() { - // TODO: Add your control notification handler code here - int i; + m_PathList.Clear(); + for(int i=0;i