CString cmd;\r
CString output;\r
\r
- if(!this->orgCmdLinePath.IsAdminDir())\r
+ if(!this->orgCmdLinePath.HasAdminDir())\r
{\r
CString str=CAppUtils::ChooseRepository((CString*)&orgCmdLinePath.GetWinPathString());\r
CTGitPath path;\r
g_Git.m_CurrentDir=str;\r
}\r
\r
- for(int i=0;i<this->pathList.GetCount();i++)\r
+ for(int i=0;i<this->orgPathList.GetCount();i++)\r
{\r
- if(!pathList[i].IsDirectory())\r
+ if(!orgPathList[i].IsDirectory())\r
{\r
- dlg.m_PathList.AddPath(pathList[i]);\r
+ dlg.m_PathList.AddPath(orgPathList[i]);\r
}\r
}\r
\r
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
#include "StandAloneDlg.h"\r
// CImportPatchDlg dialog\r
#include "TGitPath.h"\r
+#include "PatchListCtrl.h"\r
\r
class CImportPatchDlg : public CResizableStandAloneDialog\r
{\r
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support\r
virtual BOOL OnInitDialog();\r
\r
- CListCtrl m_cList;\r
+ CPatchListCtrl m_cList;\r
DECLARE_MESSAGE_MAP()\r
public:\r
afx_msg void OnLbnSelchangeListPatch();\r