return true;
}
-/**
- * @brief Determine if item can be opened.
- * Basically we only disable opening unique files at the moment.
- * Unique folders can be opened since we ask for creating matching folder
- * to another side.
- * @param [in] di DIFFITEM for item to check.
- * @return true if the item can be opened, false otherwise.
- */
-bool IsItemOpenable(const CDiffContext& ctxt, const DIFFITEM & di, bool treemode)
-{
- if (treemode && ctxt.m_bRecursive)
- {
- if (di.diffcode.isDirectory() || !IsItemExistAll(ctxt, di))
- return false;
- }
- else
- {
- if (!di.diffcode.isDirectory() && !IsItemExistAll(ctxt, di))
- return false;
- }
- return true;
-}
/// is it possible to compare these two items?
bool AreItemsOpenable(const CDiffContext& ctxt, SELECTIONTYPE selectionType, const DIFFITEM & di1, const DIFFITEM & di2)
{
bool IsItemCopyable(const DIFFITEM & di, int index);
bool IsItemDeletable(const DIFFITEM & di, int index);
bool IsItemDeletableOnBoth(const CDiffContext& ctxt, const DIFFITEM & di);
-bool IsItemOpenable(const CDiffContext& ctxt, const DIFFITEM & di, bool treemode);
bool AreItemsOpenable(const CDiffContext& ctxt, SELECTIONTYPE selectionType, const DIFFITEM & di1, const DIFFITEM & di2);
bool AreItemsOpenable(const CDiffContext& ctxt, const DIFFITEM & di1, const DIFFITEM & di2, const DIFFITEM & di3);
bool IsItemOpenableOn(const DIFFITEM & di, int index);
{
// One item selected
const DIFFITEM& di = GetDiffItem(sel1);
- if (selectionType != SELECTIONTYPE_NORMAL || !::IsItemOpenable(GetDiffContext(), di, m_bTreeMode))
+ if (selectionType != SELECTIONTYPE_NORMAL)
{
pCmdUI->Enable(FALSE);
return;