diff --git a/dll/shellext/stobject/CMakeLists.txt b/dll/shellext/stobject/CMakeLists.txt index 341fe672ae2..e25e433f6f0 100644 --- a/dll/shellext/stobject/CMakeLists.txt +++ b/dll/shellext/stobject/CMakeLists.txt @@ -20,13 +20,17 @@ spec2def(stobject.dll stobject.spec) file(GLOB_RECURSE stobject_rc_deps resources/*.*) add_rc_deps(stobject.rc ${stobject_rc_deps}) -add_library(stobject SHARED +list(APPEND SOURCE csystray.cpp stobject.cpp - stobject.rc hotplug.cpp power.cpp volume.cpp + precomp.h) + +add_library(stobject SHARED + ${SOURCE} + stobject.rc ${CMAKE_CURRENT_BINARY_DIR}/stobject.def) set_module_type(stobject win32dll UNICODE) @@ -48,4 +52,5 @@ add_importlibs(stobject kernel32 ntdll) +add_pch(stobject precomp.h SOURCE) add_cd_file(TARGET stobject DESTINATION reactos/system32 FOR all) diff --git a/dll/shellext/stobject/csystray.cpp b/dll/shellext/stobject/csystray.cpp index e4a2afe4035..89bd5c5ac03 100644 --- a/dll/shellext/stobject/csystray.cpp +++ b/dll/shellext/stobject/csystray.cpp @@ -9,7 +9,8 @@ #include "precomp.h" -WINE_DEFAULT_DEBUG_CHANNEL(stobject); +#include +#include SysTrayIconHandlers_t g_IconHandlers [] = { { Volume_Init, Volume_Shutdown, Volume_Update, Volume_Message }, diff --git a/dll/shellext/stobject/csystray.h b/dll/shellext/stobject/csystray.h index b95cd65577f..214a4c65492 100644 --- a/dll/shellext/stobject/csystray.h +++ b/dll/shellext/stobject/csystray.h @@ -7,6 +7,7 @@ * David Quintana * Shriraj Sawant a.k.a SR13 */ + #pragma once extern const GUID CLSID_SysTray; diff --git a/dll/shellext/stobject/hotplug.cpp b/dll/shellext/stobject/hotplug.cpp index 4b17a1baf27..5c6d3099a80 100644 --- a/dll/shellext/stobject/hotplug.cpp +++ b/dll/shellext/stobject/hotplug.cpp @@ -5,17 +5,14 @@ * PURPOSE: Removable devices notification icon handler * PROGRAMMERS: Shriraj Sawant a.k.a SR13 */ -#include + #include "precomp.h" -#include -#include -#include + #include #include -#include #include +#include -WINE_DEFAULT_DEBUG_CHANNEL(stobject); #define DISPLAY_NAME_LEN 40 //BOOL WINAPI UnregisterDeviceNotification(HDEVNOTIFY Handle); diff --git a/dll/shellext/stobject/power.cpp b/dll/shellext/stobject/power.cpp index a25de28cfbe..12382faf7d5 100644 --- a/dll/shellext/stobject/power.cpp +++ b/dll/shellext/stobject/power.cpp @@ -8,23 +8,17 @@ * David Quintana */ -#include -#include -#include -#include - #include "precomp.h" -#include "powrprof.h" -#include -#include -#include +#include +#include +#include +#include +#include #define GBS_HASBATTERY 0x1 #define GBS_ONBATTERY 0x2 -WINE_DEFAULT_DEBUG_CHANNEL(stobject); - int br_icons[5] = { IDI_BATTCAP0, IDI_BATTCAP1, IDI_BATTCAP2, IDI_BATTCAP3, IDI_BATTCAP4 }; // battery mode icons. int bc_icons[5] = { IDI_BATTCHA0, IDI_BATTCHA1, IDI_BATTCHA2, IDI_BATTCHA3, IDI_BATTCHA4 }; // charging mode icons. diff --git a/dll/shellext/stobject/precomp.h b/dll/shellext/stobject/precomp.h index 64824ba8254..cefd8ea16e0 100644 --- a/dll/shellext/stobject/precomp.h +++ b/dll/shellext/stobject/precomp.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef _STOBJECT_PRECOMP_H_ +#define _STOBJECT_PRECOMP_H_ #define WIN32_NO_STATUS #include @@ -12,27 +13,18 @@ #include #include -#include -#include -#include -#include #include -#include #include -#include -#include -#include #include #include #include #include -#include -#include - +#include +#include #include #include -#include +WINE_DEFAULT_DEBUG_CHANNEL(stobject); #include "resource.h" @@ -82,4 +74,6 @@ extern HRESULT STDMETHODCALLTYPE Power_Message(_In_ CSysTray * pSysTray, UINT uM #define POWER_TIMER_ID 2 #define VOLUME_TIMER_ID 3 -#define HOTPLUG_TIMER_ID 4 \ No newline at end of file +#define HOTPLUG_TIMER_ID 4 + +#endif /* _STOBJECT_PRECOMP_H_ */ diff --git a/dll/shellext/stobject/stobject.cpp b/dll/shellext/stobject/stobject.cpp index 3b0683bbe1f..455bf70ef96 100644 --- a/dll/shellext/stobject/stobject.cpp +++ b/dll/shellext/stobject/stobject.cpp @@ -9,9 +9,6 @@ #include "precomp.h" -#include -#include - BEGIN_OBJECT_MAP(ObjectMap) OBJECT_ENTRY(CLSID_SysTray, CSysTray) END_OBJECT_MAP() diff --git a/dll/shellext/stobject/volume.cpp b/dll/shellext/stobject/volume.cpp index b7cb3ff049c..a78bda743b6 100644 --- a/dll/shellext/stobject/volume.cpp +++ b/dll/shellext/stobject/volume.cpp @@ -8,11 +8,8 @@ #include "precomp.h" -#include #include -WINE_DEFAULT_DEBUG_CHANNEL(stobject); - HICON g_hIconVolume; HICON g_hIconMute;