diff --git a/dll/win32/shell32/CMakeLists.txt b/dll/win32/shell32/CMakeLists.txt index 81df5d528ab..3660b02f36e 100644 --- a/dll/win32/shell32/CMakeLists.txt +++ b/dll/win32/shell32/CMakeLists.txt @@ -38,6 +38,7 @@ list(APPEND SOURCE CDropTargetHelper.cpp CEnumIDListBase.cpp CExtractIcon.cpp + CRecycleBinCleaner.cpp folders.cpp iconcache.cpp propsheet.cpp diff --git a/dll/win32/shell32/CRecycleBinCleaner.cpp b/dll/win32/shell32/CRecycleBinCleaner.cpp new file mode 100644 index 00000000000..e8cdaf31dbe --- /dev/null +++ b/dll/win32/shell32/CRecycleBinCleaner.cpp @@ -0,0 +1,149 @@ +/* + * PROJECT: shell32 + * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later) + * PURPOSE: CRecycleBinCleaner implementation + * COPYRIGHT: Copyright 2023-2025 Mark Jansen + */ + +#include "precomp.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + + +CLSID CLSID_RecycleBinCleaner = { 0x5ef4af3a, 0xf726, 0x11d0, 0xb8, 0xa2, 0x00, 0xc0, 0x4f, 0xc3, 0x09, 0xa4 }; + +struct CRecycleBinCleaner : + public CComObjectRootEx, + public CComCoClass, + public IEmptyVolumeCache2 +{ + WCHAR m_wszVolume[4]; + + void + OutputResourceString(DWORD dwResId, _Out_ LPWSTR *ppwszOutput) + { + CStringW Tmp(MAKEINTRESOURCEW(dwResId)); + SHStrDupW(Tmp, ppwszOutput); + } + +public: + + // +IEmptyVolumeCache + STDMETHODIMP Initialize( + _In_ HKEY hkRegKey, + _In_ LPCWSTR pcwszVolume, + _Out_ LPWSTR* ppwszDisplayName, + _Out_ LPWSTR* ppwszDescription, + _Out_ DWORD* pdwFlags) + { + if (!pdwFlags) + return E_POINTER; + + *pdwFlags = EVCF_HASSETTINGS; + + OutputResourceString(IDS_RECYCLE_CLEANER_DISPLAYNAME, ppwszDisplayName); + OutputResourceString(IDS_RECYCLE_CLEANER_DESCRIPTION, ppwszDescription); + + return StringCchCopyW(m_wszVolume, _countof(m_wszVolume), pcwszVolume); + } + + STDMETHODIMP GetSpaceUsed( + _Out_ DWORDLONG* pdwlSpaceUsed, + _In_opt_ IEmptyVolumeCacheCallBack* picb) + { + if (!pdwlSpaceUsed) + return E_POINTER; + + SHQUERYRBINFO bin = { sizeof(bin) }; + HRESULT hr = SHQueryRecycleBinW(m_wszVolume, &bin); + if (FAILED_UNEXPECTEDLY(hr)) + { + bin.i64Size = 0; + } + *pdwlSpaceUsed = bin.i64Size; + if (picb) + { + picb->ScanProgress(bin.i64Size, EVCCBF_LASTNOTIFICATION, NULL); + } + + return S_OK; + } + + STDMETHODIMP Purge( + _In_ DWORDLONG dwlSpaceToFree, + _In_opt_ IEmptyVolumeCacheCallBack *picb) + { + DWORDLONG dwlPrevious = 0; + GetSpaceUsed(&dwlPrevious, NULL); + + SHEmptyRecycleBinW(NULL, m_wszVolume, SHERB_NOCONFIRMATION | SHERB_NOPROGRESSUI | SHERB_NOSOUND); + if (picb) + { + picb->PurgeProgress(dwlPrevious, 0, EVCCBF_LASTNOTIFICATION, NULL); + } + + return S_OK; + } + + STDMETHODIMP ShowProperties( + _In_ HWND hwnd) + { + CComHeapPtr pidl; + HRESULT hr; + if (FAILED_UNEXPECTEDLY(hr = SHGetSpecialFolderLocation(hwnd, CSIDL_BITBUCKET, &pidl))) + return hr; + + SHELLEXECUTEINFOW seei = {sizeof(seei)}; + seei.hwnd = hwnd; + seei.lpVerb = L"open"; + seei.nShow = SW_SHOWNORMAL; + seei.fMask = SEE_MASK_IDLIST; + seei.lpIDList = pidl; + ShellExecuteExW(&seei); + + return S_OK; + } + + STDMETHODIMP Deactivate( + _Out_ DWORD* pdwFlags) + { + if (!pdwFlags) + return E_POINTER; + + *pdwFlags = 0; + + return S_OK; + } + // -IEmptyVolumeCache + + + // +IEmptyVolumeCache2 + STDMETHODIMP InitializeEx( + _In_ HKEY hkRegKey, + _In_ LPCWSTR pcwszVolume, + _In_ LPCWSTR pcwszKeyName, + _Out_ LPWSTR* ppwszDisplayName, + _Out_ LPWSTR* ppwszDescription, + _Out_ LPWSTR* ppwszBtnText, + _Out_ DWORD* pdwFlags) + { + OutputResourceString(IDS_RECYCLE_CLEANER_BUTTON_TEXT, ppwszBtnText); + + return Initialize(hkRegKey, pcwszVolume, ppwszDisplayName, ppwszDescription, pdwFlags); + } + // -IEmptyVolumeCache2 + + + DECLARE_PROTECT_FINAL_CONSTRUCT(); + DECLARE_REGISTRY_RESOURCEID(IDR_RECYCLEBINCLEANER) + DECLARE_NOT_AGGREGATABLE(CRecycleBinCleaner) + + BEGIN_COM_MAP(CRecycleBinCleaner) + COM_INTERFACE_ENTRY_IID(IID_IEmptyVolumeCache2, IEmptyVolumeCache2) + COM_INTERFACE_ENTRY_IID(IID_IEmptyVolumeCache, IEmptyVolumeCache) + COM_INTERFACE_ENTRY_IID(IID_IUnknown, IUnknown) + END_COM_MAP() +}; + + +OBJECT_ENTRY_AUTO(CLSID_RecycleBinCleaner, CRecycleBinCleaner) diff --git a/dll/win32/shell32/lang/bg-BG.rc b/dll/win32/shell32/lang/bg-BG.rc index 36f71419cb5..43adc25680e 100644 --- a/dll/win32/shell32/lang/bg-BG.rc +++ b/dll/win32/shell32/lang/bg-BG.rc @@ -1000,6 +1000,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Обзор..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "Моят компютър" IDS_TITLE_MYNET "Моята мрежа" IDS_TITLE_BIN_1 "Кошче (пълно)" diff --git a/dll/win32/shell32/lang/ca-ES.rc b/dll/win32/shell32/lang/ca-ES.rc index 7a6815db73a..a8c9a28db49 100644 --- a/dll/win32/shell32/lang/ca-ES.rc +++ b/dll/win32/shell32/lang/ca-ES.rc @@ -1000,6 +1000,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Browse..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "My Computer" IDS_TITLE_MYNET "My Network Places" IDS_TITLE_BIN_1 "Recycle Bin (full)" diff --git a/dll/win32/shell32/lang/cs-CZ.rc b/dll/win32/shell32/lang/cs-CZ.rc index ad440329838..cbd9ad33491 100644 --- a/dll/win32/shell32/lang/cs-CZ.rc +++ b/dll/win32/shell32/lang/cs-CZ.rc @@ -1008,6 +1008,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Procházet..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "Tento počítač" IDS_TITLE_MYNET "Místa v síti" IDS_TITLE_BIN_1 "Koš (plný)" diff --git a/dll/win32/shell32/lang/da-DK.rc b/dll/win32/shell32/lang/da-DK.rc index bd726f617c3..10c9174dba2 100644 --- a/dll/win32/shell32/lang/da-DK.rc +++ b/dll/win32/shell32/lang/da-DK.rc @@ -1007,6 +1007,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Gennemse..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "Min Computer" IDS_TITLE_MYNET "My Network Places" IDS_TITLE_BIN_1 "Recycle Bin (full)" diff --git a/dll/win32/shell32/lang/de-DE.rc b/dll/win32/shell32/lang/de-DE.rc index ccaeb38024c..5a05823c969 100644 --- a/dll/win32/shell32/lang/de-DE.rc +++ b/dll/win32/shell32/lang/de-DE.rc @@ -1001,6 +1001,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Durchsuchen..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "Arbeitsplatz" IDS_TITLE_MYNET "Netzwerkumgebung" IDS_TITLE_BIN_1 "Papierkorb (voll)" diff --git a/dll/win32/shell32/lang/el-GR.rc b/dll/win32/shell32/lang/el-GR.rc index 9dfb4a8ab8b..3e9712dc244 100644 --- a/dll/win32/shell32/lang/el-GR.rc +++ b/dll/win32/shell32/lang/el-GR.rc @@ -1000,6 +1000,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Αναζήτηση..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "Ο υπολογιστής μου" IDS_TITLE_MYNET "My Network Places" IDS_TITLE_BIN_1 "Κάδος ανακύκλωσης (γεμάτος)" diff --git a/dll/win32/shell32/lang/en-GB.rc b/dll/win32/shell32/lang/en-GB.rc index 62ff8c79d1d..bf40ccae72e 100644 --- a/dll/win32/shell32/lang/en-GB.rc +++ b/dll/win32/shell32/lang/en-GB.rc @@ -1000,6 +1000,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Browse..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "My Computer" IDS_TITLE_MYNET "My Network Places" IDS_TITLE_BIN_1 "Recycle Bin (full)" diff --git a/dll/win32/shell32/lang/en-US.rc b/dll/win32/shell32/lang/en-US.rc index a2fd1bf8efa..412dca09bf2 100644 --- a/dll/win32/shell32/lang/en-US.rc +++ b/dll/win32/shell32/lang/en-US.rc @@ -1000,6 +1000,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Browse..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "My Computer" IDS_TITLE_MYNET "My Network Places" IDS_TITLE_BIN_1 "Recycle Bin (full)" diff --git a/dll/win32/shell32/lang/es-ES.rc b/dll/win32/shell32/lang/es-ES.rc index f780d75264c..d764f0fb21d 100644 --- a/dll/win32/shell32/lang/es-ES.rc +++ b/dll/win32/shell32/lang/es-ES.rc @@ -1009,6 +1009,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Examinar..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "Mi equipo" IDS_TITLE_MYNET "Mis sitios de red" IDS_TITLE_BIN_1 "Papelera (llena)" diff --git a/dll/win32/shell32/lang/et-EE.rc b/dll/win32/shell32/lang/et-EE.rc index 6190be6c55e..517bd63a044 100644 --- a/dll/win32/shell32/lang/et-EE.rc +++ b/dll/win32/shell32/lang/et-EE.rc @@ -1007,6 +1007,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Sirvi..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "Minu arvuti" IDS_TITLE_MYNET "Minu võrgukohad" IDS_TITLE_BIN_1 "Prügikast (täis)" diff --git a/dll/win32/shell32/lang/eu-ES.rc b/dll/win32/shell32/lang/eu-ES.rc index 5e8f1cdb676..e572257f00c 100644 --- a/dll/win32/shell32/lang/eu-ES.rc +++ b/dll/win32/shell32/lang/eu-ES.rc @@ -1005,6 +1005,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Arakatu..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "Ordenagailua" IDS_TITLE_MYNET "Nire sarelekuak" IDS_TITLE_BIN_1 "Zakarrontzia (betea)" diff --git a/dll/win32/shell32/lang/fi-FI.rc b/dll/win32/shell32/lang/fi-FI.rc index 16f5171c978..5e5d2b8296e 100644 --- a/dll/win32/shell32/lang/fi-FI.rc +++ b/dll/win32/shell32/lang/fi-FI.rc @@ -1000,6 +1000,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Selaa..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "Oma Tietokone" IDS_TITLE_MYNET "My Network Places" IDS_TITLE_BIN_1 "Recycle Bin (full)" diff --git a/dll/win32/shell32/lang/fr-FR.rc b/dll/win32/shell32/lang/fr-FR.rc index 235eaace30a..5979054549a 100644 --- a/dll/win32/shell32/lang/fr-FR.rc +++ b/dll/win32/shell32/lang/fr-FR.rc @@ -1000,6 +1000,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Parcourir..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "Poste de travail" IDS_TITLE_MYNET "Mon réseau" IDS_TITLE_BIN_1 "Corbeille (pleine)" diff --git a/dll/win32/shell32/lang/he-IL.rc b/dll/win32/shell32/lang/he-IL.rc index 4fc4b5e6ca8..598b7f4d59a 100644 --- a/dll/win32/shell32/lang/he-IL.rc +++ b/dll/win32/shell32/lang/he-IL.rc @@ -1008,6 +1008,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "עיון..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "המחשב שלי" IDS_TITLE_MYNET "מיקומי הרשת שלי" IDS_TITLE_BIN_1 "Recycle Bin (full)" diff --git a/dll/win32/shell32/lang/hi-IN.rc b/dll/win32/shell32/lang/hi-IN.rc index 1c682de1363..5244e2126c1 100644 --- a/dll/win32/shell32/lang/hi-IN.rc +++ b/dll/win32/shell32/lang/hi-IN.rc @@ -1002,6 +1002,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "ब्राउज़ करें..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "मेरा कंप्यूटर" IDS_TITLE_MYNET "मेरे नेटवर्क स्थान" IDS_TITLE_BIN_1 "Recycle Bin (full)" diff --git a/dll/win32/shell32/lang/hu-HU.rc b/dll/win32/shell32/lang/hu-HU.rc index 8d71dec6e20..b4d7b7bf234 100644 --- a/dll/win32/shell32/lang/hu-HU.rc +++ b/dll/win32/shell32/lang/hu-HU.rc @@ -999,6 +999,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Böngészés..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "Számítógép" IDS_TITLE_MYNET "Hálózati helyek" IDS_TITLE_BIN_1 "Lomtár (tele)" diff --git a/dll/win32/shell32/lang/id-ID.rc b/dll/win32/shell32/lang/id-ID.rc index ebddbcc7bd4..ef528b76f3e 100644 --- a/dll/win32/shell32/lang/id-ID.rc +++ b/dll/win32/shell32/lang/id-ID.rc @@ -997,6 +997,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Jelajah..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "Komputer Saya" IDS_TITLE_MYNET "Tempat Jaringan Saya" IDS_TITLE_BIN_1 "Tampungan Daur Ulang (penuh)" diff --git a/dll/win32/shell32/lang/it-IT.rc b/dll/win32/shell32/lang/it-IT.rc index 9fb0e5601d0..a51cffdc41c 100644 --- a/dll/win32/shell32/lang/it-IT.rc +++ b/dll/win32/shell32/lang/it-IT.rc @@ -1000,6 +1000,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Esplora..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "Risorse del Computer" IDS_TITLE_MYNET "Risorse di rete" IDS_TITLE_BIN_1 "Cestino (pieno)" diff --git a/dll/win32/shell32/lang/ja-JP.rc b/dll/win32/shell32/lang/ja-JP.rc index 7cc1dd07a19..8cfd851dd01 100644 --- a/dll/win32/shell32/lang/ja-JP.rc +++ b/dll/win32/shell32/lang/ja-JP.rc @@ -997,6 +997,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "参照..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "マイ コンピュータ" IDS_TITLE_MYNET "マイ ネットワーク" IDS_TITLE_BIN_1 "ごみ箱 (いっぱい)" diff --git a/dll/win32/shell32/lang/ko-KR.rc b/dll/win32/shell32/lang/ko-KR.rc index d6f71216370..a05e6cf25d4 100644 --- a/dll/win32/shell32/lang/ko-KR.rc +++ b/dll/win32/shell32/lang/ko-KR.rc @@ -1007,6 +1007,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "찾아보기..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "내 컴퓨터" IDS_TITLE_MYNET "내 네트워크 환경" IDS_TITLE_BIN_1 "Recycle Bin (full)" diff --git a/dll/win32/shell32/lang/nl-NL.rc b/dll/win32/shell32/lang/nl-NL.rc index d13aceef1ac..5988f7d6a2f 100644 --- a/dll/win32/shell32/lang/nl-NL.rc +++ b/dll/win32/shell32/lang/nl-NL.rc @@ -1000,6 +1000,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Bladeren..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "My Computer" IDS_TITLE_MYNET "My Network Places" IDS_TITLE_BIN_1 "Recycle Bin (full)" diff --git a/dll/win32/shell32/lang/no-NO.rc b/dll/win32/shell32/lang/no-NO.rc index 5ff56fce943..9b110667330 100644 --- a/dll/win32/shell32/lang/no-NO.rc +++ b/dll/win32/shell32/lang/no-NO.rc @@ -1000,6 +1000,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Bla gjennom..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "Min datamaskin" IDS_TITLE_MYNET "Mine nettverkssteder" IDS_TITLE_BIN_1 "Papirkurv (full)" diff --git a/dll/win32/shell32/lang/pl-PL.rc b/dll/win32/shell32/lang/pl-PL.rc index babdb6d3183..a31f52ff4a9 100644 --- a/dll/win32/shell32/lang/pl-PL.rc +++ b/dll/win32/shell32/lang/pl-PL.rc @@ -1009,6 +1009,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Przeglądaj..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "Mój komputer" IDS_TITLE_MYNET "Moje miejsca sieciowe" IDS_TITLE_BIN_1 "Kosz (pełny)" diff --git a/dll/win32/shell32/lang/pt-BR.rc b/dll/win32/shell32/lang/pt-BR.rc index 17337ac6806..bb7c674e1b2 100644 --- a/dll/win32/shell32/lang/pt-BR.rc +++ b/dll/win32/shell32/lang/pt-BR.rc @@ -1000,6 +1000,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Procurar..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "Meu Computador" IDS_TITLE_MYNET "Meus Locais de Rede" IDS_TITLE_BIN_1 "Lixeira (cheia)" diff --git a/dll/win32/shell32/lang/pt-PT.rc b/dll/win32/shell32/lang/pt-PT.rc index d6aa68921a1..d85aa088292 100644 --- a/dll/win32/shell32/lang/pt-PT.rc +++ b/dll/win32/shell32/lang/pt-PT.rc @@ -1009,6 +1009,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Procurar..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "O Meu Computador" IDS_TITLE_MYNET "Os Meus Locais na Rede" IDS_TITLE_BIN_1 "Reciclagem (cheia)" diff --git a/dll/win32/shell32/lang/ro-RO.rc b/dll/win32/shell32/lang/ro-RO.rc index a3666ac4eab..0851445bc65 100644 --- a/dll/win32/shell32/lang/ro-RO.rc +++ b/dll/win32/shell32/lang/ro-RO.rc @@ -1008,6 +1008,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Răsfoire..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "Computerul meu" IDS_TITLE_MYNET "Locaţii în reţea" IDS_TITLE_BIN_1 "Coş de reciclare (plin)" diff --git a/dll/win32/shell32/lang/ru-RU.rc b/dll/win32/shell32/lang/ru-RU.rc index d9500e3b9df..d35227b1f23 100644 --- a/dll/win32/shell32/lang/ru-RU.rc +++ b/dll/win32/shell32/lang/ru-RU.rc @@ -1009,6 +1009,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Обзор..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "Мой компьютер" IDS_TITLE_MYNET "Сетевое окружение" IDS_TITLE_BIN_1 "Корзина (полная)" diff --git a/dll/win32/shell32/lang/sk-SK.rc b/dll/win32/shell32/lang/sk-SK.rc index 60997c55ed1..b17c22fd0e5 100644 --- a/dll/win32/shell32/lang/sk-SK.rc +++ b/dll/win32/shell32/lang/sk-SK.rc @@ -1000,6 +1000,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Prehľadávať..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "Tento počítač" IDS_TITLE_MYNET "Miesta v sieti" IDS_TITLE_BIN_1 "Kôš (plný)" diff --git a/dll/win32/shell32/lang/sl-SI.rc b/dll/win32/shell32/lang/sl-SI.rc index 1827162510d..eba35606459 100644 --- a/dll/win32/shell32/lang/sl-SI.rc +++ b/dll/win32/shell32/lang/sl-SI.rc @@ -1000,6 +1000,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Prebrskaj..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "My Computer" IDS_TITLE_MYNET "My Network Places" IDS_TITLE_BIN_1 "Recycle Bin (full)" diff --git a/dll/win32/shell32/lang/sq-AL.rc b/dll/win32/shell32/lang/sq-AL.rc index 4b8d98a62b2..4052b6cce09 100644 --- a/dll/win32/shell32/lang/sq-AL.rc +++ b/dll/win32/shell32/lang/sq-AL.rc @@ -1007,6 +1007,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Shfleto..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "Kompjuteri Im" IDS_TITLE_MYNET "Vendi Rrjetit Tim" IDS_TITLE_BIN_1 "Plehra (plot)" diff --git a/dll/win32/shell32/lang/sv-SE.rc b/dll/win32/shell32/lang/sv-SE.rc index 0c4df0f3782..4f04b16b2eb 100644 --- a/dll/win32/shell32/lang/sv-SE.rc +++ b/dll/win32/shell32/lang/sv-SE.rc @@ -1000,6 +1000,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Bläddra..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "Den här datorn" IDS_TITLE_MYNET "Mina nätverksplatser" IDS_TITLE_BIN_1 "Papperskorgen (full)" diff --git a/dll/win32/shell32/lang/tr-TR.rc b/dll/win32/shell32/lang/tr-TR.rc index 31851af7f46..1777e815280 100644 --- a/dll/win32/shell32/lang/tr-TR.rc +++ b/dll/win32/shell32/lang/tr-TR.rc @@ -1009,6 +1009,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Gözat..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "Bilgisayarım" IDS_TITLE_MYNET "Ağ Bağlantılarım" IDS_TITLE_BIN_1 "Recycle Bin (full)" diff --git a/dll/win32/shell32/lang/uk-UA.rc b/dll/win32/shell32/lang/uk-UA.rc index 97fafbfec94..8b891ef1d69 100644 --- a/dll/win32/shell32/lang/uk-UA.rc +++ b/dll/win32/shell32/lang/uk-UA.rc @@ -1000,6 +1000,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "Огляд..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "Мій комп'ютер" IDS_TITLE_MYNET "Мережне оточення" IDS_TITLE_BIN_1 "Кошик (повний)" diff --git a/dll/win32/shell32/lang/zh-CN.rc b/dll/win32/shell32/lang/zh-CN.rc index bafd33dfa81..a9a9dbacd8c 100644 --- a/dll/win32/shell32/lang/zh-CN.rc +++ b/dll/win32/shell32/lang/zh-CN.rc @@ -1010,6 +1010,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "浏览..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "我的电脑" IDS_TITLE_MYNET "网上邻居" IDS_TITLE_BIN_1 "回收站(满)" diff --git a/dll/win32/shell32/lang/zh-HK.rc b/dll/win32/shell32/lang/zh-HK.rc index 005a2c3d7a1..2747649dedf 100644 --- a/dll/win32/shell32/lang/zh-HK.rc +++ b/dll/win32/shell32/lang/zh-HK.rc @@ -1008,6 +1008,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "瀏覽..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "我的電腦" IDS_TITLE_MYNET "網絡上的芳鄰" IDS_TITLE_BIN_1 "Recycle Bin (full)" diff --git a/dll/win32/shell32/lang/zh-TW.rc b/dll/win32/shell32/lang/zh-TW.rc index 8436d2d0e8c..48d886b8511 100644 --- a/dll/win32/shell32/lang/zh-TW.rc +++ b/dll/win32/shell32/lang/zh-TW.rc @@ -1009,6 +1009,10 @@ BEGIN IDS_SEARCH_BROWSEITEM "瀏覽..." + IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" + IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." + IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" + IDS_TITLE_MYCOMP "我的電腦" IDS_TITLE_MYNET "網路上的芳鄰" IDS_TITLE_BIN_1 "Recycle Bin (full)" diff --git a/dll/win32/shell32/precomp.h b/dll/win32/shell32/precomp.h index 94548ec0467..fab0af7ebcb 100644 --- a/dll/win32/shell32/precomp.h +++ b/dll/win32/shell32/precomp.h @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/dll/win32/shell32/res/rgs/recyclebincleaner.rgs b/dll/win32/shell32/res/rgs/recyclebincleaner.rgs new file mode 100644 index 00000000000..557c41bd192 --- /dev/null +++ b/dll/win32/shell32/res/rgs/recyclebincleaner.rgs @@ -0,0 +1,43 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {5ef4af3a-f726-11d0-b8a2-00c04fc309a4} = s 'Recycle bin cleaner' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + DefaultIcon = s '%MODULE%,-33' + } + } +} + +HKLM +{ + NoRemove SOFTWARE + { + NoRemove Microsoft + { + NoRemove Windows + { + NoRemove CurrentVersion + { + NoRemove Explorer + { + NoRemove VolumeCaches + { + ForceRemove 'Recycle Bin' = s '{5ef4af3a-f726-11d0-b8a2-00c04fc309a4}' + } + NoRemove MyComputer + { + ForceRemove cleanuppath = e '%%SystemRoot%%\System32\cleanmgr.exe /D %%c' + { + } + } + } + } + } + } + } +} diff --git a/dll/win32/shell32/rgs_res.rc b/dll/win32/shell32/rgs_res.rc index 52ef32b014b..c80d36b5d7a 100644 --- a/dll/win32/shell32/rgs_res.rc +++ b/dll/win32/shell32/rgs_res.rc @@ -33,3 +33,4 @@ IDR_SENDTOMENU REGISTRY "res/rgs/sendtomenu.rgs" IDR_COPYASPATHMENU REGISTRY "res/rgs/copyaspathmenu.rgs" IDR_COPYTOMENU REGISTRY "res/rgs/copytomenu.rgs" IDR_MOVETOMENU REGISTRY "res/rgs/movetomenu.rgs" +IDR_RECYCLEBINCLEANER REGISTRY "res/rgs/recyclebincleaner.rgs" diff --git a/dll/win32/shell32/shresdef.h b/dll/win32/shell32/shresdef.h index cc9a651da93..3d73c8fbc45 100644 --- a/dll/win32/shell32/shresdef.h +++ b/dll/win32/shell32/shresdef.h @@ -286,6 +286,11 @@ #define IDS_SEARCH_LOCALDRIVES 10241 #define IDS_SEARCH_BROWSEITEM 10244 +/* Recycle Bin Cleaner */ +#define IDS_RECYCLE_CLEANER_DISPLAYNAME 10291 +#define IDS_RECYCLE_CLEANER_DESCRIPTION 10292 +#define IDS_RECYCLE_CLEANER_BUTTON_TEXT 10293 + /* Desktop icon titles */ #define IDS_TITLE_MYCOMP 30386 #define IDS_TITLE_MYNET 30387 @@ -918,3 +923,4 @@ #define IDR_COPYTOMENU 159 #define IDR_MOVETOMENU 160 #define IDR_COPYASPATHMENU 161 +#define IDR_RECYCLEBINCLEANER 162