/**
* @brief Ask user a confirmation for copying item(s).
- * Shows a confirmatino dialog for copy operation. Depending ont item count
+ * Shows a confirmation dialog for copy operation. Depending ont item count
* dialog shows full paths to items (single item) or base paths of compare
* (multiple items).
* @param [in] origin Origin side of the item(s).
* @param [in] count Number of items.
* @param [in] src Source path.
* @param [in] dest Destination path.
+ * @param [in] destIsSide Is destination path either of compare sides?
* @return IDYES if copy should proceed, IDNO if aborted.
*/
static BOOL ConfirmCopy(int origin, int destination, int count,
- LPCTSTR src, LPCTSTR dest)
+ LPCTSTR src, LPCTSTR dest, BOOL destIsSide)
{
ConfirmFolderCopyDlg dlg;
CString strQuestion;
else
sOrig = LoadResString(IDS_FROM_RIGHT);
- if (destination == FileActionItem::UI_LEFT)
- sDest = LoadResString(IDS_TO_LEFT);
+ if (destIsSide)
+ {
+ // Copy to left / right
+ if (destination == FileActionItem::UI_LEFT)
+ sDest = LoadResString(IDS_TO_LEFT);
+ else
+ sDest = LoadResString(IDS_TO_RIGHT);
+ }
else
- sDest = LoadResString(IDS_TO_RIGHT);
+ {
+ // Copy left/right to..
+ sDest = LoadResString(IDS_TO);
+ }
+
dlg.m_question = strQuestion;
dlg.m_fromText = sOrig;
act.dirflag = di.isDirectory();
act.context = sel;
act.atype = actType;
- act.UIResult = FileActionItem::UI_DESYNC;
+ act.UIResult = FileActionItem::UI_DONT_CARE;
actionScript.AddActionItem(act);
++selCount;
}
act.dirflag = di.isDirectory();
act.context = sel;
act.atype = actType;
- act.UIResult = FileActionItem::UI_DESYNC;
+ act.UIResult = FileActionItem::UI_DONT_CARE;
actionScript.AddActionItem(act);
++selCount;
}
// Maybe we should show a list of files with actions done..
FileActionItem item = actionList.GetHeadActionItem();
+ BOOL bDestIsSide = TRUE;
+
// special handling for the single item case, because it is probably the most common,
// and we can give the user exact details easily for it
switch(item.atype)
{
case FileAction::ACT_COPY:
+ if (item.UIResult == FileActionItem::UI_DONT_CARE)
+ bDestIsSide = FALSE;
+
if (actionList.GetActionItemCount() == 1)
{
if (!ConfirmCopy(item.UIOrigin, item.UIDestination,
- actionList.GetActionItemCount(), item.src, item.dest))
+ actionList.GetActionItemCount(), item.src, item.dest,
+ bDestIsSide))
{
return FALSE;
}
else
dst = GetDocument()->GetRightBasePath();
if (!ConfirmCopy(item.UIOrigin, item.UIDestination,
- actionList.GetActionItemCount(), src, dst))
+ actionList.GetActionItemCount(), src, dst, bDestIsSide))
{
return FALSE;
}
#define IDS_OPTIONSPG_CODEPAGE 9049
#define IDS_OPTIONSPG_ARCHIVE 9050
#define IDS_OPTIONSPG_BACKUPS 9051
-#define IDS_FROM_LEFT 16000
-#define IDS_TO_LEFT 16001
-#define IDS_FROM_RIGHT 16002
-#define IDS_TO_RIGHT 16003
+#define IDS_TO 16000
+#define IDS_FROM_LEFT 16001
+#define IDS_TO_LEFT 16002
+#define IDS_FROM_RIGHT 16003
+#define IDS_TO_RIGHT 16004
#define IDS_VERSION_FMT 16385
#define IDS_UNICODE 16387
#define IDS_OPTIONS_TITLE 16400
#define ID_TOOLBAR_BIG 33166
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1