2016-04-23 23:05:07 +00:00
|
|
|
/*
|
|
|
|
* Folder options.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2016 Mark Jansen
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _CFOLDEROPTIONS_H_
|
|
|
|
#define _CFOLDEROPTIONS_H_
|
|
|
|
|
|
|
|
class CFolderOptions :
|
|
|
|
public CComCoClass<CFolderOptions, &CLSID_ShellFldSetExt>,
|
|
|
|
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
|
|
|
public IShellPropSheetExt,
|
|
|
|
public IShellExtInit,
|
|
|
|
public IObjectWithSite
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
CComPtr<IUnknown> m_pSite;
|
|
|
|
//LPITEMIDLIST pidl;
|
|
|
|
//INT iIdEmpty;
|
|
|
|
//UINT cfShellIDList;
|
|
|
|
//void SF_RegisterClipFmt();
|
|
|
|
//BOOL fAcceptFmt; /* flag for pending Drop */
|
|
|
|
//BOOL QueryDrop (DWORD dwKeyState, LPDWORD pdwEffect);
|
|
|
|
//BOOL RecycleBinIsEmpty();
|
|
|
|
|
|
|
|
public:
|
|
|
|
CFolderOptions();
|
|
|
|
~CFolderOptions();
|
|
|
|
|
|
|
|
// IShellPropSheetExt
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE AddPages(LPFNSVADDPROPSHEETPAGE pfnAddPage, LPARAM lParam);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE ReplacePage(EXPPS uPageID, LPFNSVADDPROPSHEETPAGE pfnReplaceWith, LPARAM lParam);
|
[0.4.11][SHELL32] Backport format+logging-trivia, ARRAYSIZE/_countof
Picks various trivial improvements from newer branches, does not fix specific JIRA-tickets and also doesn't
*entirely* cover a specific PR, therefore none of those are mentioned here.
Main motivation is to reduce large scale white-noise diff between the branches, to make
future commits diffs (with some fixes that actually matter) smaller in size and therefore easier to review.
Specifically:
- large-scale formatting & logging improvements, including but not limited to 0.4.15-dev-7653-g 6f91b6c0fe61728cdd9d97e97e5bfbee03ed881e
- strip trailing whitespace
- also typos like 'unkown', missing \n as it was
part of 0.4.15-dev-6323-g 3854a5d8e93d2c50153bda26ea378e65cc4241fa and
0.4.15-dev-4492-g 03422451b3b4a7df96a9e9af5ce7533fd6cb55d9
(I left out the MOUSE_MOVE-one from that, because I consider the missing \n there intentional)
- ports back many usages of ARRAYSIZE/_countof as it was added as part of some commits from Hermes, e.g.:
*partial* pick of 0.4.13-dev-622-g 8a3080151668efc99be9e7a2fb22a24392c85ea3 and
*partial* pick of 0.4.15-dev-3642-g 83be315abffe14f0b391ff9cd543010aa0d57b9e (I left out the literals here for now, ...
I *might* pick them later on their own, but not now. I first want to verify their isolated impact on all compilers generated file-sizes.
Some of those changes would even increase the binary size, especially those where the same literal is used multiple times,
because string-pooling is currently not enabled for all toolchains and configurations.)
- COpenWithMenu.cpp: strip double-semicolon
- COpenWithMenu.cpp && folder_options.cpp: add \n to some dbg-prints without increasing their length
- CFSDropTarget.cpp: add \n to some dbg-prints, strip some good-path-traces that are no longer present in master in return to avoid size increase, fix indentation
- CShellLink.cpp: add \n to some dbg-prints without increasing their length
- iconcache.cpp: fix wrong indentation
binary size of shell32.dll has tendency to shrink slightly, which is caused solely by the logging changes:
master RosBEWin2.2.2 GCC8.4.0 dbg x86 10.538.496 (0.4.15-dev-7640-gbdcfc6b)
releases/0.4.14 RosBEWin2.2.2 GCC8.4.0 dbg x86 9.317.888 -> 9.316.684
releases/0.4.14 RosBEWin2.1.6 GCC4.7.2 dbg x86 9.345.024 -> 9.345.024
releases/0.4.13 RosBEWin2.1.6 GCC4.7.2 dbg x86 9.201.152 -> 9.200.640
releases/0.4.12 RosBEWin2.1.6 GCC4.7.2 dbg x86 9.146.880 -> 9.146.880
releases/0.4.11 RosBEWin2.1.6 GCC4.7.2 dbg x86 9.077.760 -> 9.077.248
releases/0.4.10 RosBEWin2.1.6 GCC4.7.2 dbg x86 9.074.176 -> 9.072.128
releases/0.4. 9 RosBEWin2.1.6 GCC4.7.2 dbg x86 8.825.856 -> 8.824.832
releases/0.4. 8 RosBEWin2.1.6 GCC4.7.2 dbg x86 8.740.864 -> 8.738.816
releases/0.4. 7 RosBEWin2.1.6 GCC4.7.2 dbg x86 8.668.160 -> 8.666.624
2024-02-25 00:44:57 +00:00
|
|
|
|
2016-04-23 23:05:07 +00:00
|
|
|
// IShellExtInit
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE Initialize(LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID);
|
|
|
|
|
|
|
|
// IObjectWithSite
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite);
|
|
|
|
|
|
|
|
DECLARE_REGISTRY_RESOURCEID(IDR_FOLDEROPTIONS)
|
|
|
|
DECLARE_NOT_AGGREGATABLE(CFolderOptions)
|
|
|
|
|
|
|
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
|
|
|
|
|
|
|
BEGIN_COM_MAP(CFolderOptions)
|
|
|
|
COM_INTERFACE_ENTRY_IID(IID_IShellPropSheetExt, IShellPropSheetExt)
|
|
|
|
COM_INTERFACE_ENTRY_IID(IID_IShellExtInit, IShellExtInit)
|
|
|
|
COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite)
|
|
|
|
END_COM_MAP()
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _CFOLDEROPTIONS_H_ */
|