void COpenDlg::UpdateButtonStates()
{
BOOL bLIsDir, bRIsDir;
+ BOOL bLeftOk, bRightOk;
+ BOOL bEnableOK = FALSE;
UpdateData(TRUE);
- // only enable OK button if both file exist
- BOOL bEnableOK = (IsFileOk(m_strLeft, &bLIsDir) && IsFileOk(m_strRight, &bRIsDir));
+ // Only enable OK button if both are exixting files or
+ // both are existing directories
+ bLeftOk = IsFileOk(m_strLeft, &bLIsDir);
+ bRightOk = IsFileOk(m_strRight, &bRIsDir);
+
+ if (bLeftOk && bRightOk)
+ {
+ if ((bLIsDir && bRIsDir) || (!bLIsDir && !bRIsDir))
+ bEnableOK = TRUE;
+ }
m_ctlOk.EnableWindow(bEnableOK);
m_ctlRecurse.EnableWindow(bEnableOK && bLIsDir && bRIsDir);
}
+2003-02-26 Kimmo
+ [ 692922 ] Don't try to compare file & directory
+ WinMerge:
+ OpenDlg.cpp
+
2003-02-24 Kimmo
[ 687574 ] Navigate in directory view (fix bug in patch)
WinMerge:
WinMerge:
MergeDoc.h Mergedoc.cpp
-
2003-02-22 Perry
[ 650356 ] suggest commenting out several functions
[ 684416 ] is_all_whitespace is bad