Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,11 @@ class AdvancedPaste : public PowertoyModuleIface
{
return m_enabled;
}

virtual bool is_enabled_by_default() const override
{
return true;
}
};

extern "C" __declspec(dllexport) PowertoyModuleIface* __cdecl powertoy_create()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ class CropAndLockModuleInterface : public PowertoyModuleIface
return m_enabled;
}

virtual bool is_enabled_by_default() const override
{
return true;
}

// Destroy the powertoy and free memory
virtual void destroy() override
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,11 @@ class EnvironmentVariablesModuleInterface : public PowertoyModuleIface
return m_enabled;
}

virtual bool is_enabled_by_default() const override
{
return true;
}

virtual void enable()
{
Logger::trace("EnvironmentVariablesModuleInterface::enable()");
Expand Down
5 changes: 5 additions & 0 deletions src/modules/Hosts/HostsModuleInterface/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ class HostsModuleInterface : public PowertoyModuleIface
return m_enabled;
}

virtual bool is_enabled_by_default() const override
{
return true;
}

virtual void enable()
{
Logger::trace("HostsModuleInterface::enable()");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,13 +464,13 @@ class LightSwitchInterface : public PowertoyModuleIface
}
}

// Returns if the powertoys is enabled
// Returns if the module is enabled
virtual bool is_enabled() override
{
return m_enabled;
}

// Returns whether the PowerToys should be enabled by default
// Returns whether the module should be enabled by default
virtual bool is_enabled_by_default() const override
{
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,11 @@ class MeasureTool : public PowertoyModuleIface
return m_enabled;
}

virtual bool is_enabled_by_default() const override
{
return true;
}

virtual bool on_hotkey(size_t /*hotkeyId*/) override
{
if (m_enabled)
Expand Down
5 changes: 5 additions & 0 deletions src/modules/MouseUtils/FindMyMouse/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ class FindMyMouse : public PowertoyModuleIface
return m_enabled;
}

virtual bool is_enabled_by_default() const override
{
return true;
}

virtual std::optional<HotkeyEx> GetHotkeyEx() override
{
Logger::trace("GetHotkeyEx()");
Expand Down
5 changes: 5 additions & 0 deletions src/modules/MouseUtils/MouseHighlighter/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ class MouseHighlighter : public PowertoyModuleIface
return m_enabled;
}

virtual bool is_enabled_by_default() const override
{
return true;
}

virtual std::optional<HotkeyEx> GetHotkeyEx() override
{
return m_hotkey;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ class ShortcutGuideModule : public PowertoyModuleIface
return _enabled;
}

virtual bool is_enabled_by_default() const override
{
return true;
}

virtual void destroy() override
{
this->disable();
Expand Down
5 changes: 5 additions & 0 deletions src/modules/Workspaces/WorkspacesModuleInterface/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ class WorkspacesModuleInterface : public PowertoyModuleIface
return m_enabled;
}

virtual bool is_enabled_by_default() const override
{
return true;
}

// Destroy the powertoy and free memory
virtual void destroy() override
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ class AlwaysOnTopModuleInterface : public PowertoyModuleIface
return m_enabled;
}

virtual bool is_enabled_by_default() const override
{
return true;
}

// Destroy the powertoy and free memory
virtual void destroy() override
{
Expand Down
5 changes: 5 additions & 0 deletions src/modules/awake/AwakeModuleInterface/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ class Awake : public PowertoyModuleIface
{
return m_enabled;
}

virtual bool is_enabled_by_default() const override
{
return true;
}
};

extern "C" __declspec(dllexport) PowertoyModuleIface* __cdecl powertoy_create()
Expand Down
5 changes: 5 additions & 0 deletions src/modules/cmdpal/CmdPalModuleInterface/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,11 @@ class CmdPal : public PowertoyModuleIface
{
return CmdPal::m_enabled.load();
}

virtual bool is_enabled_by_default() const override
{
return true;
}
};

std::atomic<bool> CmdPal::m_enabled{ false };
Expand Down
5 changes: 5 additions & 0 deletions src/modules/colorPicker/ColorPicker/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,11 @@ class ColorPicker : public PowertoyModuleIface
return m_enabled;
}

virtual bool is_enabled_by_default() const override
{
return true;
}

virtual void send_settings_telemetry() override
{
SetEvent(send_telemetry_event);
Expand Down
5 changes: 5 additions & 0 deletions src/modules/fancyzones/FancyZonesModuleInterface/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ class FancyZonesModuleInterface : public PowertoyModuleIface
return m_enabled;
}

virtual bool is_enabled_by_default() const override
{
return true;
}

// Destroy the powertoy and free memory
virtual void destroy() override
{
Expand Down
2 changes: 1 addition & 1 deletion src/modules/interface/powertoy_module_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class PowertoyModuleIface
{
}

virtual bool is_enabled_by_default() const { return true; }
virtual bool is_enabled_by_default() const { return false; }

/* Provides the GPO configuration value for the module. This should be overridden by the module interface to get the proper gpo policy setting. */
virtual powertoys_gpo::gpo_rule_configured_t gpo_policy_enabled_configuration()
Expand Down
5 changes: 5 additions & 0 deletions src/modules/launcher/Microsoft.Launcher/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,11 @@ class Microsoft_Launcher : public PowertoyModuleIface
return m_enabled;
}

virtual bool is_enabled_by_default() const override
{
return true;
}

// Return the invocation hotkey
virtual size_t get_hotkeys(Hotkey* hotkeys, size_t buffer_size) override
{
Expand Down
5 changes: 5 additions & 0 deletions src/modules/peek/peek/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,11 @@ class Peek : public PowertoyModuleIface
return m_enabled;
}

virtual bool is_enabled_by_default() const override
{
return true;
}

virtual size_t get_hotkeys(Hotkey* hotkeys, size_t buffer_size) override
{
if (m_hotkey.key)
Expand Down