mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 04:37:30 +02:00
Set window walker overview link (#1772)
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
#include "resource.h"
|
||||||
|
#include "../../../common/version.h"
|
||||||
|
|
||||||
1 VERSIONINFO
|
1 VERSIONINFO
|
||||||
FILEVERSION 0,1,0,0
|
FILEVERSION 0,1,0,0
|
||||||
PRODUCTVERSION 0,1,0,0
|
PRODUCTVERSION 0,1,0,0
|
||||||
@@ -15,14 +18,14 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "040904b0"
|
BLOCK "040904b0"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Company Name"
|
VALUE "CompanyName", COMPANY_NAME
|
||||||
VALUE "FileDescription", "$projectname$ Module"
|
VALUE "FileDescription", "$projectname$ Module"
|
||||||
VALUE "FileVersion", "0.1.0.0"
|
VALUE "FileVersion", FILE_VERSION_STRING
|
||||||
VALUE "InternalName", "$projectname$"
|
VALUE "InternalName", "$projectname$"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2019 Company Name"
|
VALUE "LegalCopyright", COPYRIGHT_NOTE
|
||||||
VALUE "OriginalFilename", "$projectname$.dll"
|
VALUE "OriginalFilename", "$projectname$.dll"
|
||||||
VALUE "ProductName", "$projectname$"
|
VALUE "ProductName", "$projectname$"
|
||||||
VALUE "ProductVersion", "0.1.0.0"
|
VALUE "ProductVersion", PRODUCT_VERSION_STRING
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
@@ -30,3 +33,10 @@ BEGIN
|
|||||||
VALUE "Translation", 0x409, 1200
|
VALUE "Translation", 0x409, 1200
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
|
STRINGTABLE
|
||||||
|
BEGIN
|
||||||
|
IDS_MODULE_NAME L"Window Walker"
|
||||||
|
IDS_GENERAL_DESCRIPTION L"A text-based Alt+Tab with search. Use Ctrl+Win to pop up."
|
||||||
|
IDS_OVERVIEW_LINK L"https://github.com/microsoft/PowerToys/blob/master/src/modules/windowwalker"
|
||||||
|
END
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
#include <interface/win_hook_event_data.h>
|
#include <interface/win_hook_event_data.h>
|
||||||
#include <common/settings_objects.h>
|
#include <common/settings_objects.h>
|
||||||
#include "trace.h"
|
#include "trace.h"
|
||||||
|
#include "resource.h"
|
||||||
|
|
||||||
extern "C" IMAGE_DOS_HEADER __ImageBase;
|
extern "C" IMAGE_DOS_HEADER __ImageBase;
|
||||||
|
|
||||||
@@ -24,11 +25,6 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserv
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The PowerToy name that will be shown in the settings.
|
|
||||||
const static wchar_t* MODULE_NAME = L"Window Walker";
|
|
||||||
// Add a description that will we shown in the module settings page.
|
|
||||||
const static wchar_t* MODULE_DESC = L"A text-based Alt+Tab with search. Use Ctrl+Win to pop up";
|
|
||||||
|
|
||||||
// These are the properties shown in the Settings page.
|
// These are the properties shown in the Settings page.
|
||||||
struct ModuleSettings
|
struct ModuleSettings
|
||||||
{
|
{
|
||||||
@@ -39,6 +35,9 @@ struct ModuleSettings
|
|||||||
class WindowWalker : public PowertoyModuleIface
|
class WindowWalker : public PowertoyModuleIface
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
// The PowerToy name that will be show in the settings.
|
||||||
|
std::wstring m_appName;
|
||||||
|
|
||||||
// The PowerToy state.
|
// The PowerToy state.
|
||||||
bool m_enabled = false;
|
bool m_enabled = false;
|
||||||
|
|
||||||
@@ -53,6 +52,7 @@ public:
|
|||||||
WindowWalker()
|
WindowWalker()
|
||||||
{
|
{
|
||||||
init_settings();
|
init_settings();
|
||||||
|
m_appName = GET_RESOURCE_STRING(IDS_MODULE_NAME);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Destroy the powertoy and free memory
|
// Destroy the powertoy and free memory
|
||||||
@@ -69,7 +69,7 @@ public:
|
|||||||
// Return the display name of the powertoy, this will be cached by the runner
|
// Return the display name of the powertoy, this will be cached by the runner
|
||||||
virtual const wchar_t* get_name() override
|
virtual const wchar_t* get_name() override
|
||||||
{
|
{
|
||||||
return MODULE_NAME;
|
return m_appName.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return array of the names of all events that this powertoy listens for, with
|
// Return array of the names of all events that this powertoy listens for, with
|
||||||
@@ -89,9 +89,11 @@ public:
|
|||||||
|
|
||||||
// Create a Settings object.
|
// Create a Settings object.
|
||||||
PowerToysSettings::Settings settings(hinstance, get_name());
|
PowerToysSettings::Settings settings(hinstance, get_name());
|
||||||
settings.set_description(MODULE_DESC);
|
settings.set_description(GET_RESOURCE_STRING(IDS_GENERAL_DESCRIPTION));
|
||||||
|
settings.set_overview_link(GET_RESOURCE_STRING(IDS_OVERVIEW_LINK));
|
||||||
settings.set_icon_key(L"pt-window-walker");
|
settings.set_icon_key(L"pt-window-walker");
|
||||||
|
|
||||||
|
|
||||||
return settings.serialize_to_buffer(buffer, buffer_size);
|
return settings.serialize_to_buffer(buffer, buffer_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#define IDS_MODULE_NAME 100
|
||||||
|
#define IDS_GENERAL_DESCRIPTION 101
|
||||||
|
#define IDS_OVERVIEW_LINK 102
|
||||||
|
|||||||
Reference in New Issue
Block a user