mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
PowerToys interface: remove powertoys events and system_menu_helper functionality (#5323)
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include <interface/lowlevel_keyboard_event_data.h>
|
||||
#include <interface/win_hook_event_data.h>
|
||||
#include <settings_objects.h>
|
||||
#include <common.h>
|
||||
#include "powerpreview.h"
|
||||
@@ -49,11 +47,6 @@ const wchar_t* PowerPreviewModule::get_name()
|
||||
return m_moduleName.c_str();
|
||||
}
|
||||
|
||||
const wchar_t** PowerPreviewModule::get_events()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Return JSON with the configuration options.
|
||||
bool PowerPreviewModule::get_config(_Out_ wchar_t* buffer, _Out_ int* buffer_size)
|
||||
{
|
||||
@@ -89,7 +82,6 @@ bool PowerPreviewModule::get_config(_Out_ wchar_t* buffer, _Out_ int* buffer_siz
|
||||
thumbnailProvider->GetToggleSettingState());
|
||||
}
|
||||
|
||||
|
||||
return settings.serialize_to_buffer(buffer, buffer_size);
|
||||
}
|
||||
|
||||
@@ -182,12 +174,6 @@ bool PowerPreviewModule::is_enabled()
|
||||
return this->m_enabled;
|
||||
}
|
||||
|
||||
// Handle incoming event, data is event-specific
|
||||
intptr_t PowerPreviewModule::signal_event(const wchar_t* name, intptr_t data)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Load the settings file.
|
||||
void PowerPreviewModule::init_settings()
|
||||
{
|
||||
@@ -207,7 +193,6 @@ void PowerPreviewModule::init_settings()
|
||||
{
|
||||
thumbnailProvider->LoadState(settings);
|
||||
}
|
||||
|
||||
}
|
||||
catch (std::exception const& e)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ private:
|
||||
// The PowerToy state.
|
||||
bool m_enabled = false;
|
||||
std::wstring m_moduleName;
|
||||
std::vector<FileExplorerPreviewSettings *> m_previewHandlers;
|
||||
std::vector<FileExplorerPreviewSettings*> m_previewHandlers;
|
||||
std::vector<FileExplorerPreviewSettings*> m_thumbnailProviders;
|
||||
|
||||
public:
|
||||
@@ -39,8 +39,7 @@ public:
|
||||
GET_RESOURCE_STRING(IDS_PREVPANE_MD_SETTINGS_DESCRIPTION),
|
||||
L"{45769bcc-e8fd-42d0-947e-02beef77a1f5}",
|
||||
L"Markdown Preview Handler",
|
||||
new RegistryWrapper())
|
||||
}),
|
||||
new RegistryWrapper()) }),
|
||||
m_thumbnailProviders(
|
||||
{ // TODO: MOVE THIS SVG Thumbnail Provider settings object.
|
||||
new FileExplorerPreviewSettings(
|
||||
@@ -49,22 +48,17 @@ public:
|
||||
GET_RESOURCE_STRING(IDS_SVG_THUMBNAIL_PROVIDER_SETTINGS_DESCRIPTION),
|
||||
L"{36B27788-A8BB-4698-A756-DF9F11F64F84}",
|
||||
L"SVG Thumbnail Provider",
|
||||
new RegistryWrapper())
|
||||
})
|
||||
new RegistryWrapper()) })
|
||||
{
|
||||
init_settings();
|
||||
};
|
||||
|
||||
virtual void destroy();
|
||||
virtual const wchar_t* get_name();
|
||||
virtual const wchar_t** get_events();
|
||||
virtual bool get_config(_Out_ wchar_t* buffer, _Out_ int* buffer_size);
|
||||
virtual void set_config(const wchar_t* config);
|
||||
virtual void enable();
|
||||
virtual void disable();
|
||||
virtual bool is_enabled();
|
||||
virtual void init_settings();
|
||||
virtual intptr_t signal_event(const wchar_t* name, intptr_t data);
|
||||
virtual void register_system_menu_helper(PowertoySystemMenuIface* helper) override {}
|
||||
virtual void signal_system_menu_action(const wchar_t* name) override {}
|
||||
};
|
||||
Reference in New Issue
Block a user