OSDN Git Service

PATCH: [ 871789 ] Add "Copy to..." items to dirview context menu
authorKimmo Varis <kimmov@gmail.com>
Sat, 17 Jan 2004 12:50:38 +0000 (12:50 +0000)
committerKimmo Varis <kimmov@gmail.com>
Sat, 17 Jan 2004 12:50:38 +0000 (12:50 +0000)
45 files changed:
Src/Common/CShellFileOp.cpp [new file with mode: 0644]
Src/Common/CShellFileOp.h [new file with mode: 0644]
Src/DirActions.cpp
Src/DirView.cpp
Src/DirView.h
Src/Languages/Brazilian/MergeBrazilian.rc
Src/Languages/Brazilian/resource.h
Src/Languages/Catalan/MergeCatalan.rc
Src/Languages/Catalan/resource.h
Src/Languages/ChineseSimplified/MergeChineseSimplified.rc
Src/Languages/ChineseSimplified/resource.h
Src/Languages/ChineseTraditional/MergeChineseTraditional.rc
Src/Languages/ChineseTraditional/resource.h
Src/Languages/Czech/MergeCzech.rc
Src/Languages/Czech/resource.h
Src/Languages/Danish/MergeDanish.rc
Src/Languages/Danish/resource.h
Src/Languages/Dutch/MergeDutch.rc
Src/Languages/Dutch/resource.h
Src/Languages/French/MergeFrench.rc
Src/Languages/French/resource.h
Src/Languages/German/MergeGerman.rc
Src/Languages/German/resource.h
Src/Languages/Italian/MergeItalian.rc
Src/Languages/Italian/resource.h
Src/Languages/Korean/MergeKorean.rc
Src/Languages/Korean/resource.h
Src/Languages/Norwegian/MergeNorwegian.rc
Src/Languages/Norwegian/resource.h
Src/Languages/Polish/MergePolish.rc
Src/Languages/Polish/resource.h
Src/Languages/Russian/MergeRussian.rc
Src/Languages/Russian/resource.h
Src/Languages/Slovak/MergeSlovak.rc
Src/Languages/Slovak/resource.h
Src/Languages/Spanish/MergeSpanish.rc
Src/Languages/Spanish/resource.h
Src/Languages/Swedish/MergeSwedish.rc
Src/Languages/Swedish/resource.h
Src/Merge.cpp
Src/Merge.dsp
Src/Merge.h
Src/Merge.rc
Src/readme.txt
Src/resource.h

diff --git a/Src/Common/CShellFileOp.cpp b/Src/Common/CShellFileOp.cpp
new file mode 100644 (file)
index 0000000..267f17f
--- /dev/null
@@ -0,0 +1,697 @@
+//////////////////////////////////////////////////////////////////////
+//
+// CShellFileOp.cpp: implementation of the CShellFileOp class.
+//
+//////////////////////////////////////////////////////////////////////
+//
+// This class written and copyright by Michael Dunn (mdunn at inreach
+// dot com).  You may freely use and redistribute this source code and
+// accompanying documentation as long as this notice is retained.
+//
+// Contact me if you have any questions, comments, or bug reports.  My 
+// homepage is at http://home.inreach.com/mdunn/
+//
+//////////////////////////////////////////////////////////////////////
+// 
+// Revision history:
+//  Oct 11, 1998: Version 1.0: First release.
+//
+//  Feb 27, 2000: Version 1.1: Fixed a bug in CShellFileOp::Go() that
+//  would allocate twice the memory needed in Unicode builds.  The 'new'
+//  statements now allocate BYTEs instead of TCHARs.
+//
+//////////////////////////////////////////////////////////////////////
+
+#include "stdafx.h"
+#include "shlobj.h"
+#include "objbase.h"
+#include "CShellFileOp.h"
+
+#ifdef _DEBUG
+#undef THIS_FILE
+static char THIS_FILE[]=__FILE__;
+#define new DEBUG_NEW
+#endif
+
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CShellFileOp::CShellFileOp()
+{
+    ResetInternalData();
+}
+
+CShellFileOp::~CShellFileOp()
+{
+}
+
+
+//////////////////////////////////////////////////////////////////////
+// Public operations
+//////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Function:    CShellFileOp::AddSourceFile
+//
+// Description:
+//  Adds a file/dir to the list of source files for the next file operation.
+//
+// Input:
+//  szPath: [in] The path to the file/dir to be added.
+//
+// Returns:
+//  TRUE if the path was added successfully.  A CMemoryException will be
+//  thrown in an out-of-memory condition.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+BOOL CShellFileOp::AddSourceFile ( LPCTSTR szPath )
+{
+    ASSERT ( AfxIsValidString ( szPath ) );
+
+    try
+        {
+        m_lcstrSourceFiles.AddTail ( szPath );
+        }
+    catch ( CMemoryException )
+        {
+        TRACE0("Memory exception in CShellFileOp::AddSourceFile()!\n");
+        throw;
+        }
+
+    return TRUE;
+}
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Function:    CShellFileOp::AddDestFile
+//
+// Description:
+//  Adds a file/dir to the list of destination files for the next file
+//  operation.
+//
+// Input:
+//  szPath: [in] The path to the file/dir to be added.
+//
+// Returns:
+//  TRUE if the path was added successfully.  A CMemoryException will be
+//  thrown in an out-of-memory condition.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+BOOL CShellFileOp::AddDestFile ( LPCTSTR szPath )
+{
+    ASSERT ( AfxIsValidString ( szPath ) );
+
+    try
+        {
+        m_lcstrDestFiles.AddTail ( szPath );
+        }
+    catch ( CMemoryException )
+        {
+        TRACE0("Memory exception in CShellFileOp::AddDestFile()!\n");
+        throw;
+        }
+
+    return TRUE;
+}
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Function:    CShellFileOp::GetSourceFileList
+//
+// Description:
+//  Returns a reference to the internal list of source files for the next
+//  file operation.
+//
+// Input:
+//  Nothing.
+//
+// Returns:
+//  A CStringList reference.  Mess with this at your own risk. :)
+//
+/////////////////////////////////////////////////////////////////////////////
+
+const CStringList& CShellFileOp::GetSourceFileList()
+{
+    return m_lcstrSourceFiles;
+}
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Function:    CShellFileOp::GetDestFileList
+//
+// Description:
+//  Returns a reference to the internal list of destination files for the next
+//  file operation.
+//
+// Input:
+//  Nothing.
+//
+// Returns:
+//  A CStringList reference.  Mess with this at your own risk. :)
+//
+/////////////////////////////////////////////////////////////////////////////
+
+const CStringList& CShellFileOp::GetDestFileList()
+{
+    return m_lcstrDestFiles;
+}
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Function:    CShellFileOp::SetOperationFlags
+//
+// Description:
+//  Sets various parameters for the next file operation.
+//
+// Input:
+//  uOpType: [in] FO_COPY, FO_DELETE, FO_MOVE, or FO_RENAME.
+//  pWnd: [in] Pointer to the CWnd which will the parent window for any UI that
+//             the shell displays during the operation.
+//  Along with a bunch of other flags whose names I hope are self-explanatory.
+//  They're explained in full in the documentation.
+//
+// Returns:
+//  Nothing.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+void CShellFileOp::SetOperationFlags ( UINT  uOpType,
+                                       CWnd* pWnd,
+                                       BOOL  bSilent,
+                                       BOOL  bAllowUndo,
+                                       BOOL  bWildcardFilesOnly,
+                                       BOOL  bNoConfirmation,
+                                       BOOL  bNoConfirmationToMakeDir,
+                                       BOOL  bRenameOnCollision,
+                                       BOOL  bSimpleProgressDlg )
+{
+FILEOP_FLAGS fFlags = 0;
+
+    // Validate the operation type.  If this assert fires, you sent in
+    // an invalid op type.
+
+    ASSERT ( uOpType == FO_COPY  ||  uOpType == FO_DELETE  ||
+             uOpType == FO_MOVE  ||  uOpType == FO_RENAME );
+    ASSERT_VALID ( pWnd );
+
+                                        // store the op type
+    m_rFOS.wFunc = uOpType;
+
+                                        // store the parent window
+    m_rFOS.hwnd = pWnd->GetSafeHwnd();
+
+                                        // set the various flags...
+    if ( bSilent )                  fFlags |= FOF_SILENT;
+    if ( bAllowUndo )               fFlags |= FOF_ALLOWUNDO;
+    if ( bWildcardFilesOnly )       fFlags |= FOF_FILESONLY;
+    if ( bNoConfirmation )          fFlags |= FOF_NOCONFIRMATION;
+    if ( bNoConfirmationToMakeDir ) fFlags |= FOF_NOCONFIRMMKDIR;
+    if ( bRenameOnCollision )       fFlags |= FOF_RENAMEONCOLLISION;
+    if ( bSimpleProgressDlg )       fFlags |= FOF_SIMPLEPROGRESS;
+
+    m_rFOS.fFlags = fFlags;
+
+    m_bFlagsSet = TRUE;
+}
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Function:    CShellFileOp::SetOperationFlags
+//
+// Description:
+//  Sets various parameters for the next file operation.
+//
+// Input:
+//  uOpType: [in] FO_COPY, FO_DELETE, FO_MOVE, or FO_RENAME.
+//  pWnd: [in] Pointer to the CWnd which will the parent window for any UI that
+//             the shell displays during the operation.
+//  fFlags: [in] Any legal combination of the FOF_* flags.  See the docs for
+//               SHFileOperation() for info on the flags.
+//
+// Returns:
+//  Nothing.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+void CShellFileOp::SetOperationFlags ( UINT uOpType, CWnd* pWnd,
+                                       FILEOP_FLAGS fFlags )
+{
+    // Validate the op type.  If this assert fires, check the operation
+    // type param that you're passing in.
+    ASSERT ( uOpType == FO_COPY  ||  uOpType == FO_DELETE  ||
+             uOpType == FO_MOVE  ||  uOpType == FO_RENAME );
+    ASSERT_VALID ( pWnd );
+
+                                        // store the op type
+    m_rFOS.wFunc = uOpType;
+
+                                        // store the parent window
+    m_rFOS.hwnd = pWnd->GetSafeHwnd();
+
+                                        // store the op flags
+    m_rFOS.fFlags = fFlags;
+
+    m_bFlagsSet = TRUE;
+}
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Function:    CShellFileOp::SetProgressDlgTitle
+//
+// Description:
+//  Sets the string to be used if the simple progress dialog is used for
+//  the next file operation.
+//
+// Input:
+//  szTitle: [in] The string to use.
+//
+// Returns:
+//  Nothing.
+//
+// Note:
+//  The object maintains its own copy of the string in a CString, so the 
+//  caller can destroy or reuse its string once this function returns.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+void CShellFileOp::SetProgressDlgTitle ( LPCTSTR szTitle )
+{
+    ASSERT ( AfxIsValidString ( szTitle ) );
+
+    try
+        {
+        m_cstrProgressDlgTitle = szTitle;
+        }
+    catch ( CMemoryException )
+        {
+        TRACE0("Memory exception in CShellFileOp::SetProgressDlgTitle()!\n");
+        throw;
+        }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+//
+// Function:    CShellFileOp::AnyOperationsAborted
+//
+// Description:
+//  Returns a flag indicating whether the user canceled the last file operation.
+//
+// Input:
+//  Nothing.
+//
+// Returns:
+//  TRUE if the user canceled the last file op, or FALSE if not.
+//
+//////////////////////////////////////////////////////////////////////////
+
+BOOL CShellFileOp::AnyOperationsAborted()
+{
+    // If this assert fires, it means you called this member function
+    // before calling Go(), or you did call Go() but Go() couldn't call
+    // the SHFileOperation() API due to incomplete or invalid infomation.
+    // You should have gotten an assert in Go() in the latter case - that's
+    // where you should be looking for the source of the trouble. :)
+
+    ASSERT ( m_bGoCalledAPI );
+
+    return m_rFOS.fAnyOperationsAborted;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+//
+// Function:    CShellFileOp::Reset
+//
+// Description:
+//  Resets internal data used for file operations.
+//
+// Input:
+//  Nothing.
+//
+// Returns:
+//  Nothing.
+//
+// Note:
+//  If you are using a CShellFileOp object to do multiple operations, call
+//  this function after one operation to clear out all data from the
+//  operation, and "wipe the slate" for the next one.
+//
+//////////////////////////////////////////////////////////////////////////
+
+void CShellFileOp::Reset()
+{
+    ResetInternalData();
+}
+
+
+//////////////////////////////////////////////////////////////////////
+// The Go() function!
+//////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////
+//
+// Function:    CShellFileOp::Go
+//
+// Description:
+//  Validates data and starts a file operation.
+//
+// Input:
+//  lpbOperationStarted: [out] Pointer to a BOOL that receives TRUE if the
+//                       SHFileOperation() API was called to start the
+//                       operation, or FALSE if the API was not called.
+//  lpnAPIReturn: [out] Pointer to an int that receives the return value from
+//                SHFileOperation() if it was called.  If the API is not called,
+//                the variable pointed to is not changed.
+//  lpbAnyOperationsAborted: [out] Pointer to a BOOL that receives TRUE if the
+//                           user aborted the file operation, or FALSE if not.
+//
+// Returns:
+//  TRUE if and only if SHFileOperation() was called and it returned 0 (success).
+//
+//////////////////////////////////////////////////////////////////////////
+// Updated in v1.1 - Changed the two 'new' calls to allocate BYTEs insetad
+// of TCHARs.
+//////////////////////////////////////////////////////////////////////////
+
+BOOL CShellFileOp::Go ( BOOL* lpbOperationStarted,
+                        int*  lpnAPIReturn /*=NULL*/,
+                        BOOL* lpbAnyOperationsAborted  /*=NULL*/ )
+{
+TCHAR* szzSourceFiles = NULL;
+TCHAR* szzDestFiles = NULL;
+DWORD  dwSourceBufferSize;
+DWORD  dwDestBufferSize;
+int    nAPIRet;
+
+    // Validate the pointers....
+    ASSERT ( AfxIsValidAddress ( lpbOperationStarted, sizeof(BOOL) ) );
+    ASSERT ( lpnAPIReturn == NULL  ||
+             AfxIsValidAddress ( lpnAPIReturn, sizeof(int) ) );
+    ASSERT ( lpbAnyOperationsAborted == NULL  ||
+             AfxIsValidAddress ( lpbAnyOperationsAborted, sizeof(BOOL) ) );
+
+
+    m_bGoCalledAPI = FALSE;
+
+    if ( NULL != lpbOperationStarted )
+        {
+        *lpbOperationStarted = FALSE;
+        }
+
+                                        // Do a bunch of validation before
+                                        // calling the API.
+
+                                        // 1. Did you call SetOperationFlags()?
+
+    if ( ! m_bFlagsSet )
+        {
+        TRACE0("Go() aborting because SetOperationFlags() was not called first.\n");
+        goto bailout;
+        }
+
+                                        // 2 Is the op type valid?
+
+    if ( ! ( m_rFOS.wFunc == FO_COPY  ||  m_rFOS.wFunc == FO_DELETE  ||
+             m_rFOS.wFunc == FO_MOVE  ||  m_rFOS.wFunc == FO_RENAME ) )
+        {
+        TRACE0("Go() aborting because the operation type was invalid.\n");
+        goto bailout;
+        }
+
+                                        // 3 Is the source file list nonempty?
+    
+    if ( m_lcstrSourceFiles.IsEmpty() ) 
+        {
+        TRACE0("Go() aborting because the source file list is empty.\n");
+        goto bailout;
+        }
+
+                                        // 4. Is the dest file list nonempty
+                                        // if the op needs dest files?
+
+    if ( m_rFOS.wFunc != FO_DELETE  &&  m_lcstrDestFiles.IsEmpty() )
+        {
+        TRACE0("Go() aborting because the destination file list is empty.\n");
+        goto bailout;
+        }
+
+                                        // 5. Is the dest file list OK?  There
+                                        // must either be one entry, or the same
+                                        // number of entries as in the source
+                                        // list.
+
+    if ( m_rFOS.wFunc != FO_DELETE )
+        {
+        if ( m_lcstrDestFiles.GetCount() != 1  &&
+             m_lcstrDestFiles.GetCount() != m_lcstrSourceFiles.GetCount() )
+            {
+            TRACE0("Go() aborting because the destination file list has the wrong number of strings.\n");
+            goto bailout;
+            }
+        }
+
+
+                                        // Everything checked out OK, so now
+                                        // build the big double-null-terminated
+                                        // buffers.
+
+    dwSourceBufferSize = GetRequiredBufferSize ( m_lcstrSourceFiles );
+
+    if ( m_rFOS.wFunc != FO_DELETE )
+        {
+        dwDestBufferSize = GetRequiredBufferSize ( m_lcstrDestFiles );
+        }
+
+    try
+        {
+        szzSourceFiles = (LPTSTR) new BYTE [ dwSourceBufferSize ];
+
+        if ( m_rFOS.wFunc != FO_DELETE )
+            {
+            szzDestFiles = (LPTSTR) new BYTE [ dwDestBufferSize ];
+            }
+        }
+    catch ( CMemoryException )
+        {
+        TRACE0("Memory exception in CShellFileOp::Go()!\n");
+        throw;
+        }
+
+    FillSzzBuffer ( szzSourceFiles, m_lcstrSourceFiles );
+
+    if ( m_rFOS.wFunc != FO_DELETE )
+        {
+        FillSzzBuffer ( szzDestFiles, m_lcstrDestFiles );
+        }
+
+                                        // and now, the moment you've all been
+                                        // waiting for
+
+    m_rFOS.pFrom = szzSourceFiles;
+    m_rFOS.pTo = szzDestFiles;
+    m_rFOS.lpszProgressTitle = (LPCTSTR) m_cstrProgressDlgTitle;
+
+
+                                        // If there are 2 or more strings in
+                                        // the destination list, set the 
+                                        // MULTIDESTFILES flag.
+                                    
+    if ( m_lcstrDestFiles.GetCount() > 1 )
+        {
+        m_rFOS.fFlags |= FOF_MULTIDESTFILES;
+        }
+
+
+    m_bGoCalledAPI = TRUE;
+    
+    if ( NULL != lpbOperationStarted )
+        {
+        *lpbOperationStarted = TRUE;
+        }
+
+                                        // drum roll please....
+    nAPIRet = SHFileOperation ( &m_rFOS );  // tah-dah!
+
+                                        // Save the return value from the API.    
+    if ( NULL != lpnAPIReturn )
+        {
+        *lpnAPIReturn = nAPIRet;
+        }
+
+                                        // Check if the user cancelled the
+                                        // operation.
+
+    if ( NULL != lpbAnyOperationsAborted )
+        {
+        *lpbAnyOperationsAborted = m_rFOS.fAnyOperationsAborted;
+        }
+
+bailout:
+    // If we got here via one of the gotos, fire off an assert.
+    // If this assert fires, check the debug window for a TRACE output
+    // line that describes the problem.
+    ASSERT ( m_bGoCalledAPI );
+
+                                        // Free buffers.
+    if ( NULL != szzSourceFiles )
+        {
+        delete [] szzSourceFiles;
+        }
+
+    if ( NULL != szzDestFiles )
+        {
+        delete [] szzDestFiles;
+        }
+
+
+    return m_bGoCalledAPI  &&  0 == nAPIRet;
+}
+
+
+//////////////////////////////////////////////////////////////////////
+// Private helper functions
+//////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////
+//
+// Function:    CShellFileOp::ResetInternalData
+//
+// Description:
+//  Clears the CShellFileOp object's member variables in preparation for a
+//  new file operation.
+//
+// Input:
+//  Nothing.
+//
+// Returns:
+//  Nothing.
+//
+//////////////////////////////////////////////////////////////////////////
+
+void CShellFileOp::ResetInternalData()
+{
+                                        // Empty the string lists
+    m_lcstrSourceFiles.RemoveAll();
+    m_lcstrDestFiles.RemoveAll();
+
+                                        // Reset state variables
+    m_bFlagsSet = FALSE;
+    m_bGoCalledAPI = FALSE;
+    
+                                        // And clear out other stuff...
+    m_cstrProgressDlgTitle.Empty();
+
+    ZeroMemory ( &m_rFOS, sizeof ( m_rFOS ) );
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+//
+// Function:    CShellFileOp::GetRequiredBufferSize
+//
+// Description:
+//  Calculates the number of bytes required to hold the passed-in string
+//  list in double-null-terminated character array form.
+//
+// Input:
+//  list: [in] The string list to look at.
+//
+// Returns:
+//  The number of bytes required.
+//
+//////////////////////////////////////////////////////////////////////////
+
+DWORD CShellFileOp::GetRequiredBufferSize ( const CStringList& list )
+{
+DWORD    dwRetVal = 0;
+POSITION pos;
+CString  cstr;
+
+    // If this assert fires, the passed-in list was empty. This ought to
+    // never fire, actually, since Go() won't even call this function if
+    // either list is empty.
+
+    ASSERT ( !list.IsEmpty() );
+
+
+    pos = list.GetHeadPosition();
+
+    while ( NULL != pos )
+        {
+        cstr = list.GetNext ( pos );
+
+        // **NOTE** The MFC docs for CString::GetLength() say that it returns
+        // the number of bytes in the string, but that's wrong!!  In Unicode,
+        // it returns the number of characters (which is half the number of
+        // bytes).  Thus the multiplication by sizeof(TCHAR).
+
+        dwRetVal += sizeof(TCHAR) * ( cstr.GetLength() + 1 );
+        }
+
+    return dwRetVal + sizeof(TCHAR);    // add one more for the final null
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+//
+// Function:    CShellFileOp::FillSzzBuffer
+//
+// Description:
+//  Copies a string list into a character array, making a double-null-terminated
+//  list of strings.
+//
+// Input:
+//  pBuffer: [out] The buffer that will hold the strings.
+//  list: [in] The string list to read.
+//
+// Returns:
+//  Nothing.
+//
+//////////////////////////////////////////////////////////////////////////
+
+void CShellFileOp::FillSzzBuffer ( TCHAR* pBuffer, const CStringList& list )
+{
+TCHAR*   pCurrPos;
+POSITION pos;
+CString  cstr;
+
+    // If this assert fires, the passed-in list was empty. This ought to
+    // never fire, actually, since Go() won't even call this function if
+    // either list is empty when it shouldn't be.
+
+    ASSERT ( !list.IsEmpty() );
+
+    ASSERT ( pBuffer != NULL );
+
+
+    pCurrPos = pBuffer;
+
+    pos = list.GetHeadPosition();
+
+    while ( NULL != pos )
+        {
+        cstr = list.GetNext ( pos );
+
+        _tcscpy ( pCurrPos, (LPCTSTR) cstr );
+
+        pCurrPos = _tcsinc ( _tcschr ( pCurrPos, '\0' ) );
+        }
+
+                                        // Tack on the final null
+    *pCurrPos = '\0';
+}
diff --git a/Src/Common/CShellFileOp.h b/Src/Common/CShellFileOp.h
new file mode 100644 (file)
index 0000000..b40f7b8
--- /dev/null
@@ -0,0 +1,107 @@
+//////////////////////////////////////////////////////////////////////
+//
+// CShellFileOp.h: interface for the CShellFileOp class.
+//
+//////////////////////////////////////////////////////////////////////
+//
+// This class written and copyright by Michael Dunn (mdunn at inreach
+// dot com).  You may freely use and redistribute this source code and
+// accompanying documentation as long as this notice is retained.
+//
+// Contact me if you have any questions, comments, or bug reports.  My 
+// homepage is at http://home.inreach.com/mdunn/
+//
+//////////////////////////////////////////////////////////////////////
+// 
+// Revision history:
+//  Oct 11, 1998: Version 1.0: First release.
+//
+//  Feb 27, 2000: Version 1.1: Fixed a bug in CShellFileOp::Go() that
+//  would allocate twice the memory needed in Unicode builds.  The 'new'
+//  statements now allocate BYTEs instead of TCHARs.
+//
+//////////////////////////////////////////////////////////////////////
+
+#ifndef __CSHELLFILEOP_H__
+#define __CSHELLFILEOP_H__
+
+#if _MSC_VER >= 1000
+#pragma once
+#endif // _MSC_VER >= 1000
+
+#include "objbase.h"
+
+//////////////////////////////////////////////////////////////////////
+// The CShellFileOp class
+//////////////////////////////////////////////////////////////////////
+
+class CShellFileOp  
+{
+// Constructor and destructor
+public:
+       CShellFileOp();
+    ~CShellFileOp();
+
+
+// Operations
+public:
+    BOOL AddSourceFile ( LPCTSTR szPath );
+    BOOL AddDestFile ( LPCTSTR szPath );
+
+    const CStringList& GetSourceFileList();
+    const CStringList& GetDestFileList();
+
+    void SetOperationFlags (
+        UINT  uOpType,
+        CWnd* pWnd,
+        BOOL  bSilent,
+        BOOL  bAllowUndo,
+        BOOL  bWildcardFilesOnly,
+        BOOL  bNoConfirmation,
+        BOOL  bNoConfirmationToMakeDir,
+        BOOL  bRenameOnCollision,
+        BOOL  bSimpleProgressDlg );
+
+    void SetOperationFlags ( UINT uOpType, CWnd* pWnd, FILEOP_FLAGS fFlags );
+
+    void SetProgressDlgTitle ( LPCTSTR szTitle );
+
+    BOOL Go ( BOOL* lpbOperationStarted,
+              int*  lpnAPIReturn = NULL,
+              BOOL* lpbAnyOperationsAborted = NULL );
+
+    BOOL AnyOperationsAborted();
+
+    void Reset();
+
+
+// Internal data
+protected:
+                                        // State flags that indicate whether
+                                        // you've provided enough info before
+                                        // calling Go() or AnyOperationsAborted().
+    BOOL        m_bFlagsSet;
+    BOOL        m_bGoCalledAPI;
+
+                                        // file lists
+    CStringList m_lcstrSourceFiles;
+    CStringList m_lcstrDestFiles;
+
+                                        // The file op struct passed to 
+    SHFILEOPSTRUCT m_rFOS;              // SHFileOperation().
+
+
+    CString     m_cstrProgressDlgTitle;
+
+
+// Internal functions
+protected:
+    void  ResetInternalData();
+
+    DWORD GetRequiredBufferSize ( const CStringList& );
+    
+    void  FillSzzBuffer ( TCHAR*, const CStringList& );
+};
+
+
+#endif // ndef __CSHELLFILEOP_H__
index e65417b..bb2ab80 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-//    see Merge.cpp for license (GPLv2+) statement 
+//    see Merge.cpp for license (GPLv2+) statement
 //
 /////////////////////////////////////////////////////////////////////////////
 /**
@@ -23,6 +23,7 @@
 #include "coretools.h"
 #include "OutputDlg.h"
 #include "paths.h"
+#include "CShellFileOp.h"
 
 #ifdef _DEBUG
 #define new DEBUG_NEW
@@ -194,10 +195,86 @@ void CDirView::DoDelBoth()
        ConfirmAndPerformActions(actionList);
 }
 
+/**
+ * @brief Copy selected left-side files to user-specified directory
+ * @note CShellFileOp takes care of much of error handling
+ */
+void CDirView::DoCopyLeftTo()
+{
+       CShellFileOp fileOp;
+       CString destPath;
+       CString startPath;
+       CString msg;
+
+       VERIFY(msg.LoadString(IDS_SELECT_DESTFOLDER));
+       if (!SelectFolder(destPath, startPath, msg))
+               return;
+
+       fileOp.SetOperationFlags(FO_COPY, this, FOF_NOCONFIRMMKDIR);
+       fileOp.AddDestFile(destPath);
+
+       int sel = -1;
+       CString slFile, srFile;
+       while ((sel = m_pList->GetNextItem(sel, LVNI_SELECTED)) != -1)
+       {
+               const DIFFITEM& di = GetDiffItem(sel);
+
+               if (IsItemCopyableToOnLeft(di))
+               {
+                       GetItemFileNames(sel, slFile, srFile);
+                       fileOp.AddSourceFile(slFile);
+               }
+       }
+
+       BOOL bSuccess = FALSE;
+       BOOL bAPICalled = FALSE;
+       BOOL bAborted = FALSE;
+       int  nAPIReturn = 0;
+       bSuccess = fileOp.Go(&bAPICalled, &nAPIReturn, &bAborted);
+}
+
+/**
+ * @brief Copy selected righ-side files to user-specified directory
+ * @note CShellFileOp takes care of much of error handling
+ */
+void CDirView::DoCopyRightTo()
+{
+       CShellFileOp fileOp;
+       CString destPath;
+       CString startPath;
+       CString msg;
+
+       VERIFY(msg.LoadString(IDS_SELECT_DESTFOLDER));
+       if (!SelectFolder(destPath, startPath, msg))
+               return;
+
+       fileOp.SetOperationFlags(FO_COPY, this, FOF_NOCONFIRMMKDIR);
+       fileOp.AddDestFile(destPath);
+
+       int sel = -1;
+       CString slFile, srFile;
+       while ((sel = m_pList->GetNextItem(sel, LVNI_SELECTED)) != -1)
+       {
+               const DIFFITEM& di = GetDiffItem(sel);
+
+               if (IsItemCopyableToOnRight(di))
+               {
+                       GetItemFileNames(sel, slFile, srFile);
+                       fileOp.AddSourceFile(slFile);
+               }
+       }
+
+       BOOL bSuccess = FALSE;
+       BOOL bAPICalled = FALSE;
+       BOOL bAborted = FALSE;
+       int  nAPIReturn = 0;
+       bSuccess = fileOp.Go( &bAPICalled, &nAPIReturn, &bAborted );
+}
+
 // Confirm with user, then perform the action list
 void CDirView::ConfirmAndPerformActions(ActionList & actionList)
 {
-       if (!actionList.selcount) // Not sure it is possible to get right-click menu without 
+       if (!actionList.selcount) // Not sure it is possible to get right-click menu without
                return;    // any selected items, but may as well be safe
 
        ASSERT(actionList.actions.GetCount()>0); // Or else the update handler got it wrong
@@ -357,7 +434,7 @@ void CDirView::PerformAndRemoveTopAction(ActionList & actionList)
                                        actionList.errors.AddTail(s);
                                }
                        }
-                       s=_T("");
+                       s.Empty();
                        if (actionList.atype==ACT_DEL_RIGHT || actionList.atype==ACT_DEL_BOTH)
                        {
                                CString sFile = act.dest.IsEmpty() ? act.src : act.dest;
@@ -405,7 +482,7 @@ BOOL CDirView::IsItemCopyableToLeft(const DIFFITEM & di)
        // don't let them mess with error items
        if (di.isResultError()) return FALSE;
        // no directory copying right now
-       if (di.isDirectory()) return FALSE; 
+       if (di.isDirectory()) return FALSE;
        // can't copy same items
        if (di.isResultSame()) return FALSE;
        // impossible if only on left
@@ -420,7 +497,7 @@ BOOL CDirView::IsItemCopyableToRight(const DIFFITEM & di)
        // don't let them mess with error items
        if (di.isResultError()) return FALSE;
        // no directory copying right now
-       if (di.isDirectory()) return FALSE; 
+       if (di.isDirectory()) return FALSE;
        // can't copy same items
        if (di.isResultSame()) return FALSE;
        // impossible if only on right
@@ -490,6 +567,28 @@ BOOL CDirView::IsItemOpenableOnRightWith(const DIFFITEM & di)
 {
        return (!di.isDirectory() && IsItemOpenableOnRight(di));
 }
+/// is it possible to copy to... left item?
+BOOL CDirView::IsItemCopyableToOnLeft(const DIFFITEM & di)
+{
+       // no directory copying right now
+       if (di.isDirectory()) return FALSE;
+       // impossible if only on right
+       if (di.isSideRight()) return FALSE;
+
+       // everything else can be copied to from left
+       return TRUE;
+}
+/// is it possible to copy to... right item?
+BOOL CDirView::IsItemCopyableToOnRight(const DIFFITEM & di)
+{
+       // no directory copying right now
+       if (di.isDirectory()) return FALSE;
+       // impossible if only on left
+       if (di.isSideLeft()) return FALSE;
+
+       // everything else can be copied to from right
+       return TRUE;
+}
 
 /// get the file names on both sides for first selected item
 BOOL CDirView::GetSelectedFileNames(CString& strLeft, CString& strRight) const
@@ -532,7 +631,7 @@ void CDirView::DoOpen(SIDE_TYPE stype)
        int rtn = (int)ShellExecute(::GetDesktopWindow(), _T("open"), file, 0, 0, SW_SHOWNORMAL);
        if (rtn==SE_ERR_NOASSOC)
                DoOpenWith(stype);
-       
+
 }
 
 /// Open with dialog for file on selected side
@@ -558,4 +657,4 @@ void CDirView::DoOpenWithEditor(SIDE_TYPE stype)
        if (file.IsEmpty()) return;
 
        mf->OpenFileToExternalEditor(file);
-}
\ No newline at end of file
+}
index 4b78da1..035363f 100644 (file)
@@ -101,6 +101,10 @@ BEGIN_MESSAGE_MAP(CDirView, CListViewEx)
        ON_UPDATE_COMMAND_UI(ID_DIR_OPEN_RIGHT_WITHEDITOR, OnUpdateCtxtDirOpenRightWithEditor)
        ON_COMMAND(ID_DIR_OPEN_LEFT_WITHEDITOR, OnCtxtDirOpenLeftWithEditor)
        ON_UPDATE_COMMAND_UI(ID_DIR_OPEN_LEFT_WITHEDITOR, OnUpdateCtxtDirOpenLeftWithEditor)
+       ON_COMMAND(ID_DIR_COPY_LEFT_TO_BROWSE, OnCtxtDirCopyLeftTo)
+       ON_COMMAND(ID_DIR_COPY_RIGHT_TO_BROWSE, OnCtxtDirCopyRightTo)
+       ON_UPDATE_COMMAND_UI(ID_DIR_COPY_LEFT_TO_BROWSE, OnUpdateCtxtDirCopyLeftTo)
+       ON_UPDATE_COMMAND_UI(ID_DIR_COPY_RIGHT_TO_BROWSE, OnUpdateCtxtDirCopyRightTo)
        ON_WM_DESTROY()
        ON_WM_CHAR()
        ON_COMMAND(ID_FIRSTDIFF, OnFirstdiff)
@@ -472,6 +476,18 @@ void CDirView::OnCtxtDirCopyLeftToRight()
        DoCopyLeftToRight();
 }
 
+/// User chose (context menu) Copy left to...
+void CDirView::OnCtxtDirCopyLeftTo()
+{
+       DoCopyLeftTo();
+}
+
+/// User chose (context menu) Copy from right to...
+void CDirView::OnCtxtDirCopyRightTo()
+{
+       DoCopyRightTo();
+}
+
 /// Update context menu Copy Right to Left item
 void CDirView::OnUpdateCtxtDirCopyRightToLeft(CCmdUI* pCmdUI) 
 {
@@ -806,6 +822,70 @@ void CDirView::DoUpdateCtxtDirDelBoth(CCmdUI* pCmdUI)
 }
 
 /**
+ * @brief Enable/disable "Copy | Left to..." and update item text
+ */
+void CDirView::DoUpdateCtxtDirCopyLeftTo(CCmdUI* pCmdUI) 
+{
+       int sel=-1;
+       int count=0, total=0;
+       while ((sel = m_pList->GetNextItem(sel, LVNI_SELECTED)) != -1)
+       {
+               const DIFFITEM& di = GetDiffItem(sel);
+               if (IsItemCopyableToOnLeft(di))
+                       ++count;
+               ++total;
+       }
+       pCmdUI->Enable(count>0);
+
+       CString s;
+       if (count == total)
+               AfxFormatString1(s, IDS_COPY_LEFT_TO, NumToStr(total));
+       else
+               AfxFormatString2(s, IDS_COPY_LEFT_TO2, NumToStr(count), NumToStr(total));
+       pCmdUI->SetText(s);
+}
+
+/**
+ * @brief Enable/disable "Copy | Right to..." and update item text
+ */
+void CDirView::DoUpdateCtxtDirCopyRightTo(CCmdUI* pCmdUI) 
+{
+       int sel=-1;
+       int count=0, total=0;
+       while ((sel = m_pList->GetNextItem(sel, LVNI_SELECTED)) != -1)
+       {
+               const DIFFITEM& di = GetDiffItem(sel);
+               if (IsItemCopyableToOnRight(di))
+                       ++count;
+               ++total;
+       }
+       pCmdUI->Enable(count>0);
+
+       CString s;
+       if (count == total)
+               AfxFormatString1(s, IDS_COPY_RIGHT_TO, NumToStr(total));
+       else
+               AfxFormatString2(s, IDS_COPY_RIGHT_TO2, NumToStr(count), NumToStr(total));
+       pCmdUI->SetText(s);
+}
+
+/**
+ * @brief Update "Copy | Right to..." item
+ */
+void CDirView::OnUpdateCtxtDirCopyLeftTo(CCmdUI* pCmdUI)
+{
+       DoUpdateCtxtDirCopyLeftTo(pCmdUI);
+}
+
+/**
+ * @brief Update "Copy | Right to..." item
+ */
+void CDirView::OnUpdateCtxtDirCopyRightTo(CCmdUI* pCmdUI)
+{
+       DoUpdateCtxtDirCopyRightTo(pCmdUI);
+}
+
+/**
  * @brief Get keydata associated with item in given index
  * @param idx Item's index to list in UI
  */
@@ -861,24 +941,24 @@ int CDirView::GetItemIndex(DWORD key)
        return m_pList->FindItem(&findInfo);
 }
 
-// User chose (context menu) open left
+/// User chose (context menu) open left
 void CDirView::OnCtxtDirOpenLeft()
 {
        DoOpen(SIDE_LEFT);
 }
-// User chose (context menu) open right
+/// User chose (context menu) open right
 void CDirView::OnCtxtDirOpenRight()
 {
        DoOpen(SIDE_RIGHT);
 }
 
-// User chose (context menu) open left with
+/// User chose (context menu) open left with
 void CDirView::OnCtxtDirOpenLeftWith()
 {
        DoOpenWith(SIDE_LEFT);
 }
 
-// User chose (context menu) open right with
+/// User chose (context menu) open right with
 void CDirView::OnCtxtDirOpenRightWith()
 {
        DoOpenWith(SIDE_RIGHT);
@@ -890,6 +970,7 @@ void CDirView::OnCtxtDirOpenRightWithEditor()
        DoOpenWithEditor(SIDE_RIGHT);
 }
 
+/// Update context menuitem "Open right | with editor"
 void CDirView::OnUpdateCtxtDirOpenRightWithEditor(CCmdUI* pCmdUI)
 {
        DoUpdateOpenRightWith(pCmdUI);
index 5e42af1..819ad19 100644 (file)
@@ -137,11 +137,15 @@ private:
        BOOL IsItemOpenableOnRight(const DIFFITEM & di);
        BOOL IsItemOpenableOnLeftWith(const DIFFITEM & di);
        BOOL IsItemOpenableOnRightWith(const DIFFITEM & di);
+       BOOL IsItemCopyableToOnLeft(const DIFFITEM & di);
+       BOOL IsItemCopyableToOnRight(const DIFFITEM & di);
        void DoCopyLeftToRight();
        void DoCopyRightToLeft();
        void DoDelLeft();
        void DoDelRight();
        void DoDelBoth();
+       void DoCopyLeftTo();
+       void DoCopyRightTo();
        void DoOpen(SIDE_TYPE stype);
        void DoOpenWith(SIDE_TYPE stype);
        void DoOpenWithEditor(SIDE_TYPE stype);
@@ -247,6 +251,10 @@ protected:
        afx_msg void OnUpdateCtxtDirOpenRightWithEditor(CCmdUI* pCmdUI);
        afx_msg void OnCtxtDirOpenLeftWithEditor();
        afx_msg void OnUpdateCtxtDirOpenLeftWithEditor(CCmdUI* pCmdUI);
+       afx_msg void OnCtxtDirCopyLeftTo();
+       afx_msg void OnUpdateCtxtDirCopyLeftTo(CCmdUI* pCmdUI);
+       afx_msg void OnCtxtDirCopyRightTo();
+       afx_msg void OnUpdateCtxtDirCopyRightTo(CCmdUI* pCmdUI);
        afx_msg void OnDestroy();
        afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
        afx_msg void OnFirstdiff();
@@ -295,6 +303,8 @@ private:
        void DoUpdateOpenRight(CCmdUI* pCmdUI);
        void DoUpdateOpenLeftWith(CCmdUI* pCmdUI);
        void DoUpdateOpenRightWith(CCmdUI* pCmdUI);
+       void DoUpdateCtxtDirCopyLeftTo(CCmdUI* pCmdUI);
+       void DoUpdateCtxtDirCopyRightTo(CCmdUI* pCmdUI);
        POSITION GetItemKeyFromData(DWORD dw) const;
        DIFFITEM GetDiffItem(int sel);
        int GetSingleSelectedItem() const;
index d42217d..c1a7161 100644 (file)
@@ -1290,6 +1290,15 @@ END
 
 STRINGTABLE DISCARDABLE
 BEGIN
+    IDS_COPY_LEFT_TO        "Left to... (%1)"
+    IDS_COPY_LEFT_TO2       "Left to... (%1 of %2)"
+    IDS_COPY_RIGHT_TO       "Right to... (%1)"
+    IDS_COPY_RIGHT_TO2      "Right to... (%1 of %2)"
+    IDS_SELECT_DESTFOLDER   "Select destination folder"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
     IDC_STATIC_TITLE_LEFT   "Right click on the path to copy"
     IDC_STATIC_TITLE_RIGHT  "Right click on the path to copy"
 END
index 32667ca..ec350dd 100644 (file)
 #define IDS_COPY_TO_RIGHT2              254
 #define IDS_DIRSEL_TAG                  255
 #define IDB_FOLDER                      256
+#define IDS_COPY_LEFT_TO                257
+#define IDS_COPY_LEFT_TO2               258
+#define IDS_COPY_RIGHT_TO               259
+#define IDS_COPY_RIGHT_TO2              260
+#define IDS_SELECT_DESTFOLDER           261
 #define IDC_LEFT_EDIT                   1000
 #define IDC_FILE_EDIT                   1000
 #define IDC_LEFT_BUTTON                 1001
 #define ID_WINDOW_CHANGE_PANE           32858
 
 // Next default values for new objects
-// 
+//
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS                     1
index 0b63600..77d517e 100644 (file)
@@ -1300,6 +1300,15 @@ END
 
 STRINGTABLE DISCARDABLE
 BEGIN
+    IDS_COPY_LEFT_TO        "Left to... (%1)"
+    IDS_COPY_LEFT_TO2       "Left to... (%1 of %2)"
+    IDS_COPY_RIGHT_TO       "Right to... (%1)"
+    IDS_COPY_RIGHT_TO2      "Right to... (%1 of %2)"
+    IDS_SELECT_DESTFOLDER   "Select destination folder"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
     IDC_STATIC_TITLE_LEFT   "Clica amb el botó principal al camí a copiar"
     IDC_STATIC_TITLE_RIGHT  "Clica amb el botó principal al camí a copiar"
 END
index 32667ca..ec350dd 100644 (file)
 #define IDS_COPY_TO_RIGHT2              254
 #define IDS_DIRSEL_TAG                  255
 #define IDB_FOLDER                      256
+#define IDS_COPY_LEFT_TO                257
+#define IDS_COPY_LEFT_TO2               258
+#define IDS_COPY_RIGHT_TO               259
+#define IDS_COPY_RIGHT_TO2              260
+#define IDS_SELECT_DESTFOLDER           261
 #define IDC_LEFT_EDIT                   1000
 #define IDC_FILE_EDIT                   1000
 #define IDC_LEFT_BUTTON                 1001
 #define ID_WINDOW_CHANGE_PANE           32858
 
 // Next default values for new objects
-// 
+//
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS                     1
index 1df34b3..43175df 100644 (file)
@@ -1151,6 +1151,15 @@ END
 
 STRINGTABLE DISCARDABLE
 BEGIN
+    IDS_COPY_LEFT_TO        "Left to... (%1)"
+    IDS_COPY_LEFT_TO2       "Left to... (%1 of %2)"
+    IDS_COPY_RIGHT_TO       "Right to... (%1)"
+    IDS_COPY_RIGHT_TO2      "Right to... (%1 of %2)"
+    IDS_SELECT_DESTFOLDER   "Select destination folder"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
     IDC_STATIC_TITLE_LEFT   "Right click on the path to copy"
     IDC_STATIC_TITLE_RIGHT  "Right click on the path to copy"
 END
index 32667ca..ec350dd 100644 (file)
 #define IDS_COPY_TO_RIGHT2              254
 #define IDS_DIRSEL_TAG                  255
 #define IDB_FOLDER                      256
+#define IDS_COPY_LEFT_TO                257
+#define IDS_COPY_LEFT_TO2               258
+#define IDS_COPY_RIGHT_TO               259
+#define IDS_COPY_RIGHT_TO2              260
+#define IDS_SELECT_DESTFOLDER           261
 #define IDC_LEFT_EDIT                   1000
 #define IDC_FILE_EDIT                   1000
 #define IDC_LEFT_BUTTON                 1001
 #define ID_WINDOW_CHANGE_PANE           32858
 
 // Next default values for new objects
-// 
+//
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS                     1
index bf4e01c..4c66207 100644 (file)
@@ -1266,6 +1266,15 @@ END
 
 STRINGTABLE DISCARDABLE
 BEGIN
+    IDS_COPY_LEFT_TO        "Left to... (%1)"
+    IDS_COPY_LEFT_TO2       "Left to... (%1 of %2)"
+    IDS_COPY_RIGHT_TO       "Right to... (%1)"
+    IDS_COPY_RIGHT_TO2      "Right to... (%1 of %2)"
+    IDS_SELECT_DESTFOLDER   "Select destination folder"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
     IDC_STATIC_TITLE_LEFT   "Right click on the path to copy"
     IDC_STATIC_TITLE_RIGHT  "Right click on the path to copy"
 END
index 32667ca..ec350dd 100644 (file)
 #define IDS_COPY_TO_RIGHT2              254
 #define IDS_DIRSEL_TAG                  255
 #define IDB_FOLDER                      256
+#define IDS_COPY_LEFT_TO                257
+#define IDS_COPY_LEFT_TO2               258
+#define IDS_COPY_RIGHT_TO               259
+#define IDS_COPY_RIGHT_TO2              260
+#define IDS_SELECT_DESTFOLDER           261
 #define IDC_LEFT_EDIT                   1000
 #define IDC_FILE_EDIT                   1000
 #define IDC_LEFT_BUTTON                 1001
 #define ID_WINDOW_CHANGE_PANE           32858
 
 // Next default values for new objects
-// 
+//
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS                     1
index be97afb..a6322a7 100644 (file)
@@ -1288,6 +1288,15 @@ END
 
 STRINGTABLE DISCARDABLE
 BEGIN
+    IDS_COPY_LEFT_TO        "Left to... (%1)"
+    IDS_COPY_LEFT_TO2       "Left to... (%1 of %2)"
+    IDS_COPY_RIGHT_TO       "Right to... (%1)"
+    IDS_COPY_RIGHT_TO2      "Right to... (%1 of %2)"
+    IDS_SELECT_DESTFOLDER   "Select destination folder"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
     IDC_STATIC_TITLE_LEFT   "Right click on the path to copy"
     IDC_STATIC_TITLE_RIGHT  "Right click on the path to copy"
 END
index 32667ca..ec350dd 100644 (file)
 #define IDS_COPY_TO_RIGHT2              254
 #define IDS_DIRSEL_TAG                  255
 #define IDB_FOLDER                      256
+#define IDS_COPY_LEFT_TO                257
+#define IDS_COPY_LEFT_TO2               258
+#define IDS_COPY_RIGHT_TO               259
+#define IDS_COPY_RIGHT_TO2              260
+#define IDS_SELECT_DESTFOLDER           261
 #define IDC_LEFT_EDIT                   1000
 #define IDC_FILE_EDIT                   1000
 #define IDC_LEFT_BUTTON                 1001
 #define ID_WINDOW_CHANGE_PANE           32858
 
 // Next default values for new objects
-// 
+//
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS                     1
index 29e2e5b..61df54f 100644 (file)
@@ -1287,6 +1287,15 @@ END
 
 STRINGTABLE DISCARDABLE
 BEGIN
+    IDS_COPY_LEFT_TO        "Left to... (%1)"
+    IDS_COPY_LEFT_TO2       "Left to... (%1 of %2)"
+    IDS_COPY_RIGHT_TO       "Right to... (%1)"
+    IDS_COPY_RIGHT_TO2      "Right to... (%1 of %2)"
+    IDS_SELECT_DESTFOLDER   "Select destination folder"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
     IDC_STATIC_TITLE_LEFT   "Right click on the path to copy"
     IDC_STATIC_TITLE_RIGHT  "Right click on the path to copy"
 END
index 32667ca..ec350dd 100644 (file)
 #define IDS_COPY_TO_RIGHT2              254
 #define IDS_DIRSEL_TAG                  255
 #define IDB_FOLDER                      256
+#define IDS_COPY_LEFT_TO                257
+#define IDS_COPY_LEFT_TO2               258
+#define IDS_COPY_RIGHT_TO               259
+#define IDS_COPY_RIGHT_TO2              260
+#define IDS_SELECT_DESTFOLDER           261
 #define IDC_LEFT_EDIT                   1000
 #define IDC_FILE_EDIT                   1000
 #define IDC_LEFT_BUTTON                 1001
 #define ID_WINDOW_CHANGE_PANE           32858
 
 // Next default values for new objects
-// 
+//
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS                     1
index 7f01ec7..d7d80af 100644 (file)
@@ -1291,6 +1291,15 @@ END
 
 STRINGTABLE DISCARDABLE
 BEGIN
+    IDS_COPY_LEFT_TO        "Left to... (%1)"
+    IDS_COPY_LEFT_TO2       "Left to... (%1 of %2)"
+    IDS_COPY_RIGHT_TO       "Right to... (%1)"
+    IDS_COPY_RIGHT_TO2      "Right to... (%1 of %2)"
+    IDS_SELECT_DESTFOLDER   "Select destination folder"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
     IDC_STATIC_TITLE_LEFT   "Right click on the path to copy"
     IDC_STATIC_TITLE_RIGHT  "Right click on the path to copy"
 END
index 32667ca..ec350dd 100644 (file)
 #define IDS_COPY_TO_RIGHT2              254
 #define IDS_DIRSEL_TAG                  255
 #define IDB_FOLDER                      256
+#define IDS_COPY_LEFT_TO                257
+#define IDS_COPY_LEFT_TO2               258
+#define IDS_COPY_RIGHT_TO               259
+#define IDS_COPY_RIGHT_TO2              260
+#define IDS_SELECT_DESTFOLDER           261
 #define IDC_LEFT_EDIT                   1000
 #define IDC_FILE_EDIT                   1000
 #define IDC_LEFT_BUTTON                 1001
 #define ID_WINDOW_CHANGE_PANE           32858
 
 // Next default values for new objects
-// 
+//
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS                     1
index 6303d73..03ce222 100644 (file)
@@ -1290,6 +1290,15 @@ END
 
 STRINGTABLE DISCARDABLE
 BEGIN
+    IDS_COPY_LEFT_TO        "Left to... (%1)"
+    IDS_COPY_LEFT_TO2       "Left to... (%1 of %2)"
+    IDS_COPY_RIGHT_TO       "Right to... (%1)"
+    IDS_COPY_RIGHT_TO2      "Right to... (%1 of %2)"
+    IDS_SELECT_DESTFOLDER   "Select destination folder"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
     IDC_STATIC_TITLE_LEFT   "Click droit pour copier le chemin"
     IDC_STATIC_TITLE_RIGHT  "Click droit pour copier le chemin"
 END
index 32667ca..ec350dd 100644 (file)
 #define IDS_COPY_TO_RIGHT2              254
 #define IDS_DIRSEL_TAG                  255
 #define IDB_FOLDER                      256
+#define IDS_COPY_LEFT_TO                257
+#define IDS_COPY_LEFT_TO2               258
+#define IDS_COPY_RIGHT_TO               259
+#define IDS_COPY_RIGHT_TO2              260
+#define IDS_SELECT_DESTFOLDER           261
 #define IDC_LEFT_EDIT                   1000
 #define IDC_FILE_EDIT                   1000
 #define IDC_LEFT_BUTTON                 1001
 #define ID_WINDOW_CHANGE_PANE           32858
 
 // Next default values for new objects
-// 
+//
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS                     1
index 19503c8..83ad35f 100644 (file)
@@ -1297,6 +1297,15 @@ END
 
 STRINGTABLE DISCARDABLE
 BEGIN
+    IDS_COPY_LEFT_TO        "Left to... (%1)"
+    IDS_COPY_LEFT_TO2       "Left to... (%1 of %2)"
+    IDS_COPY_RIGHT_TO       "Right to... (%1)"
+    IDS_COPY_RIGHT_TO2      "Right to... (%1 of %2)"
+    IDS_SELECT_DESTFOLDER   "Select destination folder"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
     IDC_STATIC_TITLE_LEFT   "Rechtsklick auf den Pfad zum Kopieren."
     IDC_STATIC_TITLE_RIGHT  "Rechtsklick auf den Pfad zum Kopieren."
 END
index 32667ca..ec350dd 100644 (file)
 #define IDS_COPY_TO_RIGHT2              254
 #define IDS_DIRSEL_TAG                  255
 #define IDB_FOLDER                      256
+#define IDS_COPY_LEFT_TO                257
+#define IDS_COPY_LEFT_TO2               258
+#define IDS_COPY_RIGHT_TO               259
+#define IDS_COPY_RIGHT_TO2              260
+#define IDS_SELECT_DESTFOLDER           261
 #define IDC_LEFT_EDIT                   1000
 #define IDC_FILE_EDIT                   1000
 #define IDC_LEFT_BUTTON                 1001
 #define ID_WINDOW_CHANGE_PANE           32858
 
 // Next default values for new objects
-// 
+//
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS                     1
index 16e012a..468793a 100644 (file)
@@ -1286,6 +1286,15 @@ END
 
 STRINGTABLE DISCARDABLE
 BEGIN
+    IDS_COPY_LEFT_TO        "Left to... (%1)"
+    IDS_COPY_LEFT_TO2       "Left to... (%1 of %2)"
+    IDS_COPY_RIGHT_TO       "Right to... (%1)"
+    IDS_COPY_RIGHT_TO2      "Right to... (%1 of %2)"
+    IDS_SELECT_DESTFOLDER   "Select destination folder"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
     IDC_STATIC_TITLE_LEFT   "Right click on the path to copy"
     IDC_STATIC_TITLE_RIGHT  "Right click on the path to copy"
 END
index 32667ca..ec350dd 100644 (file)
 #define IDS_COPY_TO_RIGHT2              254
 #define IDS_DIRSEL_TAG                  255
 #define IDB_FOLDER                      256
+#define IDS_COPY_LEFT_TO                257
+#define IDS_COPY_LEFT_TO2               258
+#define IDS_COPY_RIGHT_TO               259
+#define IDS_COPY_RIGHT_TO2              260
+#define IDS_SELECT_DESTFOLDER           261
 #define IDC_LEFT_EDIT                   1000
 #define IDC_FILE_EDIT                   1000
 #define IDC_LEFT_BUTTON                 1001
 #define ID_WINDOW_CHANGE_PANE           32858
 
 // Next default values for new objects
-// 
+//
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS                     1
index df57a97..ed71f91 100644 (file)
@@ -1254,6 +1254,15 @@ END
 
 STRINGTABLE DISCARDABLE
 BEGIN
+    IDS_COPY_LEFT_TO        "Left to... (%1)"
+    IDS_COPY_LEFT_TO2       "Left to... (%1 of %2)"
+    IDS_COPY_RIGHT_TO       "Right to... (%1)"
+    IDS_COPY_RIGHT_TO2      "Right to... (%1 of %2)"
+    IDS_SELECT_DESTFOLDER   "Select destination folder"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
     IDC_STATIC_TITLE_LEFT   "Right click on the path to copy"
     IDC_STATIC_TITLE_RIGHT  "Right click on the path to copy"
 END
index 32667ca..ec350dd 100644 (file)
 #define IDS_COPY_TO_RIGHT2              254
 #define IDS_DIRSEL_TAG                  255
 #define IDB_FOLDER                      256
+#define IDS_COPY_LEFT_TO                257
+#define IDS_COPY_LEFT_TO2               258
+#define IDS_COPY_RIGHT_TO               259
+#define IDS_COPY_RIGHT_TO2              260
+#define IDS_SELECT_DESTFOLDER           261
 #define IDC_LEFT_EDIT                   1000
 #define IDC_FILE_EDIT                   1000
 #define IDC_LEFT_BUTTON                 1001
 #define ID_WINDOW_CHANGE_PANE           32858
 
 // Next default values for new objects
-// 
+//
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS                     1
index ed49ea0..291be7a 100644 (file)
@@ -1287,6 +1287,15 @@ END
 
 STRINGTABLE DISCARDABLE
 BEGIN
+    IDS_COPY_LEFT_TO        "Left to... (%1)"
+    IDS_COPY_LEFT_TO2       "Left to... (%1 of %2)"
+    IDS_COPY_RIGHT_TO       "Right to... (%1)"
+    IDS_COPY_RIGHT_TO2      "Right to... (%1 of %2)"
+    IDS_SELECT_DESTFOLDER   "Select destination folder"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
     IDC_STATIC_TITLE_LEFT   "Right click on the path to copy"
     IDC_STATIC_TITLE_RIGHT  "Right click on the path to copy"
 END
index 32667ca..ec350dd 100644 (file)
 #define IDS_COPY_TO_RIGHT2              254
 #define IDS_DIRSEL_TAG                  255
 #define IDB_FOLDER                      256
+#define IDS_COPY_LEFT_TO                257
+#define IDS_COPY_LEFT_TO2               258
+#define IDS_COPY_RIGHT_TO               259
+#define IDS_COPY_RIGHT_TO2              260
+#define IDS_SELECT_DESTFOLDER           261
 #define IDC_LEFT_EDIT                   1000
 #define IDC_FILE_EDIT                   1000
 #define IDC_LEFT_BUTTON                 1001
 #define ID_WINDOW_CHANGE_PANE           32858
 
 // Next default values for new objects
-// 
+//
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS                     1
index 03a5145..24d4814 100644 (file)
@@ -1284,6 +1284,15 @@ END
 
 STRINGTABLE DISCARDABLE
 BEGIN
+    IDS_COPY_LEFT_TO        "Left to... (%1)"
+    IDS_COPY_LEFT_TO2       "Left to... (%1 of %2)"
+    IDS_COPY_RIGHT_TO       "Right to... (%1)"
+    IDS_COPY_RIGHT_TO2      "Right to... (%1 of %2)"
+    IDS_SELECT_DESTFOLDER   "Select destination folder"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
     IDC_STATIC_TITLE_LEFT   "Right click on the path to copy"
     IDC_STATIC_TITLE_RIGHT  "Right click on the path to copy"
 END
index 32667ca..ec350dd 100644 (file)
 #define IDS_COPY_TO_RIGHT2              254
 #define IDS_DIRSEL_TAG                  255
 #define IDB_FOLDER                      256
+#define IDS_COPY_LEFT_TO                257
+#define IDS_COPY_LEFT_TO2               258
+#define IDS_COPY_RIGHT_TO               259
+#define IDS_COPY_RIGHT_TO2              260
+#define IDS_SELECT_DESTFOLDER           261
 #define IDC_LEFT_EDIT                   1000
 #define IDC_FILE_EDIT                   1000
 #define IDC_LEFT_BUTTON                 1001
 #define ID_WINDOW_CHANGE_PANE           32858
 
 // Next default values for new objects
-// 
+//
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS                     1
index d535fb5..0af90e4 100644 (file)
@@ -1281,7 +1281,16 @@ BEGIN
     IDS_DIRSEL_TAG          "Directory Selection"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
+BEGIN
+    IDS_COPY_LEFT_TO        "Left to... (%1)"
+    IDS_COPY_LEFT_TO2       "Left to... (%1 of %2)"
+    IDS_COPY_RIGHT_TO       "Right to... (%1)"
+    IDS_COPY_RIGHT_TO2      "Right to... (%1 of %2)"
+    IDS_SELECT_DESTFOLDER   "Select destination folder"
+END
+
+STRINGTABLE DISCARDABLE
 BEGIN
     IDC_STATIC_TITLE_LEFT   "Right click on the path to copy"
     IDC_STATIC_TITLE_RIGHT  "Right click on the path to copy"
index 32667ca..ec350dd 100644 (file)
 #define IDS_COPY_TO_RIGHT2              254
 #define IDS_DIRSEL_TAG                  255
 #define IDB_FOLDER                      256
+#define IDS_COPY_LEFT_TO                257
+#define IDS_COPY_LEFT_TO2               258
+#define IDS_COPY_RIGHT_TO               259
+#define IDS_COPY_RIGHT_TO2              260
+#define IDS_SELECT_DESTFOLDER           261
 #define IDC_LEFT_EDIT                   1000
 #define IDC_FILE_EDIT                   1000
 #define IDC_LEFT_BUTTON                 1001
 #define ID_WINDOW_CHANGE_PANE           32858
 
 // Next default values for new objects
-// 
+//
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS                     1
index 26a3d9b..2278cbc 100644 (file)
@@ -1289,6 +1289,15 @@ END
 
 STRINGTABLE DISCARDABLE
 BEGIN
+    IDS_COPY_LEFT_TO        "Left to... (%1)"
+    IDS_COPY_LEFT_TO2       "Left to... (%1 of %2)"
+    IDS_COPY_RIGHT_TO       "Right to... (%1)"
+    IDS_COPY_RIGHT_TO2      "Right to... (%1 of %2)"
+    IDS_SELECT_DESTFOLDER   "Select destination folder"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
     IDC_STATIC_TITLE_LEFT   "Right click on the path to copy"
     IDC_STATIC_TITLE_RIGHT  "Right click on the path to copy"
 END
index 32667ca..ec350dd 100644 (file)
 #define IDS_COPY_TO_RIGHT2              254
 #define IDS_DIRSEL_TAG                  255
 #define IDB_FOLDER                      256
+#define IDS_COPY_LEFT_TO                257
+#define IDS_COPY_LEFT_TO2               258
+#define IDS_COPY_RIGHT_TO               259
+#define IDS_COPY_RIGHT_TO2              260
+#define IDS_SELECT_DESTFOLDER           261
 #define IDC_LEFT_EDIT                   1000
 #define IDC_FILE_EDIT                   1000
 #define IDC_LEFT_BUTTON                 1001
 #define ID_WINDOW_CHANGE_PANE           32858
 
 // Next default values for new objects
-// 
+//
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS                     1
index 9ee1421..4cbc9fd 100644 (file)
@@ -1288,6 +1288,15 @@ END
 
 STRINGTABLE DISCARDABLE
 BEGIN
+    IDS_COPY_LEFT_TO        "Left to... (%1)"
+    IDS_COPY_LEFT_TO2       "Left to... (%1 of %2)"
+    IDS_COPY_RIGHT_TO       "Right to... (%1)"
+    IDS_COPY_RIGHT_TO2      "Right to... (%1 of %2)"
+    IDS_SELECT_DESTFOLDER   "Select destination folder"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
     IDC_STATIC_TITLE_LEFT   "Right click on the path to copy"
     IDC_STATIC_TITLE_RIGHT  "Right click on the path to copy"
 END
index 32667ca..ec350dd 100644 (file)
 #define IDS_COPY_TO_RIGHT2              254
 #define IDS_DIRSEL_TAG                  255
 #define IDB_FOLDER                      256
+#define IDS_COPY_LEFT_TO                257
+#define IDS_COPY_LEFT_TO2               258
+#define IDS_COPY_RIGHT_TO               259
+#define IDS_COPY_RIGHT_TO2              260
+#define IDS_SELECT_DESTFOLDER           261
 #define IDC_LEFT_EDIT                   1000
 #define IDC_FILE_EDIT                   1000
 #define IDC_LEFT_BUTTON                 1001
 #define ID_WINDOW_CHANGE_PANE           32858
 
 // Next default values for new objects
-// 
+//
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS                     1
index bcbd1b7..cf0ee5c 100644 (file)
@@ -1282,7 +1282,16 @@ BEGIN
     IDS_DIRSEL_TAG          "Directory Selection"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
+BEGIN
+    IDS_COPY_LEFT_TO        "Left to... (%1)"
+    IDS_COPY_LEFT_TO2       "Left to... (%1 of %2)"
+    IDS_COPY_RIGHT_TO       "Right to... (%1)"
+    IDS_COPY_RIGHT_TO2      "Right to... (%1 of %2)"
+    IDS_SELECT_DESTFOLDER   "Select destination folder"
+END
+
+STRINGTABLE DISCARDABLE
 BEGIN
     IDC_STATIC_TITLE_LEFT   "Högerklicka pÃ¥ sökvägen för att kopiera"
     IDC_STATIC_TITLE_RIGHT  "Högerklicka pÃ¥ sökvägen för att kopiera"
index 32667ca..ec350dd 100644 (file)
 #define IDS_COPY_TO_RIGHT2              254
 #define IDS_DIRSEL_TAG                  255
 #define IDB_FOLDER                      256
+#define IDS_COPY_LEFT_TO                257
+#define IDS_COPY_LEFT_TO2               258
+#define IDS_COPY_RIGHT_TO               259
+#define IDS_COPY_RIGHT_TO2              260
+#define IDS_SELECT_DESTFOLDER           261
 #define IDC_LEFT_EDIT                   1000
 #define IDC_FILE_EDIT                   1000
 #define IDC_LEFT_BUTTON                 1001
 #define ID_WINDOW_CHANGE_PANE           32858
 
 // Next default values for new objects
-// 
+//
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS                     1
index 29e8b1d..2af7c87 100644 (file)
@@ -450,6 +450,11 @@ BOOL CAboutDlg::OnInitDialog()
 
 /** 
  * @brief Helper function for selecting dir/file
+ * @param [out] path Selected path is returned in this string
+ * @param [in] root_path Initial path (and file) shown when dialog is opened
+ * @param [in] title Title for path selection dialog
+ * @param [in] filterid 0 or STRING ID for filter string - 0 means "All files (*.*)"
+ * @param [in] is_open Selects Open/Save -dialog
  */
 BOOL SelectFile(CString& path, LPCTSTR root_path /*=NULL*/, 
                         LPCTSTR title /*= _T("Open")*/, 
@@ -471,9 +476,9 @@ BOOL SelectFile(CString& path, LPCTSTR root_path /*=NULL*/,
        
        CString filters;
        if (filterid != 0)
-               VERIFY(filters.LoadString(filterid)); 
+               VERIFY(filters.LoadString(filterid));
        else
-               VERIFY(filters.LoadString(IDS_ALLFILES)); 
+               VERIFY(filters.LoadString(IDS_ALLFILES));
        DWORD flags = OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST;
        CFileDialog dlg(is_open, NULL, sfile, flags, filters);
        dlg.m_ofn.lpstrTitle = (LPCTSTR)title;
@@ -481,13 +486,53 @@ BOOL SelectFile(CString& path, LPCTSTR root_path /*=NULL*/,
 
        if (dlg.DoModal()==IDOK)
        {
-               path = dlg.GetPathName(); 
+               path = dlg.GetPathName();
                return TRUE;
        }
        path = _T("");
        return FALSE;      
 }
 
+/** 
+ * @brief Helper function for selecting directory
+ * @param [out]path Selected path is returned in this string
+ * @param [in] root_path Initial path shown when dialog is opened
+ * @param [in] title Title for path selection dialog
+ * @param [in] filterid 0 or STRING ID for filter string - 0 means "All files (*.*)"
+ * @param [in] is_open Selects Open/Save -dialog
+ * @todo Use SHFolder* API?
+ */
+BOOL SelectFolder(CString& path, LPCTSTR root_path /*=NULL*/, 
+                        LPCTSTR title /*=NULL*/, 
+                        UINT filterid /*=0*/,
+                        BOOL is_open /*=TRUE*/) 
+{
+       CString filters;
+       CString dirSelTag;
+       VERIFY(dirSelTag.LoadString(IDS_DIRSEL_TAG));
+       if (filterid != 0)
+               VERIFY(filters.LoadString(filterid));
+       else
+               VERIFY(filters.LoadString(IDS_ALLFILES));
+       
+       DWORD flags = OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST;
+       CFileDialog dlg(is_open, NULL, dirSelTag, flags, filters);
+       dlg.m_ofn.lpstrTitle = (LPCTSTR)title;
+       dlg.m_ofn.lpstrInitialDir = (LPTSTR)root_path;
+
+       if (dlg.DoModal()==IDOK)
+       {
+               CString fullPath;
+               CString tmpPath;
+               fullPath = dlg.GetPathName();
+               SplitFilename(fullPath, &tmpPath, NULL, NULL);
+               path = tmpPath;
+               return TRUE;
+       }
+       path = _T("");
+       return FALSE;
+}
+
 BOOL CMergeApp::PreTranslateMessage(MSG* pMsg)
 {
        // Check if we got 'ESC pressed' -message
index 3bc8f3c..5adcce6 100644 (file)
@@ -415,6 +415,10 @@ SOURCE=.\Common\coretools.cpp
 # End Source File
 # Begin Source File
 
+SOURCE=.\common\CShellFileOp.cpp
+# End Source File
+# Begin Source File
+
 SOURCE=.\Common\CSubclass.cpp
 # End Source File
 # Begin Source File
@@ -1462,6 +1466,10 @@ SOURCE=.\Common\coretools.h
 # End Source File
 # Begin Source File
 
+SOURCE=.\common\CShellFileOp.h
+# End Source File
+# Begin Source File
+
 SOURCE=.\Common\CSubclass.h
 # End Source File
 # Begin Source File
index 49787c3..f97a59b 100644 (file)
@@ -144,6 +144,11 @@ BOOL SelectFile(CString& path, LPCTSTR root_path = NULL,
                         UINT filterid =0,
                         BOOL is_open =TRUE);
 
+BOOL SelectFolder(CString& path, LPCTSTR root_path = NULL, 
+                        LPCTSTR title = NULL, 
+                        UINT filterid = 0,
+                        BOOL is_open = TRUE);
+
 //{{AFX_INSERT_LOCATION}}
 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
 
index 48badc1..3858c50 100644 (file)
@@ -29,18 +29,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 // TEXTINCLUDE
 //
 
-1 TEXTINCLUDE DISCARDABLE 
+1 TEXTINCLUDE DISCARDABLE
 BEGIN
     "resource.h\0"
 END
 
-2 TEXTINCLUDE DISCARDABLE 
+2 TEXTINCLUDE DISCARDABLE
 BEGIN
     "#include ""afxres.h""\r\n"
     "\0"
 END
 
-3 TEXTINCLUDE DISCARDABLE 
+3 TEXTINCLUDE DISCARDABLE
 BEGIN
     "#define _AFX_NO_OLE_RESOURCES\r\n"
     "#define _AFX_NO_TRACKER_RESOURCES\r\n"
@@ -75,16 +75,16 @@ IDR_MERGETYPE           ICON    DISCARDABLE     "res\\MergeDoc.ico"
 // Menu
 //
 
-IDR_POPUP_DIFFVIEW MENU DISCARDABLE 
+IDR_POPUP_DIFFVIEW MENU DISCARDABLE
 BEGIN
     POPUP "_POPUP_"
     BEGIN
         MENUITEM "Copy to other side",          ID_POPUP_COPYTOOTHERSIDE
         MENUITEM "Copy from other side",        ID_POPUP_COPYFROMOTHERSIDE
         MENUITEM SEPARATOR
-        MENUITEM "Copy all diffs to other side...", 
+        MENUITEM "Copy all diffs to other side...",
                                                 ID_POPUP_COPYALLDIFFSTOOTHERSIDE
-        MENUITEM "Copy all diffs from other side...", 
+        MENUITEM "Copy all diffs from other side...",
                                                 ID_POPUP_COPYALLDIFFSFROMOTHERSIDE
         MENUITEM SEPARATOR
         MENUITEM "Undo",                        ID_UNDO
@@ -93,7 +93,7 @@ BEGIN
     END
 END
 
-IDR_MAINFRAME MENU PRELOAD DISCARDABLE 
+IDR_MAINFRAME MENU PRELOAD DISCARDABLE
 BEGIN
     POPUP "&File"
     BEGIN
@@ -217,7 +217,7 @@ BEGIN
     END
 END
 
-IDR_POPUP_DIRVIEW MENU DISCARDABLE 
+IDR_POPUP_DIRVIEW MENU DISCARDABLE
 BEGIN
     POPUP "_ITEM_POPUP_"
     BEGIN
@@ -254,7 +254,7 @@ BEGIN
     END
 END
 
-IDR_POPUP_EDITOR_HEADERBAR MENU DISCARDABLE 
+IDR_POPUP_EDITOR_HEADERBAR MENU DISCARDABLE
 BEGIN
     POPUP "_POPUP_"
     BEGIN
@@ -269,7 +269,7 @@ END
 // Accelerator
 //
 
-IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE 
+IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE
 BEGIN
     "A",            ID_EDIT_SELECT_ALL,     VIRTKEY, CONTROL, NOINVERT
     "C",            ID_EDIT_COPY,           VIRTKEY, CONTROL, NOINVERT
@@ -340,22 +340,22 @@ CAPTION "Select Files or Directories..."
 FONT 8, "MS Sans Serif", 0, 0, 0x1
 BEGIN
     RTEXT           "&Left:",IDC_STATIC,13,24,40,8
-    COMBOBOX        IDC_LEFT_COMBO,56,22,182,94,CBS_DROPDOWN | 
+    COMBOBOX        IDC_LEFT_COMBO,56,22,182,94,CBS_DROPDOWN |
                     CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP,
                     WS_EX_ACCEPTFILES
     PUSHBUTTON      "&Browse...",IDC_LEFT_BUTTON,241,22,38,12
     RTEXT           "&Right:",IDC_STATIC,13,40,40,8
-    COMBOBOX        IDC_RIGHT_COMBO,56,38,182,95,CBS_DROPDOWN | 
+    COMBOBOX        IDC_RIGHT_COMBO,56,38,182,95,CBS_DROPDOWN |
                     CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP,
                     WS_EX_ACCEPTFILES
     PUSHBUTTON      "Bro&wse...",IDC_RIGHT_BUTTON,241,38,38,12
     RTEXT           "E&xtensions:",IDC_STATIC,13,56,40,8
-    COMBOBOX        IDC_EXT_COMBO,56,54,151,95,CBS_DROPDOWN | 
+    COMBOBOX        IDC_EXT_COMBO,56,54,151,95,CBS_DROPDOWN |
                     CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
-    CONTROL         "Re&cursive",IDC_RECURS_CHECK,"Button",BS_AUTOCHECKBOX | 
+    CONTROL         "Re&cursive",IDC_RECURS_CHECK,"Button",BS_AUTOCHECKBOX |
                     WS_TABSTOP,35,72,48,10
     RTEXT           "&Unpacker:",IDC_STATIC,13,88,40,8
-    EDITTEXT        IDC_UNPACKER_EDIT,56,86,182,12,ES_AUTOHSCROLL | 
+    EDITTEXT        IDC_UNPACKER_EDIT,56,86,182,12,ES_AUTOHSCROLL |
                     ES_READONLY
     PUSHBUTTON      "Select...",IDC_SELECT_UNPACKER,241,86,38,12
     DEFPUSHBUTTON   "OK",IDOK,295,11,50,14
@@ -375,14 +375,14 @@ BEGIN
     PUSHBUTTON      "Cancel",IDCANCEL,193,132,50,14
     PUSHBUTTON      "Save As...",IDSAVEAS,123,132,50,14
     LTEXT           "Project:",IDC_STATIC,9,81,25,8
-    COMBOBOX        IDC_PROJECT_COMBO,48,78,202,114,CBS_DROPDOWN | 
+    COMBOBOX        IDC_PROJECT_COMBO,48,78,202,114,CBS_DROPDOWN |
                     CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
     LTEXT           "User:",IDC_STATIC,10,99,18,8
     EDITTEXT        IDC_USER,48,96,58,14,ES_AUTOHSCROLL
     LTEXT           "Password:",IDC_STATIC,127,99,34,8
     EDITTEXT        IDC_PASSWORD,162,97,70,14,ES_PASSWORD | ES_AUTOHSCROLL
     LTEXT           "Database:",IDC_STATIC,9,64,33,13
-    COMBOBOX        IDC_DATABASE_LIST,48,63,202,114,CBS_DROPDOWN | 
+    COMBOBOX        IDC_DATABASE_LIST,48,63,202,114,CBS_DROPDOWN |
                     CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
     CONTROL         "Apply to all items",IDC_MULTI_CHECKOUT,"Button",
                     BS_AUTOCHECKBOX | WS_TABSTOP,49,117,65,8
@@ -399,7 +399,7 @@ BEGIN
     LTEXT           "&Path to cleartool.exe:",IDC_VSS_L1,16,42,68,8
     EDITTEXT        IDC_PATH_EDIT,85,40,116,12,ES_AUTOHSCROLL
     PUSHBUTTON      "&Browse...",IDC_BROWSE_BUTTON,206,40,42,12
-    COMBOBOX        IDC_VER_SYS,85,20,157,41,CBS_DROPDOWNLIST | WS_VSCROLL | 
+    COMBOBOX        IDC_VER_SYS,85,20,157,41,CBS_DROPDOWNLIST | WS_VSCROLL |
                     WS_TABSTOP
     LTEXT           "&Versioning System:",IDC_STATIC,16,22,60,10
 END
@@ -450,7 +450,7 @@ FONT 8, "MS Sans Serif"
 BEGIN
     PUSHBUTTON      "OK",IDOK,154,16,52,14
     PUSHBUTTON      "Cancel",IDCANCEL,154,33,52,14
-    LISTBOX         IDC_LANGUAGE_LIST,5,16,141,89,LBS_NOINTEGRALHEIGHT | 
+    LISTBOX         IDC_LANGUAGE_LIST,5,16,141,89,LBS_NOINTEGRALHEIGHT |
                     WS_VSCROLL | WS_TABSTOP
     LTEXT           "Available languages:",IDC_STATIC,7,7,66,8
 END
@@ -460,7 +460,7 @@ STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "Find"
 FONT 8, "MS Shell Dlg"
 BEGIN
-    COMBOBOX        IDC_EDIT_FINDTEXT,41,6,135,138,CBS_DROPDOWN | 
+    COMBOBOX        IDC_EDIT_FINDTEXT,41,6,135,138,CBS_DROPDOWN |
                     CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
     CONTROL         "Match &whole word only",IDC_EDIT_WHOLE_WORD,"Button",
                     BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,4,26,100,12
@@ -468,7 +468,7 @@ BEGIN
                     BS_AUTOCHECKBOX | WS_TABSTOP,4,40,64,12
     CONTROL         "Regular &expression",IDC_EDIT_REGEXP,"Button",
                     BS_AUTOCHECKBOX | WS_TABSTOP,4,54,77,12
-    CONTROL         "&Up",IDC_EDIT_DIRECTION_UP,"Button",BS_AUTORADIOBUTTON | 
+    CONTROL         "&Up",IDC_EDIT_DIRECTION_UP,"Button",BS_AUTORADIOBUTTON |
                     WS_GROUP,111,36,25,12
     CONTROL         "&Down",IDC_EDIT_DIRECTION_DOWN,"Button",
                     BS_AUTORADIOBUTTON,111,48,35,12
@@ -483,9 +483,9 @@ STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "Replace"
 FONT 8, "MS Shell Dlg"
 BEGIN
-    COMBOBOX        IDC_EDIT_FINDTEXT,52,7,116,30,CBS_DROPDOWN | 
+    COMBOBOX        IDC_EDIT_FINDTEXT,52,7,116,30,CBS_DROPDOWN |
                     CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
-    COMBOBOX        IDC_EDIT_REPLACE_WITH,52,24,116,30,CBS_DROPDOWN | 
+    COMBOBOX        IDC_EDIT_REPLACE_WITH,52,24,116,30,CBS_DROPDOWN |
                     CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
     CONTROL         "Match &whole word only",IDC_EDIT_WHOLE_WORD,"Button",
                     BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,5,46,91,12
@@ -516,7 +516,7 @@ BEGIN
     DEFPUSHBUTTON   "CheckOut",IDOK,35,90,50,14
     PUSHBUTTON      "Cancel",IDCANCEL,194,90,50,14
     PUSHBUTTON      "Save As...",IDSAVEAS,114,90,50,14
-    EDITTEXT        IDC_COMMENTS,18,21,243,56,ES_MULTILINE | ES_AUTOVSCROLL | 
+    EDITTEXT        IDC_COMMENTS,18,21,243,56,ES_MULTILINE | ES_AUTOVSCROLL |
                     ES_AUTOHSCROLL | ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL
     LTEXT           "Comments",IDC_STATIC,18,7,34,10
 END
@@ -540,10 +540,10 @@ BEGIN
                     7,221,15
     LTEXT           "Regular Expressions (one per line):",IDC_STATIC,7,28,
                     221,8
-    EDITTEXT        IDC_EDITPATTERN,7,39,221,72,ES_MULTILINE | 
+    EDITTEXT        IDC_EDITPATTERN,7,39,221,72,ES_MULTILINE |
                     ES_AUTOHSCROLL | ES_WANTRETURN
     LTEXT           "File filter:",IDC_STATIC,7,128,60,10
-    COMBOBOX        IDC_FILE_FILTER,73,126,117,63,CBS_DROPDOWNLIST | 
+    COMBOBOX        IDC_FILE_FILTER,73,126,117,63,CBS_DROPDOWNLIST |
                     WS_VSCROLL | WS_TABSTOP
     PUSHBUTTON      "Edit",IDC_EDIT_FILE_FILTER,194,126,34,13,WS_DISABLED
 END
@@ -554,34 +554,34 @@ CAPTION "Colors"
 FONT 8, "MS Sans Serif", 0, 0, 0x1
 BEGIN
     RTEXT           "Difference:",IDC_STATIC,13,29,66,8
-    CONTROL         "Dif",IDC_DIFFERENCE_COLOR,"Button",BS_OWNERDRAW | 
-                    WS_TABSTOP,98,29,17,14,WS_EX_TRANSPARENT | 
+    CONTROL         "Dif",IDC_DIFFERENCE_COLOR,"Button",BS_OWNERDRAW |
+                    WS_TABSTOP,98,29,17,14,WS_EX_TRANSPARENT |
                     WS_EX_CLIENTEDGE
     RTEXT           "Selected Difference:",IDC_STATIC,13,49,66,8
-    CONTROL         "Dif",IDC_SEL_DIFFERENCE_COLOR,"Button",BS_OWNERDRAW | 
-                    WS_TABSTOP,98,49,17,14,WS_EX_TRANSPARENT | 
+    CONTROL         "Dif",IDC_SEL_DIFFERENCE_COLOR,"Button",BS_OWNERDRAW |
+                    WS_TABSTOP,98,49,17,14,WS_EX_TRANSPARENT |
                     WS_EX_CLIENTEDGE
     CTEXT           "Background",IDC_STATIC,81,15,50,8
     CTEXT           "Deleted",IDC_STATIC,130,15,38,8
-    CONTROL         "Dif",IDC_DIFFERENCE_DELETED_COLOR,"Button",BS_OWNERDRAW | 
-                    WS_TABSTOP,141,29,17,14,WS_EX_TRANSPARENT | 
+    CONTROL         "Dif",IDC_DIFFERENCE_DELETED_COLOR,"Button",BS_OWNERDRAW |
+                    WS_TABSTOP,141,29,17,14,WS_EX_TRANSPARENT |
                     WS_EX_CLIENTEDGE
     CONTROL         "Dif",IDC_SEL_DIFFERENCE_DELETED_COLOR,"Button",
-                    BS_OWNERDRAW | WS_TABSTOP,141,49,17,14,WS_EX_TRANSPARENT | 
+                    BS_OWNERDRAW | WS_TABSTOP,141,49,17,14,WS_EX_TRANSPARENT |
                     WS_EX_CLIENTEDGE
-    CONTROL         "Dif",IDC_DIFFERENCE_TEXT_COLOR,"Button",BS_OWNERDRAW | 
-                    WS_TABSTOP,184,29,17,14,WS_EX_TRANSPARENT | 
+    CONTROL         "Dif",IDC_DIFFERENCE_TEXT_COLOR,"Button",BS_OWNERDRAW |
+                    WS_TABSTOP,184,29,17,14,WS_EX_TRANSPARENT |
                     WS_EX_CLIENTEDGE
     CONTROL         "Dif",IDC_SEL_DIFFERENCE_TEXT_COLOR,"Button",
-                    BS_OWNERDRAW | WS_TABSTOP,184,49,17,14,WS_EX_TRANSPARENT | 
+                    BS_OWNERDRAW | WS_TABSTOP,184,49,17,14,WS_EX_TRANSPARENT |
                     WS_EX_CLIENTEDGE
     CTEXT           "Text",IDC_STATIC,178,15,29,8
-    CONTROL         "Dif",IDC_TRIVIAL_DIFF_COLOR,"Button",BS_OWNERDRAW | 
-                    WS_TABSTOP,98,69,17,14,WS_EX_TRANSPARENT | 
+    CONTROL         "Dif",IDC_TRIVIAL_DIFF_COLOR,"Button",BS_OWNERDRAW |
+                    WS_TABSTOP,98,69,17,14,WS_EX_TRANSPARENT |
                     WS_EX_CLIENTEDGE
     RTEXT           "Ignored Difference:",IDC_STATIC,13,69,66,8
     CONTROL         "Dif",IDC_TRIVIAL_DIFF_DELETED_COLOR,"Button",
-                    BS_OWNERDRAW | WS_TABSTOP,141,69,17,14,WS_EX_TRANSPARENT | 
+                    BS_OWNERDRAW | WS_TABSTOP,141,69,17,14,WS_EX_TRANSPARENT |
                     WS_EX_CLIENTEDGE
 END
 
@@ -591,7 +591,7 @@ CAPTION "Dialog"
 FONT 8, "MS Sans Serif"
 BEGIN
     DEFPUSHBUTTON   "OK",IDOK,106,136,50,14
-    EDITTEXT        IDC_EDIT1,7,7,264,123,ES_MULTILINE | ES_READONLY | 
+    EDITTEXT        IDC_EDIT1,7,7,264,123,ES_MULTILINE | ES_READONLY |
                     WS_VSCROLL
 END
 
@@ -616,26 +616,26 @@ CAPTION "Patch Generator"
 FONT 8, "MS Sans Serif"
 BEGIN
     LTEXT           "File&1:",IDC_STATIC,7,10,36,8
-    COMBOBOX        IDC_DIFF_FILE1,48,7,230,93,CBS_DROPDOWN | 
+    COMBOBOX        IDC_DIFF_FILE1,48,7,230,93,CBS_DROPDOWN |
                     CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
     PUSHBUTTON      "&Browse...",IDC_DIFF_BROWSE_FILE1,283,7,50,14
     LTEXT           "File&2:",IDC_STATIC,7,27,36,8
-    COMBOBOX        IDC_DIFF_FILE2,48,24,230,96,CBS_DROPDOWN | 
+    COMBOBOX        IDC_DIFF_FILE2,48,24,230,96,CBS_DROPDOWN |
                     CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
     PUSHBUTTON      "Br&owse...",IDC_DIFF_BROWSE_FILE2,283,24,50,14
     PUSHBUTTON      "&Swap",IDC_DIFF_SWAPFILES,283,41,50,14
     CONTROL         "&Append to existing file",IDC_DIFF_APPENDFILE,"Button",
                     BS_AUTOCHECKBOX | WS_TABSTOP,48,51,230,10
     LTEXT           "&Result:",IDC_STATIC,7,66,37,8
-    COMBOBOX        IDC_DIFF_FILERESULT,48,63,230,96,CBS_DROPDOWN | 
+    COMBOBOX        IDC_DIFF_FILERESULT,48,63,230,96,CBS_DROPDOWN |
                     CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
     PUSHBUTTON      "Bro&wse...",IDC_DIFF_BROWSE_RESULT,283,63,50,14
     GROUPBOX        "&Format",IDC_STATIC,7,81,142,46
     LTEXT           "St&yle:",IDC_STATIC,13,95,46,8
-    COMBOBOX        IDC_DIFF_STYLE,63,92,80,68,CBS_DROPDOWNLIST | WS_VSCROLL | 
+    COMBOBOX        IDC_DIFF_STYLE,63,92,80,68,CBS_DROPDOWNLIST | WS_VSCROLL |
                     WS_TABSTOP
     LTEXT           "&Context:",IDC_STATIC,13,109,46,8
-    COMBOBOX        IDC_DIFF_CONTEXT,63,108,80,65,CBS_DROPDOWNLIST | 
+    COMBOBOX        IDC_DIFF_CONTEXT,63,108,80,65,CBS_DROPDOWNLIST |
                     WS_DISABLED | WS_VSCROLL | WS_TABSTOP
     GROUPBOX        "W&hitespaces",IDC_STATIC,155,81,123,46
     CONTROL         "Com&pare",IDC_DIFF_WHITESPACE_COMPARE,"Button",
@@ -660,11 +660,11 @@ IDD_EDITOR_HEADERBAR DIALOGEX 0, 0, 373, 12
 STYLE WS_CHILD
 FONT 8, "MS Sans Serif", 0, 0, 0x1
 BEGIN
-    EDITTEXT        IDC_STATIC_TITLE_LEFT,0,2,160,12,ES_AUTOHSCROLL | 
-                    ES_OEMCONVERT | ES_READONLY | NOT WS_BORDER | NOT 
+    EDITTEXT        IDC_STATIC_TITLE_LEFT,0,2,160,12,ES_AUTOHSCROLL |
+                    ES_OEMCONVERT | ES_READONLY | NOT WS_BORDER | NOT
                     WS_TABSTOP,WS_EX_STATICEDGE
-    EDITTEXT        IDC_STATIC_TITLE_RIGHT,163,2,160,12,ES_AUTOHSCROLL | 
-                    ES_OEMCONVERT | ES_READONLY | NOT WS_BORDER | NOT 
+    EDITTEXT        IDC_STATIC_TITLE_RIGHT,163,2,160,12,ES_AUTOHSCROLL |
+                    ES_OEMCONVERT | ES_READONLY | NOT WS_BORDER | NOT
                     WS_TABSTOP,WS_EX_STATICEDGE
 END
 
@@ -676,12 +676,12 @@ BEGIN
     DEFPUSHBUTTON   "OK",IDOK,89,122,50,14
     PUSHBUTTON      "Cancel",IDCANCEL,143,122,50,14
     GROUPBOX        "Show columns",IDC_GROUP_SHOW,7,7,129,109
-    LISTBOX         IDC_LIST_SHOW,48,19,80,90,LBS_NOINTEGRALHEIGHT | 
+    LISTBOX         IDC_LIST_SHOW,48,19,80,90,LBS_NOINTEGRALHEIGHT |
                     LBS_EXTENDEDSEL | WS_VSCROLL | WS_TABSTOP
     PUSHBUTTON      "&Up",IDC_UP,14,45,27,14
     PUSHBUTTON      "&Down",IDC_DOWN,14,63,27,14
     GROUPBOX        "Hide columns",IDC_GROUP_HIDE,180,7,96,109
-    LISTBOX         IDC_LIST_HIDE,188,19,80,90,LBS_NOINTEGRALHEIGHT | 
+    LISTBOX         IDC_LIST_HIDE,188,19,80,90,LBS_NOINTEGRALHEIGHT |
                     LBS_EXTENDEDSEL | WS_VSCROLL | WS_TABSTOP
     PUSHBUTTON      "<==",IDC_ADD,143,45,29,14
     PUSHBUTTON      "==>",IDC_REMOVE,143,63,29,14
@@ -695,16 +695,16 @@ BEGIN
     DEFPUSHBUTTON   "OK",IDOK,87,99,50,14
     PUSHBUTTON      "Cancel",IDCANCEL,156,99,50,14
     LTEXT           "File unpacker:",IDC_STATIC,7,18,50,10
-    COMBOBOX        IDC_UNPACKER_NAME,98,16,188,63,CBS_DROPDOWNLIST | 
+    COMBOBOX        IDC_UNPACKER_NAME,98,16,188,63,CBS_DROPDOWNLIST |
                     WS_VSCROLL | WS_TABSTOP
     CONTROL         "Display all unpackers, don't check the extension",
-                    IDC_UNPACKER_ALLOW_ALL,"Button",BS_AUTOCHECKBOX | 
+                    IDC_UNPACKER_ALLOW_ALL,"Button",BS_AUTOCHECKBOX |
                     BS_LEFTTEXT | WS_TABSTOP,7,74,202,13
     LTEXT           "Extensions list:",IDC_STATIC,7,36,49,10
     LTEXT           "Description:",IDC_STATIC,7,52,47,10
     EDITTEXT        IDC_UNPACKER_SUPPORTED_EXTENSIONS,97,34,176,12,
                     ES_AUTOHSCROLL | ES_READONLY
-    EDITTEXT        IDC_UNPACKER_DESCRIPTION,58,50,228,12,ES_AUTOHSCROLL | 
+    EDITTEXT        IDC_UNPACKER_DESCRIPTION,58,50,228,12,ES_AUTOHSCROLL |
                     ES_READONLY
 END
 
@@ -735,22 +735,22 @@ BEGIN
     CONTROL         227,IDC_STATIC,"Static",SS_BITMAP,216,23,12,11,
                     WS_EX_STATICEDGE
     RTEXT           "",IDC_COUNT_LFOLDER,24,9,26,8,SS_REALSIZEIMAGE | 0x2000
-    RTEXT           "",IDC_COUNT_RFOLDER,24,25,26,8,SS_REALSIZEIMAGE | 
+    RTEXT           "",IDC_COUNT_RFOLDER,24,25,26,8,SS_REALSIZEIMAGE |
                     0x2000
     RTEXT           "",IDC_COUNT_EQUAL,76,9,26,8,SS_REALSIZEIMAGE | 0x2000
-    RTEXT           "",IDC_COUNT_NOTEQUAL,76,25,26,8,SS_REALSIZEIMAGE | 
+    RTEXT           "",IDC_COUNT_NOTEQUAL,76,25,26,8,SS_REALSIZEIMAGE |
                     0x2000
-    RTEXT           "",IDC_COUNT_BINARYSAME,128,9,26,8,SS_REALSIZEIMAGE | 
+    RTEXT           "",IDC_COUNT_BINARYSAME,128,9,26,8,SS_REALSIZEIMAGE |
                     0x2000
-    RTEXT           "",IDC_COUNT_BINARYDIFF,128,25,26,8,SS_REALSIZEIMAGE | 
+    RTEXT           "",IDC_COUNT_BINARYDIFF,128,25,26,8,SS_REALSIZEIMAGE |
                     0x2000
     RTEXT           "",IDC_COUNT_LFILE,180,9,26,8,SS_REALSIZEIMAGE | 0x2000
     RTEXT           "",IDC_COUNT_RFILE,180,25,26,8,SS_REALSIZEIMAGE | 0x2000
-    RTEXT           "",IDC_COUNT_FOLDERSKIP,232,9,26,8,SS_REALSIZEIMAGE | 
+    RTEXT           "",IDC_COUNT_FOLDERSKIP,232,9,26,8,SS_REALSIZEIMAGE |
                     0x2000
-    RTEXT           "",IDC_COUNT_FILESKIP,232,24,26,8,SS_REALSIZEIMAGE | 
+    RTEXT           "",IDC_COUNT_FILESKIP,232,24,26,8,SS_REALSIZEIMAGE |
                     0x2000
-    RTEXT           "",IDC_COUNT_UNKNOWN,284,9,26,8,SS_REALSIZEIMAGE | 
+    RTEXT           "",IDC_COUNT_UNKNOWN,284,9,26,8,SS_REALSIZEIMAGE |
                     0x2000
     PUSHBUTTON      "Stop",IDC_COMPARISON_STOP,320,13,83,14
 END
@@ -808,7 +808,7 @@ END
 //
 
 #ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE 
+GUIDELINES DESIGNINFO DISCARDABLE
 BEGIN
     IDD_ABOUTBOX, DIALOG
     BEGIN
@@ -980,16 +980,16 @@ IDB_FOLDER              BITMAP  DISCARDABLE     "res\\folder.bmp"
 IDD_PROP_VSS DLGINIT
 BEGIN
     IDC_VER_SYS, 0x403, 5, 0
-0x6f4e, 0x656e, "\000" 
+0x6f4e, 0x656e, "\000"
     IDC_VER_SYS, 0x403, 34, 0
-0x6956, 0x7573, 0x6c61, 0x5320, 0x756f, 0x6372, 0x5365, 0x6661, 0x2065, 
-0x6c28, 0x7365, 0x2073, 0x6874, 0x6e61, 0x3520, 0x302e, 0x0029, 
+0x6956, 0x7573, 0x6c61, 0x5320, 0x756f, 0x6372, 0x5365, 0x6661, 0x2065,
+0x6c28, 0x7365, 0x2073, 0x6874, 0x6e61, 0x3520, 0x302e, 0x0029,
     IDC_VER_SYS, 0x403, 34, 0
-0x6956, 0x7573, 0x6c61, 0x5320, 0x756f, 0x6372, 0x5365, 0x6661, 0x2065, 
-0x3528, 0x302e, 0x6120, 0x646e, 0x6120, 0x6f62, 0x6576, 0x0029, 
+0x6956, 0x7573, 0x6c61, 0x5320, 0x756f, 0x6372, 0x5365, 0x6661, 0x2065,
+0x3528, 0x302e, 0x6120, 0x646e, 0x6120, 0x6f62, 0x6576, 0x0029,
     IDC_VER_SYS, 0x403, 19, 0
-0x6152, 0x6974, 0x6e6f, 0x6c61, 0x4320, 0x656c, 0x7261, 0x6143, 0x6573, 
-"\000" 
+0x6152, 0x6974, 0x6e6f, 0x6c61, 0x4320, 0x656c, 0x7261, 0x6143, 0x6573,
+"\000"
     0
 END
 
@@ -1006,13 +1006,13 @@ IDR_MARGIN_CURSOR       CURSOR  DISCARDABLE     "res\\mg_cur.cur"
 // String Table
 //
 
-STRINGTABLE PRELOAD DISCARDABLE 
+STRINGTABLE PRELOAD DISCARDABLE
 BEGIN
     AFX_IDS_APP_TITLE       "WinMerge"
     AFX_IDS_IDLEMESSAGE     "Ready"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     ID_INDICATOR_EXT        "EXT"
     ID_INDICATOR_CAPS       "CAP"
@@ -1022,7 +1022,7 @@ BEGIN
     ID_INDICATOR_REC        "REC"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     ID_FILE_NEW             "Create empty documents\nNew Documents (Ctrl-N)"
     ID_FILE_OPEN            "Open an existing document\nOpen (Ctrl+O)"
@@ -1035,13 +1035,13 @@ BEGIN
     ID_FILE_PRINT_PREVIEW   "Display full pages\nPrint Preview"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     ID_APP_ABOUT            "Display program information, version number and copyright\nAbout"
     ID_APP_EXIT             "Quit the application; prompts to save documents\nExit"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     ID_FILE_MRU_FILE1       "Open this document"
     ID_FILE_MRU_FILE2       "Open this document"
@@ -1061,13 +1061,13 @@ BEGIN
     ID_FILE_MRU_FILE16      "Open this document"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     ID_NEXT_PANE            "Switch to the next window pane\nNext Pane"
     ID_PREV_PANE            "Switch back to the previous window pane\nPrevious Pane"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     ID_WINDOW_NEW           "Open another window for the active document\nNew Window"
     ID_WINDOW_ARRANGE       "Arrange icons at the bottom of the window\nArrange Icons"
@@ -1077,7 +1077,7 @@ BEGIN
     ID_WINDOW_SPLIT         "Split the active window into panes\nSplit"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     ID_EDIT_CLEAR           "Erase the selection\nErase"
     ID_EDIT_CLEAR_ALL       "Erase everything\nErase All"
@@ -1092,13 +1092,13 @@ BEGIN
     ID_EDIT_REDO            "Redo the previously undone action\nRedo"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     ID_VIEW_TOOLBAR         "Show or hide the toolbar\nToggle ToolBar"
     ID_VIEW_STATUS_BAR      "Show or hide the status bar\nToggle StatusBar"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     AFX_IDS_SCSIZE          "Change the window size"
     AFX_IDS_SCMOVE          "Change the window position"
@@ -1109,26 +1109,26 @@ BEGIN
     AFX_IDS_SCCLOSE         "Close the active window and prompts to save the documents"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     AFX_IDS_SCRESTORE       "Restore the window to normal size"
     AFX_IDS_SCTASKLIST      "Activate Task List"
     AFX_IDS_MDICHILD        "Activate this window"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     AFX_IDS_PREVIEW_CLOSE   "Close print preview mode\nCancel Preview"
 END
 
-STRINGTABLE PRELOAD DISCARDABLE 
+STRINGTABLE PRELOAD DISCARDABLE
 BEGIN
     IDR_MAINFRAME           "WinMerge"
     IDR_MERGETYPE           "\nWinMerge\nWinMerge\n\n\nWinMerge.Document\nWinMerge Document"
     IDS_WINMERGE_THIS_DIRECTORY "WinMerge this directory"
 END
 
-STRINGTABLE PRELOAD DISCARDABLE 
+STRINGTABLE PRELOAD DISCARDABLE
 BEGIN
     IDS_VERSION_FMT         "Version %1"
     IDS_ALLFILES            "All Files (*.*)|*.*||"
@@ -1146,12 +1146,12 @@ BEGIN
     IDS_CANT_COMPARE_FILES  "Unable to compare files"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     IDS_SAVE_AS_TITLE       "Save As"
-    IDS_SELECT_FILES_OR_FOLDERS 
+    IDS_SELECT_FILES_OR_FOLDERS
                             "Your selections must be either both files or both folders"
-    IDS_BACKUP_FAILED_PROMPT 
+    IDS_BACKUP_FAILED_PROMPT
                             "Unable to backup original file.\nContinue anyway?"
     IDS_OPTIONS_TITLE       "Options"
     IDS_OPEN_TITLE          "Open"
@@ -1168,7 +1168,7 @@ BEGIN
     IDS_NOPROJECT           "You must specify a SourceSafe project path in order to continue (ie:  $/MyProject)"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     IDS_COLHDR_FILENAME     "Filename"
     IDS_COLHDR_DIR          "Directory"
@@ -1180,17 +1180,17 @@ BEGIN
     IDS_CC_CMD              "&Path to cleartool.exe :"
     IDS_VSS_CMD             "&Path to SS.EXE :"
     IDS_VSS_RUN_ERROR       "Error executing versioning system command."
-    IDS_DIFF_OPEN_NO_SET_PROPS 
+    IDS_DIFF_OPEN_NO_SET_PROPS
                             "Modifications have been made to the current file comparison session.  Some settings may not take place until the current file comparison is restarted."
     IDS_COLHDR_LTIMEM       "Left Date"
     IDS_COLHDR_RTIMEM       "Right Date"
     IDS_COLHDR_EXTENSION    "Extension"
-    IDS_CONFIRM_DELETE_ITEMS 
+    IDS_CONFIRM_DELETE_ITEMS
                             "Are you sure you want to delete %1 of %2 selected item(s) ?"
     IDS_DEL_LEFT_FMT        "Left (%1)"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     IDS_DEL_RIGHT_FMT       "Right (%1)"
     IDS_DELETE_FILE_FAILED  "Delete file %1 failed: %2"
@@ -1210,7 +1210,7 @@ BEGIN
     IDS_BIN_FILES_SAME      "Binary files are identical"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     IDS_FILESAVE_FAILED     "Saving %1 failed. Would you like to save the file under a different name?"
     IDS_ERROR_FILE_NOT_FOUND "File not found: %1"
@@ -1230,7 +1230,7 @@ BEGIN
     IDS_COLHDR_RVERSION     "Right File Version"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     IDS_LEFTONLY            "Left Only"
     IDS_RIGHTONLY           "Right Only"
@@ -1245,7 +1245,7 @@ BEGIN
     IDS_DIRECTORY_REPORT_TITLE "Compare %1 with %2"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     IDS_PRIVATEBUILD_FMT    "Private Build: %1"
     IDS_FILEWRITE_ERROR     "Could not write to file %1."
@@ -1257,14 +1257,14 @@ BEGIN
     IDS_DIFF_NORMAL         "Normal"
     IDS_DIFF_CONTEXT        "Context"
     IDS_DIFF_UNIFIED        "Unified"
-    IDS_FILEPACK_FAILED_LEFT 
+    IDS_FILEPACK_FAILED_LEFT
                             "Plugin '%2' cannot pack your changes to the left file back into '%1'.\n\nThe original file will not be changed.\n\nDo you want to save the unpacked version to another file?"
-    IDS_FILEPACK_FAILED_RIGHT 
+    IDS_FILEPACK_FAILED_RIGHT
                             "Plugin '%2' cannot pack your changes to the right file back into '%1'.\n\nThe original file will not be changed.\n\nDo you want to save the unpacked version to another file?"
     IDS_QUICKHELP           "Syntax : WinMerge [/r] [/e] [/ul] [/ur] [/ub] [/dl leftdesc] [/dr rightdesc] leftpath rightpath [outputpath]\n\nwhere:\n /? or -? displays this help\n /r or -r tells winmerge to compare directories recursively\n /e or -e allows WinMerge to be closed with a single esc keypress\n /ul or -ul tells winmerge to not add left path to MRU\n /ur or -ur tells winmerge to not add right path to MRU\n /ub or -ub tells winmerge to not add both paths to MRU\n /dl or -dl adds a description for left side shown instead of directory/filename\n /dr or -dr adds a description for right side shown instead of directory/filename\n leftpath is the directory or filename to open on the left side\n rightpath is the directory or filename to open on the right side\n outputpath is an optional output directory where you want merged files to be \n saved\n \n Note: leftpath and rightpath both has to be files or both has to be \n directories\n"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     IDS_LINEDIFF_NODIFF     "No difference"
     IDS_LINEDIFF_NODIFF_CAPTION "Line difference"
@@ -1283,36 +1283,45 @@ BEGIN
     IDS_DIRSEL_TAG          "Directory Selection"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
+BEGIN
+    IDS_COPY_LEFT_TO        "Left to... (%1)"
+    IDS_COPY_LEFT_TO2       "Left to... (%1 of %2)"
+    IDS_COPY_RIGHT_TO       "Right to... (%1)"
+    IDS_COPY_RIGHT_TO2      "Right to... (%1 of %2)"
+    IDS_SELECT_DESTFOLDER   "Select destination folder"
+END
+
+STRINGTABLE DISCARDABLE
 BEGIN
     IDC_STATIC_TITLE_LEFT   "Right click on the path to copy"
     IDC_STATIC_TITLE_RIGHT  "Right click on the path to copy"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     IDC_MIXED_EOL           "Preserve original EOL chars"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     IDC_COMPARISON_STOP     "Stop"
     IDC_COMPARISON_CLOSE    "Press any key"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     IDS_NUM_REPLACED        "Replaced %1 string(s)."
     IDS_EDIT_TEXT_NOT_FOUND "Cannot find string""%s"""
     IDS_LINE_STATUS_INFO_EOL "Line: %s Column: %d Characters: %d EOL: %s"
     IDS_EMPTY_LINE_STATUS_INFO "Line: %s"
     IDS_LINE_STATUS_INFO    "Line: %s Column: %d Characters: %d"
-    IDS_VSSFOLDER_AND_FILE_NOMATCH 
+    IDS_VSSFOLDER_AND_FILE_NOMATCH
                             "The VSS Working Folder and the location of the current file do not match. Continue?"
     IDS_CANNOT_EXECUTE_FILE "Cannot execute %1"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     IDS_AFRIKAANS           "Afrikaans"
     IDS_ALBANIAN            "Albanian"
@@ -1329,7 +1338,7 @@ BEGIN
     IDS_ARABIC_JORDAN       "Arabic (Jordan)"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     IDS_ARABIC_LEBANON      "Arabic (Lebanon)"
     IDS_ARABIC_KUWAIT       "Arabic (Kuwait)"
@@ -1349,7 +1358,7 @@ BEGIN
     IDS_CHINESE_SINGAPORE   "Chinese (Singapore)"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     IDS_CHINESE_MACAU       "Chinese (Macau SAR)"
     IDS_CROATIAN            "Croatian"
@@ -1369,7 +1378,7 @@ BEGIN
     IDS_ENGLISH_BELIZE      "English (Belize)"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     IDS_ENGLISH_TRINIDAD    "English (Trinidad)"
     IDS_ENGLISH_ZIMBABWE    "English (Zimbabwe)"
@@ -1389,7 +1398,7 @@ BEGIN
     IDS_GERMAN_SWISS        "Deutsch (Schweiz)"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     IDS_GERMAN_AUSTRIAN     "Deutsch (Österreich)"
     IDS_GERMAN_LUXEMBOURG   "Deutsch (Luxemburg)"
@@ -1409,7 +1418,7 @@ BEGIN
     IDS_KOREAN_JOHAB        "Korean (Johab)"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     IDS_LATVIAN             "Latvian"
     IDS_LITHUANIAN          "Lithuanian"
@@ -1429,7 +1438,7 @@ BEGIN
     IDS_SINDHI              "Sindhi"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     IDS_SLOVAK              "Slovak"
     IDS_SLOVENIAN           "Slovensko"
@@ -1449,7 +1458,7 @@ BEGIN
     IDS_SPANISH_URUGUAY     "Espanol (Uruguay)"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     IDS_SPANISH_PARAGUAY    "Espanol (Paraguay)"
     IDS_SPANISH_BOLIVIA     "Espanol (Bolivia)"
@@ -1469,14 +1478,14 @@ BEGIN
     IDS_URDU_INDIA          "Urdu (India)"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     IDS_UZBEK_LATIN         "Uzbek (Latin)"
     IDS_UZBEK_CYRILLIC      "Uzbek (Cyrillic)"
     IDS_VIETNAMESE          "Vietnamese"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     ID_L2R                  "Copy the selected text to the right file\nCopy Right (Alt Right)"
     ID_R2L                  "Copy the selected text to the left file\nCopy Left (Alt Left)"
@@ -1484,13 +1493,13 @@ BEGIN
     ID_OPTIONS_SHOWDIFFERENT "Displays files that have differences"
     ID_PREVDIFF             "Scroll to the previous difference\nPrev Diff (Alt Up)"
     ID_NEXTDIFF             "Scroll to the next difference\nNext Diff (Alt Down)"
-    ID_OPTIONS_BACKUPORIGINALFILE 
+    ID_OPTIONS_BACKUPORIGINALFILE
                             "Save a copy of the original as *.bak\nBackup"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
-    ID_OPTIONS_SCROLLTOFIRSTDIFFERENCE 
+    ID_OPTIONS_SCROLLTOFIRSTDIFFERENCE
                             "Automatically scrolls to the first difference\nScroll First"
     ID_OPTIONS_IGNOREWHITESPACE "Disregards whitespace when comparing files"
     ID_HIDE_BACKUP_FILES    "Hides files with extension BAK"
@@ -1504,7 +1513,7 @@ BEGIN
     ID_DIR_COPY_RIGHT_TO_LEFT "Copy selected file to named directory"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     ID_DIR_COPY_LEFT_TO_RIGHT "Copy selected file to named directory"
     ID_VIEW_LANGUAGE        "Select the current user interfacce language\nLanguage"
@@ -1517,7 +1526,7 @@ BEGIN
     ID_DIR_DEL_RIGHT        "Delete selected item on right"
     ID_DIFFSTATUS           "placeholder for status count"
     ID_OPTIONS_SHOWUNIQUELEFT "Displays files that exist in only on left side"
-    ID_OPTIONS_SHOWUNIQUERIGHT 
+    ID_OPTIONS_SHOWUNIQUERIGHT
                             "Displays files that exist in only on right side"
     ID_DIR_DEL_BOTH         "Delete selected item(s) on both sides"
     ID_DIR_OPEN_LEFT        "Open left file"
@@ -1525,7 +1534,7 @@ BEGIN
     ID_DIR_OPEN_RIGHT       "Open right file"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     ID_DIR_OPEN_RIGHT_WITH  "Open right file with..."
     ID_OPTIONS_SHOWBINARIES "Displays binary files"
@@ -1539,7 +1548,7 @@ BEGIN
     ID_FILE_RIGHT_READONLY  "Change right file/dir read-only status"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     ID_EOL_TO_DOS           "Convert EOL to DOS mode"
     ID_EOL_TO_UNIX          "Convert EOL to UNIX mode"
@@ -1554,7 +1563,7 @@ BEGIN
     ID_L2RNEXT              "Copy difference to right and advance to next\nCopy Right and advance (Ctrl Alt Right)"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     ID_MULTIPLE_RIGHT       "Copy differences from the selected text in left panel to the right file"
     ID_MULTIPLE_LEFT        "Copy differences from the selected text in right panel to the left file"
index 80f0a04..1289b00 100644 (file)
@@ -1,3 +1,10 @@
+2004-01-17 Kimmo
+ PATCH: [ 871789 ] Add "Copy to..." items to dirview context menu
+  src/Common: new files CShellOp.h CShellOp.cpp
+  src: DirActions.cpp DirView.h DirView.cpp Merge.cpp Merge.dsp
+   Merge.h Merge.rc resource.h
+  src/Languages: *.rc resource.h
+
 2004-01-16 Perry
  Fix bug in UniFile::WriteString counting of written bytes.
   Src/Common/UniFile.cpp
index 32667ca..ec350dd 100644 (file)
 #define IDS_COPY_TO_RIGHT2              254
 #define IDS_DIRSEL_TAG                  255
 #define IDB_FOLDER                      256
+#define IDS_COPY_LEFT_TO                257
+#define IDS_COPY_LEFT_TO2               258
+#define IDS_COPY_RIGHT_TO               259
+#define IDS_COPY_RIGHT_TO2              260
+#define IDS_SELECT_DESTFOLDER           261
 #define IDC_LEFT_EDIT                   1000
 #define IDC_FILE_EDIT                   1000
 #define IDC_LEFT_BUTTON                 1001
 #define ID_WINDOW_CHANGE_PANE           32858
 
 // Next default values for new objects
-// 
+//
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS                     1