From 2fc99c66998f21de298500af9b5188cc2786ee7b Mon Sep 17 00:00:00 2001 From: Perry Rapp Date: Sun, 15 Jan 2006 18:06:20 +0000 Subject: [PATCH] PATCH: [ 1333600 ] Get rid of global MainFrame pointer (part1) Src: DirActions.cpp DirDoc.cpp DirView.cpp FileActionScript.cpp MainFrm.cpp MainFrm.h Merge.cpp MergeDoc.cpp MergeEditView.cpp OpenDlg.cpp PropRegistry.cpp Src\Common: PreferencesDlg.cpp --- Src/Changes.txt | 7 +++++++ Src/Common/PreferencesDlg.cpp | 3 +-- Src/DirActions.cpp | 10 +++++----- Src/DirDoc.cpp | 4 ++-- Src/DirView.cpp | 19 +++++++++---------- Src/FileActionScript.cpp | 2 +- Src/MainFrm.cpp | 43 +++++++++++++++++++++++++----------------- Src/MainFrm.h | 2 +- Src/Merge.cpp | 6 ++---- Src/MergeDoc.cpp | 44 +++++++++++++++++++++---------------------- Src/MergeEditView.cpp | 4 ++-- Src/OpenDlg.cpp | 2 +- Src/PropRegistry.cpp | 3 +-- 13 files changed, 80 insertions(+), 69 deletions(-) diff --git a/Src/Changes.txt b/Src/Changes.txt index e95ca1bf8..cd1bd412f 100644 --- a/Src/Changes.txt +++ b/Src/Changes.txt @@ -1,3 +1,10 @@ +2006-01-15 Perry + PATCH: [ 1333600 ] Get rid of global MainFrame pointer (part1) + Src: DirActions.cpp DirDoc.cpp DirView.cpp FileActionScript.cpp + MainFrm.cpp MainFrm.h Merge.cpp MergeDoc.cpp MergeEditView.cpp + OpenDlg.cpp PropRegistry.cpp + Src\Common: PreferencesDlg.cpp + 2006-01-14 Perry PATCH: [ 1403457 ] Support Unicode file filter files Src: FileFilterMgr.cpp diff --git a/Src/Common/PreferencesDlg.cpp b/Src/Common/PreferencesDlg.cpp index 50dae6ae1..805087ba4 100644 --- a/Src/Common/PreferencesDlg.cpp +++ b/Src/Common/PreferencesDlg.cpp @@ -120,8 +120,7 @@ void CPreferencesDlg::OnDestroy() void CPreferencesDlg::OnHelpButton() { - CMainFrame *pMf = dynamic_cast(AfxGetMainWnd()); - pMf->ShowHelp(); + GetMainFrame()->ShowHelp(); } void CPreferencesDlg::AddPage(CPropertyPage* pPage, UINT nResourceID) diff --git a/Src/DirActions.cpp b/Src/DirActions.cpp index 39e91cb7f..ba8d78fa6 100644 --- a/Src/DirActions.cpp +++ b/Src/DirActions.cpp @@ -570,8 +570,8 @@ void CDirView::PerformActionList(FileActionScript & actionScript) { // Reset suppressing VSS dialog for multiple files. // Set in CMainFrame::SaveToVersionControl(). - mf->m_CheckOutMulti = FALSE; - mf->m_bVssSuppressPathCheck = FALSE; + GetMainFrame()->m_CheckOutMulti = FALSE; + GetMainFrame()->m_bVssSuppressPathCheck = FALSE; // Check option and enable putting deleted items to Recycle Bin if (GetOptionsMgr()->GetBool(OPT_USE_RECYCLE_BIN)) @@ -604,8 +604,8 @@ void CDirView::UpdateAfterFileScript(FileActionScript & actionList) switch (act.UIResult) { case FileActionItem::UI_SYNC: - if (mf->m_bCheckinVCS) - mf->CheckinToClearCase(act.dest); + if (GetMainFrame()->m_bCheckinVCS) + GetMainFrame()->CheckinToClearCase(act.dest); // Syncronized item is both-sides item pDoc->SetDiffSide(DIFFCODE::BOTH, act.context); @@ -945,7 +945,7 @@ void CDirView::DoOpenWithEditor(SIDE_TYPE stype) CString file = GetSelectedFileName(stype); if (file.IsEmpty()) return; - mf->OpenFileToExternalEditor(file); + GetMainFrame()->OpenFileToExternalEditor(file); } /** diff --git a/Src/DirDoc.cpp b/Src/DirDoc.cpp index 9ba45b796..2095cde47 100644 --- a/Src/DirDoc.cpp +++ b/Src/DirDoc.cpp @@ -354,7 +354,7 @@ BOOL CDirDoc::IsShowable(const DIFFITEM & di) if (!m_bRecursive && di.isDirectory()) { // result filters - if (di.isResultError() && !mf->m_bShowErrors) + if (di.isResultError() && !GetMainFrame()->m_bShowErrors) return 0; // left/right filters @@ -372,7 +372,7 @@ BOOL CDirDoc::IsShowable(const DIFFITEM & di) // result filters if (di.isResultSame() && !GetOptionsMgr()->GetBool(OPT_SHOW_IDENTICAL)) return 0; - if (di.isResultError() && !mf->m_bShowErrors) + if (di.isResultError() && !GetMainFrame()->m_bShowErrors) return 0; if (di.isResultDiff() && !GetOptionsMgr()->GetBool(OPT_SHOW_DIFFERENT)) return 0; diff --git a/Src/DirView.cpp b/Src/DirView.cpp index d4870ac65..f9632e606 100644 --- a/Src/DirView.cpp +++ b/Src/DirView.cpp @@ -200,8 +200,7 @@ void CDirView::OnInitialUpdate() // Load user-selected font if (GetOptionsMgr()->GetBool(OPT_FONT_DIRCMP_USECUSTOM)) { - CMainFrame *pMf = dynamic_cast(AfxGetMainWnd()); - m_font.CreateFontIndirect(&pMf->m_lfDir); + m_font.CreateFontIndirect(&GetMainFrame()->m_lfDir); SetFont(&m_font, TRUE); } @@ -809,7 +808,7 @@ void CDirView::OpenParentDirectory() pDoc->m_pTempPathContext = pDoc->m_pTempPathContext->DeleteHead(); // fall through (no break!) case CDirDoc::AllowUpwardDirectory::ParentIsRegularPath: - mf->DoFileOpen(leftParent, rightParent, + GetMainFrame()->DoFileOpen(leftParent, rightParent, FFILEOPEN_NOMRU, FFILEOPEN_NOMRU, pDoc->GetRecursive(), pDoc); // fall through (no break!) case CDirDoc::AllowUpwardDirectory::No: @@ -990,12 +989,12 @@ void CDirView::OpenSelection(PackingInfo * infoUnpacker /*= NULL*/) { // Open subfolders // Don't add folders to MRU - mf->DoFileOpen(pathLeft, pathRight, FFILEOPEN_NOMRU, FFILEOPEN_NOMRU, pDoc->GetRecursive(), pDoc); + GetMainFrame()->DoFileOpen(pathLeft, pathRight, FFILEOPEN_NOMRU, FFILEOPEN_NOMRU, pDoc->GetRecursive(), pDoc); } else if (HasZipSupport() && ArchiveGuessFormat(pathLeft) && ArchiveGuessFormat(pathRight)) { // Open archives, not adding paths to MRU - mf->DoFileOpen(pathLeft, pathRight, FFILEOPEN_NOMRU, FFILEOPEN_NOMRU, pDoc->GetRecursive(), pDoc); + GetMainFrame()->DoFileOpen(pathLeft, pathRight, FFILEOPEN_NOMRU, FFILEOPEN_NOMRU, pDoc->GetRecursive(), pDoc); } else { @@ -1029,7 +1028,7 @@ void CDirView::OpenSelection(PackingInfo * infoUnpacker /*= NULL*/) filelocRight.unicoding = di2->right.unicoding; filelocRight.codepage = di2->right.codepage; - int rtn = mf->ShowMergeDoc(pDoc, filelocLeft, filelocRight, + int rtn = GetMainFrame()->ShowMergeDoc(pDoc, filelocLeft, filelocRight, bLeftRO, bRightRO, infoUnpacker); if (rtn == OPENRESULTS_FAILED_BINARY) { @@ -2427,7 +2426,7 @@ void CDirView::OnCopyLeftPathnames() strPaths += _T("\r\n"); } } - PutToClipboard(strPaths, mf->GetSafeHwnd()); + PutToClipboard(strPaths, AfxGetMainWnd()->GetSafeHwnd()); } /** @@ -2451,7 +2450,7 @@ void CDirView::OnCopyRightPathnames() strPaths += _T("\r\n"); } } - PutToClipboard(strPaths, mf->GetSafeHwnd()); + PutToClipboard(strPaths, AfxGetMainWnd()->GetSafeHwnd()); } /** @@ -2484,7 +2483,7 @@ void CDirView::OnCopyBothPathnames() strPaths += _T("\r\n"); } } - PutToClipboard(strPaths, mf->GetSafeHwnd()); + PutToClipboard(strPaths, AfxGetMainWnd()->GetSafeHwnd()); } /** @@ -2504,7 +2503,7 @@ void CDirView::OnCopyFilenames() strPaths += _T("\r\n"); } } - PutToClipboard(strPaths, mf->GetSafeHwnd()); + PutToClipboard(strPaths, AfxGetMainWnd()->GetSafeHwnd()); } /** diff --git a/Src/FileActionScript.cpp b/Src/FileActionScript.cpp index 43173fee5..abce5581e 100644 --- a/Src/FileActionScript.cpp +++ b/Src/FileActionScript.cpp @@ -83,7 +83,7 @@ int FileActionScript::VCSCheckOut(const CString &path, BOOL &bApplyToAll) return retVal; // TODO: First param is not used! - int nRetVal = pMf->SyncFileToVCS(_T(""), path, bApplyToAll, &strErr); + int nRetVal = GetMainFrame()->SyncFileToVCS(_T(""), path, bApplyToAll, &strErr); if (nRetVal == -1) { retVal = SCRIPT_FAIL; // So we exit without file operations done diff --git a/Src/MainFrm.cpp b/Src/MainFrm.cpp index b3c3072fa..66d5d59b6 100644 --- a/Src/MainFrm.cpp +++ b/Src/MainFrm.cpp @@ -83,7 +83,6 @@ static char THIS_FILE[] = __FILE__; #endif extern CLogFile gLog; -CMainFrame *mf = NULL; static BOOL add_regexp PARAMS((struct regexp_list **, char const*, BOOL bShowError)); ///////////////////////////////////////////////////////////////////////////// @@ -265,8 +264,6 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1) return -1; - mf = this; - // build the initial reg expression list RebuildRegExpList(FALSE); GetFontProperties(); @@ -589,7 +586,7 @@ CMainFrame::ShowMergeDoc(CDirDoc * pDirDoc, const FileLocation & ifilelocLeft, pMergeDoc->SetUnpacker(infoUnpacker); // detect codepage - BOOL bGuessEncoding = mf->m_options.GetBool(OPT_CP_DETECT); + BOOL bGuessEncoding =GetOptionsMgr()->GetBool(OPT_CP_DETECT); if (filelocLeft.unicoding == -1) filelocLeft.unicoding = ucr::NONE; if (filelocLeft.unicoding == ucr::NONE && filelocLeft.codepage == -1) @@ -2023,27 +2020,27 @@ void CMainFrame::ApplyViewWhitespace() CMergeDiffDetailView * pRightDetail = pMergeDoc->GetRightDetailView(); if (pLeft) { - pLeft->SetViewTabs(mf->m_options.GetBool(OPT_VIEW_WHITESPACE)); - pLeft->SetViewEols(mf->m_options.GetBool(OPT_VIEW_WHITESPACE), - mf->m_options.GetBool(OPT_ALLOW_MIXED_EOL)); + pLeft->SetViewTabs(GetOptionsMgr()->GetBool(OPT_VIEW_WHITESPACE)); + pLeft->SetViewEols(GetOptionsMgr()->GetBool(OPT_VIEW_WHITESPACE), + GetOptionsMgr()->GetBool(OPT_ALLOW_MIXED_EOL)); } if (pRight) { - pRight->SetViewTabs(mf->m_options.GetBool(OPT_VIEW_WHITESPACE)); - pRight->SetViewEols(mf->m_options.GetBool(OPT_VIEW_WHITESPACE), - mf->m_options.GetBool(OPT_ALLOW_MIXED_EOL)); + pRight->SetViewTabs(GetOptionsMgr()->GetBool(OPT_VIEW_WHITESPACE)); + pRight->SetViewEols(GetOptionsMgr()->GetBool(OPT_VIEW_WHITESPACE), + GetOptionsMgr()->GetBool(OPT_ALLOW_MIXED_EOL)); } if (pLeftDetail) { - pLeftDetail->SetViewTabs(mf->m_options.GetBool(OPT_VIEW_WHITESPACE)); - pLeftDetail->SetViewEols(mf->m_options.GetBool(OPT_VIEW_WHITESPACE), - mf->m_options.GetBool(OPT_ALLOW_MIXED_EOL)); + pLeftDetail->SetViewTabs(GetOptionsMgr()->GetBool(OPT_VIEW_WHITESPACE)); + pLeftDetail->SetViewEols(GetOptionsMgr()->GetBool(OPT_VIEW_WHITESPACE), + GetOptionsMgr()->GetBool(OPT_ALLOW_MIXED_EOL)); } if (pRightDetail) { - pRightDetail->SetViewTabs(mf->m_options.GetBool(OPT_VIEW_WHITESPACE)); - pRightDetail->SetViewEols(mf->m_options.GetBool(OPT_VIEW_WHITESPACE), - mf->m_options.GetBool(OPT_ALLOW_MIXED_EOL)); + pRightDetail->SetViewTabs(GetOptionsMgr()->GetBool(OPT_VIEW_WHITESPACE)); + pRightDetail->SetViewEols(GetOptionsMgr()->GetBool(OPT_VIEW_WHITESPACE), + GetOptionsMgr()->GetBool(OPT_ALLOW_MIXED_EOL)); } } } @@ -3089,5 +3086,17 @@ void CMainFrame::CheckinToClearCase(CString strDestinationPath) COptionsMgr * GetOptionsMgr() { - return mf->GetTheOptionsMgr(); + return GetMainFrame()->GetTheOptionsMgr(); +} + +/** + * @brief Access to the singleton main frame (where we have some globals) + */ +CMainFrame * GetMainFrame() +{ + CWnd * mainwnd = AfxGetMainWnd(); + ASSERT(mainwnd); + CMainFrame *pMainframe = dynamic_cast(mainwnd); + ASSERT(pMainframe); + return pMainframe; } diff --git a/Src/MainFrm.h b/Src/MainFrm.h index 7a2df52a1..726fa45d8 100644 --- a/Src/MainFrm.h +++ b/Src/MainFrm.h @@ -272,7 +272,7 @@ private: void OpenFileOrUrl(LPCTSTR szFile, LPCTSTR szUrl); }; -extern CMainFrame *mf; +CMainFrame * GetMainFrame(); // access to the singleton main frame object ///////////////////////////////////////////////////////////////////////////// diff --git a/Src/Merge.cpp b/Src/Merge.cpp index 973d4679b..3228618da 100644 --- a/Src/Merge.cpp +++ b/Src/Merge.cpp @@ -559,7 +559,7 @@ void CMergeApp::OnViewLanguage() { //m_lang.ReloadMenu(); //m_LangDlg.UpdateDocTitle(); - mf->UpdateResources(); + GetMainFrame()->UpdateResources(); } } @@ -661,8 +661,7 @@ void CMergeApp::InitializeFileFilters() /** @brief Open help from mainframe when user presses F1*/ void CMergeApp::OnHelp() { - if (mf) - mf->ShowHelp(); + GetMainFrame()->ShowHelp(); } /** @brief Open Contributors.rtf */ @@ -770,4 +769,3 @@ CMergeApp:: ReloadMenu() { m_pLangDlg->ReloadMenu(); } - diff --git a/Src/MergeDoc.cpp b/Src/MergeDoc.cpp index ea73225c0..7bf6e5adb 100644 --- a/Src/MergeDoc.cpp +++ b/Src/MergeDoc.cpp @@ -999,27 +999,27 @@ BOOL CMergeDoc::DoSave(LPCTSTR szPath, BOOL &bSaveSuccess, int nBuffer) bSaveSuccess = FALSE; // Check third arg possibly given from command-line - if (!mf->m_strSaveAsPath.IsEmpty()) + if (!GetMainFrame()->m_strSaveAsPath.IsEmpty()) { - if (paths_DoesPathExist(mf->m_strSaveAsPath) == IS_EXISTING_DIR) + if (paths_DoesPathExist(GetMainFrame()->m_strSaveAsPath) == IS_EXISTING_DIR) { // third arg was a directory, so get append the filename CString sname; SplitFilename(szPath, 0, &sname, 0); - strSavePath = mf->m_strSaveAsPath; - if (mf->m_strSaveAsPath.Right(1) != _T('\\')) + strSavePath = GetMainFrame()->m_strSaveAsPath; + if (GetMainFrame()->m_strSaveAsPath.Right(1) != _T('\\')) strSavePath += _T('\\'); strSavePath += sname; } else - strSavePath = mf->m_strSaveAsPath; + strSavePath = GetMainFrame()->m_strSaveAsPath; } - nRetVal = mf->HandleReadonlySave(strSavePath, FALSE, bApplyToAll); + nRetVal = GetMainFrame()->HandleReadonlySave(strSavePath, FALSE, bApplyToAll); if (nRetVal == IDCANCEL) return FALSE; - if (!mf->CreateBackup(strSavePath)) + if (!GetMainFrame()->CreateBackup(strSavePath)) return FALSE; // FALSE as long as the user is not satisfied @@ -1173,7 +1173,7 @@ void CMergeDoc::SetDiffViewMode(BOOL bEnable) BOOL CMergeDoc::CanCloseFrame(CFrameWnd* /*pFrame*/) { // Allow user to cancel closing - if (!mf->m_bEscShutdown && SaveHelper(TRUE)) + if (!GetMainFrame()->m_bEscShutdown && SaveHelper(TRUE)) { // Set modified status to false so that we are not asking // about saving again in OnCloseDocument() @@ -2463,7 +2463,7 @@ int CMergeDoc::LoadFile(CString sFileName, int nBuffer, BOOL & readOnly, int cod IDS_SUGGEST_PRESERVEEOL) == IDYES) { // the user wants to keep the original chars - mf->SetEOLMixed(TRUE); + GetMainFrame()->SetEOLMixed(TRUE); GetOptionsMgr()->SaveOption(OPT_ALLOW_MIXED_EOL, true); } } @@ -2554,13 +2554,13 @@ CMergeDoc::OpenDocs(FileLocation filelocLeft, FileLocation filelocRight, int nLeftSuccess = FRESULT_ERROR; if (!sLeftFile.IsEmpty()) { - if (mf->m_strLeftDesc.IsEmpty()) + if (GetMainFrame()->m_strLeftDesc.IsEmpty()) m_nBufferType[0] = BUFFER_NORMAL; else { m_nBufferType[0] = BUFFER_NORMAL_NAMED; - m_strDesc[0] = mf->m_strLeftDesc; - mf->m_strLeftDesc.Empty(); + m_strDesc[0] = GetMainFrame()->m_strLeftDesc; + GetMainFrame()->m_strLeftDesc.Empty(); } m_pSaveFileInfo[0]->Update(sLeftFile); @@ -2574,7 +2574,7 @@ CMergeDoc::OpenDocs(FileLocation filelocLeft, FileLocation filelocRight, m_nBufferType[0] = BUFFER_UNNAMED; m_ptBuf[0]->InitNew(); - m_strDesc[0] = mf->m_strLeftDesc; + m_strDesc[0] = GetMainFrame()->m_strLeftDesc; nLeftSuccess = FRESULT_OK; } @@ -2582,13 +2582,13 @@ CMergeDoc::OpenDocs(FileLocation filelocLeft, FileLocation filelocRight, int nRightSuccess = FRESULT_ERROR; if (!sRightFile.IsEmpty()) { - if (mf->m_strRightDesc.IsEmpty()) + if (GetMainFrame()->m_strRightDesc.IsEmpty()) m_nBufferType[1] = BUFFER_NORMAL; else { m_nBufferType[1] = BUFFER_NORMAL_NAMED; - m_strDesc[1] = mf->m_strRightDesc; - mf->m_strRightDesc.Empty(); + m_strDesc[1] = GetMainFrame()->m_strRightDesc; + GetMainFrame()->m_strRightDesc.Empty(); } m_pSaveFileInfo[1]->Update(sRightFile); @@ -2601,7 +2601,7 @@ CMergeDoc::OpenDocs(FileLocation filelocLeft, FileLocation filelocRight, m_nBufferType[1] = BUFFER_UNNAMED; m_ptBuf[1]->InitNew(); - m_strDesc[1] = mf->m_strRightDesc; + m_strDesc[1] = GetMainFrame()->m_strRightDesc; nRightSuccess = FRESULT_OK; } @@ -2627,10 +2627,10 @@ CMergeDoc::OpenDocs(FileLocation filelocLeft, FileLocation filelocRight, m_pDetailView[0]->AttachToBuffer(); m_pDetailView[1]->AttachToBuffer(); - m_pView[0]->SetColorContext(mf->m_pSyntaxColors); - m_pView[1]->SetColorContext(mf->m_pSyntaxColors); - m_pDetailView[0]->SetColorContext(mf->m_pSyntaxColors); - m_pDetailView[1]->SetColorContext(mf->m_pSyntaxColors); + m_pView[0]->SetColorContext(GetMainFrame()->m_pSyntaxColors); + m_pView[1]->SetColorContext(GetMainFrame()->m_pSyntaxColors); + m_pDetailView[0]->SetColorContext(GetMainFrame()->m_pSyntaxColors); + m_pDetailView[1]->SetColorContext(GetMainFrame()->m_pSyntaxColors); // Set read-only statuses m_ptBuf[0]->SetReadOnly(bROLeft); @@ -2666,7 +2666,7 @@ CMergeDoc::OpenDocs(FileLocation filelocLeft, FileLocation filelocRight, // recreate the sub menu (to fill the "selected prediffers") // keep after Rescan (in automatic mode, prediffer is set during the first Rescan) - mf->UpdatePrediffersMenu(); + GetMainFrame()->UpdatePrediffersMenu(); // Open filed if rescan succeed and files are not binaries if (nRescanResult == RESCAN_OK && bBinary == FALSE) diff --git a/Src/MergeEditView.cpp b/Src/MergeEditView.cpp index 15709ca19..c65f9a06d 100644 --- a/Src/MergeEditView.cpp +++ b/Src/MergeEditView.cpp @@ -329,7 +329,7 @@ void CMergeEditView::OnActivateView(BOOL bActivate, CView* pActivateView, CView* CMergeDoc* pDoc = GetDocument(); pDoc->UpdateHeaderActivity(m_nThisPane, bActivate); - mf->UpdatePrediffersMenu(); + GetMainFrame()->UpdatePrediffersMenu(); } int CMergeEditView::GetAdditionalTextBlocks (int nLineIndex, TEXTBLOCK *pBuf) @@ -2629,7 +2629,7 @@ void CMergeEditView::OnOpenFileWithEditor() if (sFileName.IsEmpty()) return; - mf->OpenFileToExternalEditor(sFileName); + GetMainFrame()->OpenFileToExternalEditor(sFileName); } /** diff --git a/Src/OpenDlg.cpp b/Src/OpenDlg.cpp index 7d3b5cf7c..625836f2c 100644 --- a/Src/OpenDlg.cpp +++ b/Src/OpenDlg.cpp @@ -537,7 +537,7 @@ void COpenDlg::OnSelectFilter() curFilter.TrimLeft(); curFilter.TrimRight(); - mf->SelectFilter(); + GetMainFrame()->SelectFilter(); CString FilterNameOrMask = theApp.m_globalFileFilter.GetFilterNameOrMask(); if (theApp.m_globalFileFilter.IsUsingMask()) diff --git a/Src/PropRegistry.cpp b/Src/PropRegistry.cpp index 28423458b..3801d1e0a 100644 --- a/Src/PropRegistry.cpp +++ b/Src/PropRegistry.cpp @@ -98,8 +98,7 @@ void CPropRegistry::ReadOptions() */ void CPropRegistry::WriteOptions() { - CMainFrame *pMf = dynamic_cast(AfxGetMainWnd()); - CString sDefaultEditor = pMf->GetDefaultEditor(); + CString sDefaultEditor = GetMainFrame()->GetDefaultEditor(); m_pOptionsMgr->SaveOption(OPT_USE_RECYCLE_BIN, m_bUseRecycleBin == TRUE); m_pOptionsMgr->SaveOption(OPT_IGNORE_SMALL_FILETIME, m_bIgnoreSmallTimeDiff == TRUE); -- 2.11.0