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 MODULE = inetcpl.cpl
IMPORTS = comctl32 shlwapi user32 advapi32 IMPORTS = comctl32 shlwapi user32 advapi32
DELAYIMPORTS = cryptui wininet ole32 urlmon DELAYIMPORTS = cryptui wininet ole32 urlmon shell32
C_SRCS = \ C_SRCS = \
content.c \ content.c \
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <winreg.h> #include <winreg.h>
#include <shlwapi.h> #include <shlwapi.h>
#include <prsht.h> #include <prsht.h>
#include <shlobj.h>
#include "inetcpl.h" #include "inetcpl.h"
#include "wine/debug.h" #include "wine/debug.h"
...@@ -47,9 +48,7 @@ static DWORD disabled_general_buttons[] = {IDC_HOME_CURRENT, ...@@ -47,9 +48,7 @@ static DWORD disabled_general_buttons[] = {IDC_HOME_CURRENT,
IDC_HOME_DEFAULT, IDC_HOME_DEFAULT,
IDC_HISTORY_SETTINGS, IDC_HISTORY_SETTINGS,
0}; 0};
static DWORD disabled_delhist_buttons[] = {IDC_DELETE_COOKIES, static DWORD disabled_delhist_buttons[] = {IDC_DELETE_FORM_DATA,
IDC_DELETE_HISTORY,
IDC_DELETE_FORM_DATA,
IDC_DELETE_PASSWORDS, IDC_DELETE_PASSWORDS,
0}; 0};
...@@ -64,8 +63,25 @@ static INT_PTR delhist_on_command(HWND hdlg, WPARAM wparam) ...@@ -64,8 +63,25 @@ static INT_PTR delhist_on_command(HWND hdlg, WPARAM wparam)
switch (wparam) switch (wparam)
{ {
case MAKEWPARAM(IDOK, BN_CLICKED): case MAKEWPARAM(IDOK, BN_CLICKED):
if (!FreeUrlCacheSpaceW(NULL, 100, FCS_PERCENT_CACHE_SPACE)) if (IsDlgButtonChecked(hdlg, IDC_DELETE_TEMP_FILES))
break; /* Don't close the dialog. */ 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); EndDialog(hdlg, IDOK);
return TRUE; 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