mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
added the helper functions
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
#include <settings.h>
|
||||
#include <trace.h>
|
||||
#include <common/settings_objects.h>
|
||||
|
||||
#include <common/common.h>
|
||||
#include "resource.h"
|
||||
#include <atomic>
|
||||
|
||||
std::atomic<DWORD> g_dwModuleRefCount = 0;
|
||||
@@ -160,12 +161,14 @@ class PowerRenameModule : public PowertoyModuleIface
|
||||
private:
|
||||
// Enabled by default
|
||||
bool m_enabled = true;
|
||||
wchar_t* app_name;
|
||||
|
||||
public:
|
||||
// Return the display name of the powertoy, this will be cached
|
||||
virtual PCWSTR get_name() override
|
||||
{
|
||||
return L"PowerRename";
|
||||
app_name = GET_RES_STRING_WCHAR(IDS_POWERRENAME);
|
||||
return app_name;
|
||||
}
|
||||
|
||||
// Enable the powertoy
|
||||
@@ -299,6 +302,11 @@ public:
|
||||
{
|
||||
init_settings();
|
||||
}
|
||||
|
||||
~PowerRenameModule()
|
||||
{
|
||||
delete app_name;
|
||||
}
|
||||
};
|
||||
|
||||
extern "C" __declspec(dllexport) PowertoyModuleIface* __cdecl powertoy_create()
|
||||
|
||||
Reference in New Issue
Block a user