Module: wine Branch: master Commit: 04453937e5cbff9e4c0bff815d22c1ee66188967 URL: http://source.winehq.org/git/wine.git/?a=commit;h=04453937e5cbff9e4c0bff815d...
Author: Piotr Caban piotr@codeweavers.com Date: Tue Sep 25 18:12:48 2012 +0200
inetcpl.cpl: Added support for clearing cookies and history cache.
---
dlls/inetcpl.cpl/Makefile.in | 2 +- dlls/inetcpl.cpl/general.c | 26 +++++++++++++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/dlls/inetcpl.cpl/Makefile.in b/dlls/inetcpl.cpl/Makefile.in index aedaaa9..2f0c1f1 100644 --- a/dlls/inetcpl.cpl/Makefile.in +++ b/dlls/inetcpl.cpl/Makefile.in @@ -1,6 +1,6 @@ MODULE = inetcpl.cpl IMPORTS = comctl32 shlwapi user32 advapi32 -DELAYIMPORTS = cryptui wininet ole32 urlmon +DELAYIMPORTS = cryptui wininet ole32 urlmon shell32
C_SRCS = \ content.c \ diff --git a/dlls/inetcpl.cpl/general.c b/dlls/inetcpl.cpl/general.c index 1d8f027..42948ea 100644 --- a/dlls/inetcpl.cpl/general.c +++ b/dlls/inetcpl.cpl/general.c @@ -29,6 +29,7 @@ #include <winreg.h> #include <shlwapi.h> #include <prsht.h> +#include <shlobj.h>
#include "inetcpl.h" #include "wine/debug.h" @@ -47,9 +48,7 @@ static DWORD disabled_general_buttons[] = {IDC_HOME_CURRENT, IDC_HOME_DEFAULT, IDC_HISTORY_SETTINGS, 0}; -static DWORD disabled_delhist_buttons[] = {IDC_DELETE_COOKIES, - IDC_DELETE_HISTORY, - IDC_DELETE_FORM_DATA, +static DWORD disabled_delhist_buttons[] = {IDC_DELETE_FORM_DATA, IDC_DELETE_PASSWORDS, 0};
@@ -64,8 +63,25 @@ static INT_PTR delhist_on_command(HWND hdlg, WPARAM wparam) switch (wparam) { case MAKEWPARAM(IDOK, BN_CLICKED): - if (!FreeUrlCacheSpaceW(NULL, 100, FCS_PERCENT_CACHE_SPACE)) - break; /* Don't close the dialog. */ + if (IsDlgButtonChecked(hdlg, IDC_DELETE_TEMP_FILES)) + FreeUrlCacheSpaceW(NULL, 100, 0); + + if (IsDlgButtonChecked(hdlg, IDC_DELETE_COOKIES)) + { + WCHAR pathW[MAX_PATH]; + + if(SHGetSpecialFolderPathW(NULL, pathW, CSIDL_COOKIES, TRUE)) + FreeUrlCacheSpaceW(pathW, 100, 0); + } + + if (IsDlgButtonChecked(hdlg, IDC_DELETE_HISTORY)) + { + WCHAR pathW[MAX_PATH]; + + if(SHGetSpecialFolderPathW(NULL, pathW, CSIDL_HISTORY, TRUE)) + FreeUrlCacheSpaceW(pathW, 100, 0); + } + EndDialog(hdlg, IDOK); return TRUE;