Commit 04453937 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

inetcpl.cpl: Added support for clearing cookies and history cache.

parent 306f53cb
MODULE = inetcpl.cpl
IMPORTS = comctl32 shlwapi user32 advapi32
DELAYIMPORTS = cryptui wininet ole32 urlmon
DELAYIMPORTS = cryptui wininet ole32 urlmon shell32
C_SRCS = \
content.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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment