diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2020-03-12 19:11:25 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2020-03-13 16:18:18 +0300 |
commit | f8cf98a768f4745aa9ebde503479acacc78d7c21 (patch) | |
tree | d13d84c48e4f0028446e2bea9b5aef9c7365b17f | |
parent | db40652c6a1213bcf4bc43856fefa61292543a62 (diff) |
Cleanup Windows shell extensions
35 files changed, 19 insertions, 195 deletions
diff --git a/shell_integration/windows/OCContextMenu/CMakeLists.txt b/shell_integration/windows/OCContextMenu/CMakeLists.txt index badfbb638..74c12621b 100644 --- a/shell_integration/windows/OCContextMenu/CMakeLists.txt +++ b/shell_integration/windows/OCContextMenu/CMakeLists.txt @@ -4,7 +4,6 @@ add_library(OCContextMenu MODULE OCContextMenu.cpp OCContextMenuFactory.cpp OCContextMenuRegHandler.cpp - stdafx.cpp OCContextMenu.rc OCContextMenu.def ) diff --git a/shell_integration/windows/OCContextMenu/OCClientInterface.cpp b/shell_integration/windows/OCContextMenu/OCClientInterface.cpp index f855310e5..ad7a35564 100644 --- a/shell_integration/windows/OCContextMenu/OCClientInterface.cpp +++ b/shell_integration/windows/OCContextMenu/OCClientInterface.cpp @@ -12,8 +12,6 @@ * details. */ -#include "stdafx.h" - #include "OCClientInterface.h" #include "CommunicationSocket.h" diff --git a/shell_integration/windows/OCContextMenu/OCContextMenu.cpp b/shell_integration/windows/OCContextMenu/OCContextMenu.cpp index 86d8fea12..93b548c57 100644 --- a/shell_integration/windows/OCContextMenu/OCContextMenu.cpp +++ b/shell_integration/windows/OCContextMenu/OCContextMenu.cpp @@ -12,8 +12,6 @@ * details. */ -#include "stdafx.h" - #include "OCContextMenu.h" #include "OCClientInterface.h" @@ -21,6 +19,7 @@ #include <shlwapi.h> #include <shellapi.h> #include <StringUtil.h> +#include <strsafe.h> extern long g_cDllRef; diff --git a/shell_integration/windows/OCContextMenu/OCContextMenu.rc b/shell_integration/windows/OCContextMenu/OCContextMenu.rc Binary files differindex 9b11cc534..2d1826e23 100644 --- a/shell_integration/windows/OCContextMenu/OCContextMenu.rc +++ b/shell_integration/windows/OCContextMenu/OCContextMenu.rc diff --git a/shell_integration/windows/OCContextMenu/OCContextMenuFactory.cpp b/shell_integration/windows/OCContextMenu/OCContextMenuFactory.cpp index 006a0091a..80c68bc37 100644 --- a/shell_integration/windows/OCContextMenu/OCContextMenuFactory.cpp +++ b/shell_integration/windows/OCContextMenu/OCContextMenuFactory.cpp @@ -12,8 +12,6 @@ * details. */ -#include "stdafx.h" - #include "OCContextMenuFactory.h" #include "OCContextMenu.h" #include <new> @@ -88,4 +86,4 @@ IFACEMETHODIMP OCContextMenuFactory::LockServer(BOOL fLock) InterlockedDecrement(&g_cDllRef); } return S_OK; -}
\ No newline at end of file +} diff --git a/shell_integration/windows/OCContextMenu/OCContextMenuRegHandler.cpp b/shell_integration/windows/OCContextMenu/OCContextMenuRegHandler.cpp index f9d1f6385..4b3f48280 100644 --- a/shell_integration/windows/OCContextMenu/OCContextMenuRegHandler.cpp +++ b/shell_integration/windows/OCContextMenu/OCContextMenuRegHandler.cpp @@ -12,8 +12,6 @@ * details. */ -#include "stdafx.h" - #include "OCContextMenuRegHandler.h" #include "RegDelnode.h" #include <strsafe.h> diff --git a/shell_integration/windows/OCContextMenu/OCContextMenuRegHandler.h b/shell_integration/windows/OCContextMenu/OCContextMenuRegHandler.h index 061ee545d..b406dadc8 100644 --- a/shell_integration/windows/OCContextMenu/OCContextMenuRegHandler.h +++ b/shell_integration/windows/OCContextMenu/OCContextMenuRegHandler.h @@ -12,13 +12,8 @@ * details. */ - -#ifndef OCCONTEXTMENUREGHANDLER_H -#define OCCONTEXTMENUREGHANDLER_H - #pragma once - -#include "stdafx.h" +#include <windows.h> class __declspec(dllexport) OCContextMenuRegHandler { @@ -34,5 +29,3 @@ public: static HRESULT RegisterShellExtContextMenuHandler(PCWSTR pszFileType, const CLSID& clsid, PCWSTR pszFriendlyName); static HRESULT UnregisterShellExtContextMenuHandler(PCWSTR pszFileType, PCWSTR pszFriendlyName); }; - -#endif //OCCONTEXTMENUREGHANDLER_H
\ No newline at end of file diff --git a/shell_integration/windows/OCContextMenu/dllmain.cpp b/shell_integration/windows/OCContextMenu/dllmain.cpp index 088dea767..7d6d77dd0 100644 --- a/shell_integration/windows/OCContextMenu/dllmain.cpp +++ b/shell_integration/windows/OCContextMenu/dllmain.cpp @@ -12,8 +12,6 @@ * details. */ -#include "stdafx.h" - #include <windows.h> #include <Guiddef.h> #include "OCContextMenuRegHandler.h" @@ -105,4 +103,4 @@ STDAPI DllUnregisterServer(void) } return hr; -}
\ No newline at end of file +} diff --git a/shell_integration/windows/OCContextMenu/resource.h b/shell_integration/windows/OCContextMenu/resource.h deleted file mode 100644 index b9407b5bc..000000000 --- a/shell_integration/windows/OCContextMenu/resource.h +++ /dev/null @@ -1,14 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by OCContextMenu.rc - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 101 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/shell_integration/windows/OCContextMenu/stdafx.cpp b/shell_integration/windows/OCContextMenu/stdafx.cpp deleted file mode 100644 index 2a649474d..000000000 --- a/shell_integration/windows/OCContextMenu/stdafx.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// OCContextMenu.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - -// TODO: reference any additional headers you need in STDAFX.H -// and not in this file diff --git a/shell_integration/windows/OCContextMenu/stdafx.h b/shell_integration/windows/OCContextMenu/stdafx.h deleted file mode 100644 index e8b07f4f9..000000000 --- a/shell_integration/windows/OCContextMenu/stdafx.h +++ /dev/null @@ -1,17 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#pragma once - -#include "targetver.h" - -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -// Windows Header Files: -#include <windows.h> -#include <memory> -#include <strsafe.h> - - -// TODO: reference additional headers your program requires here diff --git a/shell_integration/windows/OCContextMenu/targetver.h b/shell_integration/windows/OCContextMenu/targetver.h deleted file mode 100644 index ce2bc7493..000000000 --- a/shell_integration/windows/OCContextMenu/targetver.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -// Including SDKDDKVer.h defines the highest available Windows platform. - -// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and -// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. - -#define WINVER 0x0501 -#define _WIN32_WINNT 0x0501 -#include <SDKDDKVer.h> diff --git a/shell_integration/windows/OCOverlays/CMakeLists.txt b/shell_integration/windows/OCOverlays/CMakeLists.txt index 13526b749..60d4a3748 100644 --- a/shell_integration/windows/OCOverlays/CMakeLists.txt +++ b/shell_integration/windows/OCOverlays/CMakeLists.txt @@ -3,7 +3,6 @@ add_library(OCOverlays MODULE OCOverlay.cpp OCOverlayFactory.cpp OCOverlayRegistrationHandler.cpp - stdafx.cpp OCOverlay.rc OCOverlays.def ) diff --git a/shell_integration/windows/OCOverlays/DllMain.cpp b/shell_integration/windows/OCOverlays/DllMain.cpp index 02166f591..52808c735 100644 --- a/shell_integration/windows/OCOverlays/DllMain.cpp +++ b/shell_integration/windows/OCOverlays/DllMain.cpp @@ -12,10 +12,9 @@ * details. */ -#include "stdafx.h" - #include "OCOverlayRegistrationHandler.h" #include "OCOverlayFactory.h" +#include "OverlayConstants.h" HINSTANCE instanceHandle = NULL; diff --git a/shell_integration/windows/OCOverlays/OCOverlay.cpp b/shell_integration/windows/OCOverlays/OCOverlay.cpp index dd03a8664..b5be36838 100644 --- a/shell_integration/windows/OCOverlays/OCOverlay.cpp +++ b/shell_integration/windows/OCOverlays/OCOverlay.cpp @@ -12,8 +12,6 @@ * details. */ -#include "stdafx.h" - #include "OCOverlay.h" #include "OCOverlayFactory.h" @@ -23,8 +21,6 @@ #include "UtilConstants.h" #include "RemotePathChecker.h" -#include "resource.h" - #include <algorithm> #include <iostream> #include <fstream> diff --git a/shell_integration/windows/OCOverlays/OCOverlay.h b/shell_integration/windows/OCOverlays/OCOverlay.h index af1aaf696..ab4c6d5cd 100644 --- a/shell_integration/windows/OCOverlays/OCOverlay.h +++ b/shell_integration/windows/OCOverlays/OCOverlay.h @@ -12,11 +12,10 @@ * details. */ -#ifndef OCOVERLAY_H -#define OCOVERLAY_H - #pragma once +#include <shlobj.h> + class OCOverlay : public IShellIconOverlayIdentifier { @@ -38,4 +37,3 @@ private: int _state; }; -#endif
\ No newline at end of file diff --git a/shell_integration/windows/OCOverlays/OCOverlay.rc b/shell_integration/windows/OCOverlays/OCOverlay.rc Binary files differindex 1d3004908..5f03bdf41 100644 --- a/shell_integration/windows/OCOverlays/OCOverlay.rc +++ b/shell_integration/windows/OCOverlays/OCOverlay.rc diff --git a/shell_integration/windows/OCOverlays/OCOverlayFactory.cpp b/shell_integration/windows/OCOverlays/OCOverlayFactory.cpp index 1a317dae1..66e240f9f 100644 --- a/shell_integration/windows/OCOverlays/OCOverlayFactory.cpp +++ b/shell_integration/windows/OCOverlays/OCOverlayFactory.cpp @@ -12,7 +12,8 @@ * details. */ -#include "stdafx.h" +#include <windows.h> +#include <new> #include "OCOverlayFactory.h" #include "OCOverlay.h" @@ -90,4 +91,4 @@ IFACEMETHODIMP OCOverlayFactory::LockServer(BOOL fLock) InterlockedDecrement(&dllReferenceCount); } return S_OK; -}
\ No newline at end of file +} diff --git a/shell_integration/windows/OCOverlays/OCOverlayRegistrationHandler.cpp b/shell_integration/windows/OCOverlays/OCOverlayRegistrationHandler.cpp index 0ef83b84c..7badf0f92 100644 --- a/shell_integration/windows/OCOverlays/OCOverlayRegistrationHandler.cpp +++ b/shell_integration/windows/OCOverlays/OCOverlayRegistrationHandler.cpp @@ -12,10 +12,10 @@ * details. */ -#include "stdafx.h" - #include "OCOverlayRegistrationHandler.h" +#include "OverlayConstants.h" +#include <windows.h> #include <iostream> #include <fstream> @@ -149,4 +149,4 @@ HRESULT OCOverlayRegistrationHandler::UnregisterCOMObject(const CLSID& clsid) } return S_OK; -}
\ No newline at end of file +} diff --git a/shell_integration/windows/OCOverlays/OCOverlayRegistrationHandler.h b/shell_integration/windows/OCOverlays/OCOverlayRegistrationHandler.h index 098ac6921..b77d20ea6 100644 --- a/shell_integration/windows/OCOverlays/OCOverlayRegistrationHandler.h +++ b/shell_integration/windows/OCOverlays/OCOverlayRegistrationHandler.h @@ -12,11 +12,10 @@ * details. */ -#ifndef OCOVERLAYREGISTRATIONHANDLER_H -#define OCOVERLAYREGISTRATIONHANDLER_H - #pragma once +#include <windows.h> + class __declspec(dllexport) OCOverlayRegistrationHandler { public: @@ -25,5 +24,3 @@ class __declspec(dllexport) OCOverlayRegistrationHandler static HRESULT RemoveRegistryEntries(PCWSTR friendlyName); static HRESULT UnregisterCOMObject(const CLSID& clsid); }; - -#endif
\ No newline at end of file diff --git a/shell_integration/windows/OCOverlays/OverlayConstants.h.original b/shell_integration/windows/OCOverlays/OverlayConstants.h.original deleted file mode 100644 index e244e1515..000000000 --- a/shell_integration/windows/OCOverlays/OverlayConstants.h.original +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. - * - * 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. - */ - -#define OVERLAY_ID [$overlay.id$] -#define OVERLAY_GUID L"[$overlay.guid$]" -#define OVERLAY_NAME L"[$overlay.name$]" - -#define REGISTRY_OVERLAY_KEY L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ShellIconOverlayIdentifiers" -#define REGISTRY_CLSID L"CLSID" -#define REGISTRY_IN_PROCESS L"InprocServer32" -#define REGISTRY_THREADING L"ThreadingModel" -#define REGISTRY_APARTMENT L"Apartment" -#define REGISTRY_VERSION L"Version" -#define REGISTRY_VERSION_NUMBER L"1.0" - -//Registry values for running -#define REGISTRY_ENABLE_OVERLAY L"EnableOverlay" - -#define GET_FILE_OVERLAY_ID L"getFileIconId" - -#define PORT 33001 diff --git a/shell_integration/windows/OCOverlays/resource.h b/shell_integration/windows/OCOverlays/resource.h Binary files differdeleted file mode 100644 index 3a3dab356..000000000 --- a/shell_integration/windows/OCOverlays/resource.h +++ /dev/null diff --git a/shell_integration/windows/OCOverlays/stdafx.cpp b/shell_integration/windows/OCOverlays/stdafx.cpp deleted file mode 100644 index fd4f341c7..000000000 --- a/shell_integration/windows/OCOverlays/stdafx.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "stdafx.h" diff --git a/shell_integration/windows/OCOverlays/stdafx.h b/shell_integration/windows/OCOverlays/stdafx.h deleted file mode 100644 index 3d94fc641..000000000 --- a/shell_integration/windows/OCOverlays/stdafx.h +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. - * - * 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. - */ - -#define WIN32_LEAN_AND_MEAN -#define WINVER 0x0501 -#define _WIN32_WINNT 0x0501 - -#include "CommunicationSocket.h" -#include "RegistryUtil.h" -#include "OverlayConstants.h" -#include "FileUtil.h" - -#include <string> -#include <new> -#include <Guiddef.h> -#include <windows.h> -#include <Shlwapi.h> -#include <shlobj.h> -#include <unknwn.h> -#include <vector> -#include <strsafe.h> diff --git a/shell_integration/windows/OCUtil/CMakeLists.txt b/shell_integration/windows/OCUtil/CMakeLists.txt index d353422f4..cf31dd3da 100644 --- a/shell_integration/windows/OCUtil/CMakeLists.txt +++ b/shell_integration/windows/OCUtil/CMakeLists.txt @@ -3,7 +3,6 @@ add_library(OCUtil STATIC FileUtil.cpp RegistryUtil.cpp RemotePathChecker.cpp - stdafx.cpp StringUtil.cpp OCUtil.rc ) diff --git a/shell_integration/windows/OCUtil/CommunicationSocket.cpp b/shell_integration/windows/OCUtil/CommunicationSocket.cpp index b7dd64c32..79ac498a2 100644 --- a/shell_integration/windows/OCUtil/CommunicationSocket.cpp +++ b/shell_integration/windows/OCUtil/CommunicationSocket.cpp @@ -12,8 +12,6 @@ * details. */ -#include "stdafx.h" - #include "CommunicationSocket.h" #include "UtilConstants.h" #include "StringUtil.h" diff --git a/shell_integration/windows/OCUtil/FileUtil.cpp b/shell_integration/windows/OCUtil/FileUtil.cpp index a0d381c92..971254c35 100644 --- a/shell_integration/windows/OCUtil/FileUtil.cpp +++ b/shell_integration/windows/OCUtil/FileUtil.cpp @@ -12,8 +12,6 @@ * details. */ -#include "stdafx.h" - #include "FileUtil.h" #include "RegistryUtil.h" #include "UtilConstants.h" @@ -83,4 +81,4 @@ bool FileUtil::IsChildFileOfRoot(const wchar_t* filePath) delete rootFolder; return needed; -}
\ No newline at end of file +} diff --git a/shell_integration/windows/OCUtil/OCUtil.rc b/shell_integration/windows/OCUtil/OCUtil.rc Binary files differindex 4fa556679..fac68a02e 100644 --- a/shell_integration/windows/OCUtil/OCUtil.rc +++ b/shell_integration/windows/OCUtil/OCUtil.rc diff --git a/shell_integration/windows/OCUtil/RegistryUtil.cpp b/shell_integration/windows/OCUtil/RegistryUtil.cpp index 5542ac4d6..94ca82558 100644 --- a/shell_integration/windows/OCUtil/RegistryUtil.cpp +++ b/shell_integration/windows/OCUtil/RegistryUtil.cpp @@ -12,10 +12,10 @@ * details. */ -#include "stdafx.h" - #include "RegistryUtil.h" +#include <windows.h> + using namespace std; #define SIZE 4096 diff --git a/shell_integration/windows/OCUtil/RemotePathChecker.cpp b/shell_integration/windows/OCUtil/RemotePathChecker.cpp index 37caee182..53c032e0b 100644 --- a/shell_integration/windows/OCUtil/RemotePathChecker.cpp +++ b/shell_integration/windows/OCUtil/RemotePathChecker.cpp @@ -11,8 +11,6 @@ * details. */ -#include "stdafx.h" - #include "CommunicationSocket.h" #include "RemotePathChecker.h" diff --git a/shell_integration/windows/OCUtil/StringUtil.cpp b/shell_integration/windows/OCUtil/StringUtil.cpp index bd056ba68..e23030e02 100644 --- a/shell_integration/windows/OCUtil/StringUtil.cpp +++ b/shell_integration/windows/OCUtil/StringUtil.cpp @@ -11,8 +11,6 @@ * details. */ -#include "stdafx.h" - #include <locale> #include <string> #include <codecvt> diff --git a/shell_integration/windows/OCUtil/StringUtil.h b/shell_integration/windows/OCUtil/StringUtil.h index c0cef5851..05e56ba8f 100644 --- a/shell_integration/windows/OCUtil/StringUtil.h +++ b/shell_integration/windows/OCUtil/StringUtil.h @@ -11,11 +11,9 @@ * details. */ -#ifndef STRINGUTIL_H -#define STRINGUTIL_H - #pragma once +#include <windows.h> #include <string> #include <cassert> @@ -86,5 +84,3 @@ public: return true; } }; - -#endif // STRINGUTIL_H diff --git a/shell_integration/windows/OCUtil/resource.h b/shell_integration/windows/OCUtil/resource.h deleted file mode 100644 index b9407b5bc..000000000 --- a/shell_integration/windows/OCUtil/resource.h +++ /dev/null @@ -1,14 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by OCContextMenu.rc - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 101 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/shell_integration/windows/OCUtil/stdafx.cpp b/shell_integration/windows/OCUtil/stdafx.cpp deleted file mode 100644 index fd4f341c7..000000000 --- a/shell_integration/windows/OCUtil/stdafx.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "stdafx.h" diff --git a/shell_integration/windows/OCUtil/stdafx.h b/shell_integration/windows/OCUtil/stdafx.h deleted file mode 100644 index e46161544..000000000 --- a/shell_integration/windows/OCUtil/stdafx.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -#define WIN32_LEAN_AND_MEAN -#define WINVER 0x0501 -#define _WIN32_WINNT 0x0501 - -#include <windows.h> |