mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-13 11:09:28 +08:00
moved app name to constructor to init only once
This commit is contained in:
parent
bf48729354
commit
197286c21e
@ -21,6 +21,7 @@ struct InvokeStruct
|
|||||||
CPowerRenameMenu::CPowerRenameMenu()
|
CPowerRenameMenu::CPowerRenameMenu()
|
||||||
{
|
{
|
||||||
ModuleAddRef();
|
ModuleAddRef();
|
||||||
|
app_name = GET_RESOURCE_STRING(IDS_POWERRENAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
CPowerRenameMenu::~CPowerRenameMenu()
|
CPowerRenameMenu::~CPowerRenameMenu()
|
||||||
@ -197,7 +198,6 @@ DWORD WINAPI CPowerRenameMenu::s_PowerRenameUIThreadProc(_In_ void* pData)
|
|||||||
|
|
||||||
HRESULT __stdcall CPowerRenameMenu::GetTitle(IShellItemArray* /*psiItemArray*/, LPWSTR* ppszName)
|
HRESULT __stdcall CPowerRenameMenu::GetTitle(IShellItemArray* /*psiItemArray*/, LPWSTR* ppszName)
|
||||||
{
|
{
|
||||||
app_name = GET_RESOURCE_STRING(IDS_POWERRENAME);
|
|
||||||
return SHStrDup(app_name.c_str(), ppszName);
|
return SHStrDup(app_name.c_str(), ppszName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,7 +167,6 @@ public:
|
|||||||
// Return the display name of the powertoy, this will be cached
|
// Return the display name of the powertoy, this will be cached
|
||||||
virtual PCWSTR get_name() override
|
virtual PCWSTR get_name() override
|
||||||
{
|
{
|
||||||
app_name = GET_RESOURCE_STRING(IDS_POWERRENAME);
|
|
||||||
return app_name.c_str();
|
return app_name.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,6 +300,7 @@ public:
|
|||||||
PowerRenameModule()
|
PowerRenameModule()
|
||||||
{
|
{
|
||||||
init_settings();
|
init_settings();
|
||||||
|
app_name = GET_RESOURCE_STRING(IDS_POWERRENAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
~PowerRenameModule(){};
|
~PowerRenameModule(){};
|
||||||
|
Loading…
Reference in New Issue
Block a user