CImportPatchDlg::CImportPatchDlg(CWnd* pParent /*=NULL*/)\r
: CResizableStandAloneDialog(CImportPatchDlg::IDD, pParent)\r
{\r
-\r
+ m_cList.m_ContextMenuMask &=~ m_cList.GetMenuMask(CPatchListCtrl::MENU_APPLY);\r
}\r
\r
CImportPatchDlg::~CImportPatchDlg()\r
this->AddOthersToAnchor();\r
\r
m_PathList.SortByPathname(true);\r
+ m_cList.SetExtendedStyle( m_cList.GetExtendedStyle()| LVS_EX_CHECKBOXES );\r
\r
for(int i=0;i<m_PathList.GetCount();i++)\r
{\r
m_cList.InsertItem(0,m_PathList[i].GetWinPath());\r
+ m_cList.SetCheck(0,true);\r
}\r
\r
+ \r
+\r
//CAppUtils::SetListCtrlBackgroundImage(m_cList.GetSafeHwnd(), nID);\r
\r
CString title;\r
pos=dlg.GetStartPosition();\r
while(pos)\r
{\r
- m_cList.InsertItem(0,dlg.GetNextPathName(pos));\r
+ CString file=dlg.GetNextPathName(pos);\r
+ file.Trim();\r
+ if(!file.IsEmpty())\r
+ {\r
+ m_cList.InsertItem(0,file);\r
+ m_cList.SetCheck(0,true);\r
+ }\r
}\r
}\r
\r
\r
for(int i=0;i<m_cList.GetItemCount();i++)\r
{\r
- CTGitPath path;\r
- path.SetFromWin(m_cList.GetItemText(i,0));\r
- m_PathList.AddPath(path);\r
+ if(m_cList.GetCheck(i))\r
+ {\r
+ CTGitPath path;\r
+ path.SetFromWin(m_cList.GetItemText(i,0));\r
+ m_PathList.AddPath(path);\r
+ }\r
}\r
OnOK();\r
}\r