00001 /* 00002 Free Download Manager Copyright (c) 2003-2007 FreeDownloadManager.ORG 00003 Open Download Manager Copyright (c) 2008-2010 OpenDownloadManager.ORG 00004 */ 00005 00006 #include "stdafx.h" 00007 #include "FdmApp.h" 00008 #include "fsHistoriesMgr.h" 00009 #include "HFEWnd.h" 00010 00011 extern CHFEWnd *_pwndHFE; 00012 00013 #ifdef _DEBUG 00014 #undef THIS_FILE 00015 static char THIS_FILE[]=__FILE__; 00016 #define new DEBUG_NEW 00017 #endif 00018 00019 fsHistoriesMgr::fsHistoriesMgr() 00020 { 00021 00022 } 00023 00024 fsHistoriesMgr::~fsHistoriesMgr() 00025 { 00026 00027 } 00028 00029 void fsHistoriesMgr::ReadSettings() 00030 { 00031 fsCmdHistoryMgr* hs [] = { 00032 &_LastUrlFiles, &_LastUrlPaths, &_LastBatchUrls, &_LastFolders, 00033 &_LastFind 00034 }; 00035 00036 BOOL bUseHistory = _App.History_Use (); 00037 BOOL bFoldersOnly = _App.History_FoldersOnly (); 00038 int cDays = _App.History_KeepDays (); 00039 int cMaxRecs = _App.History_MaxRecords (); 00040 00041 for (int i = 0; i < sizeof (hs) / sizeof (fsCmdHistoryMgr*); i++) 00042 { 00043 hs [i]->Set_NoHistory (bUseHistory == FALSE); 00044 if (bFoldersOnly && hs [i] != &_LastFolders) 00045 hs [i]->Set_NoHistory (TRUE); 00046 hs [i]->Set_MaxDaysCount (cDays); 00047 hs [i]->Set_MaxRecordCount (cMaxRecs); 00048 } 00049 } 00050 00051 void fsHistoriesMgr::ClearAll() 00052 { 00053 _LastUrlFiles.ClearHistory (); 00054 _LastUrlPaths.ClearHistory (); 00055 _LastBatchUrls.ClearHistory (); 00056 _LastFolders.ClearHistory (); 00057 _LastFind.ClearHistory (); 00058 00059 _pwndHFE->ClearHistory (); 00060 }
1.5.6