From 9c743acd2d88a0832bd6602fd2fd4c0c7625ae49 Mon Sep 17 00:00:00 2001 From: Alekhya Kommuru Date: Mon, 20 Jan 2020 11:52:46 -0800 Subject: [PATCH] Removed some IDs from resource file. Changed SHIFT to Shift --- src/modules/powerrename/dll/PowerRenameExt.rc | 8 +------ src/modules/powerrename/dll/dllmain.cpp | 22 +++++++++---------- src/modules/powerrename/dll/resource.h | 18 +++++---------- 3 files changed, 18 insertions(+), 30 deletions(-) diff --git a/src/modules/powerrename/dll/PowerRenameExt.rc b/src/modules/powerrename/dll/PowerRenameExt.rc index e85b27e058..57c3116be9 100644 --- a/src/modules/powerrename/dll/PowerRenameExt.rc +++ b/src/modules/powerrename/dll/PowerRenameExt.rc @@ -93,18 +93,12 @@ BEGIN IDS_POWERRENAME "PowerRename" IDS_SETTINGS_DESCRIPTION L"A Windows Shell Extension for more advanced bulk renaming using search and replace or regular expressions." - IDS_SETTINGS_ICON L"pt-power-rename" IDS_OVERVIEW_LINK L"https://github.com/microsoft/PowerToys/tree/master/src/modules/powerrename" - IDS_BOOL_PERSIST L"bool_persist_input" IDS_RESTORE_SEARCH L"Restore search, replace and flags values on launch from previous run." - IDS_MRU_ENABLED L"bool_mru_enabled" IDS_ENABLE_AUTO L"Enable autocomplete and autosuggest of recently used inputs for search and replace values." - IDS_MAX_MRU_SIZE L"int_max_mru_size" IDS_MAX_ITEMS L"Maximum number of items to show in recently used list for autocomplete dropdown." - IDS_SHOW_ICON L"bool_show_icon_on_menu" IDS_ICON_CONTEXT_MENU L"Show icon on context menu." - IDS_EXTENDED_MENU L"bool_show_extended_menu" L"Only show the PowerRename menu item on the extended context menu (SHIFT + Right-click)." - IDS_EXTENDED_MENU_INFO L"Only show the PowerRename menu item on the extended context menu (SHIFT + Right-click)." + IDS_EXTENDED_MENU_INFO L"Only show the PowerRename menu item on the extended context menu (Shift + Right-click)." END #endif // English (United States) resources diff --git a/src/modules/powerrename/dll/dllmain.cpp b/src/modules/powerrename/dll/dllmain.cpp index 0bfa4459af..14f37fd56e 100644 --- a/src/modules/powerrename/dll/dllmain.cpp +++ b/src/modules/powerrename/dll/dllmain.cpp @@ -206,23 +206,23 @@ public: // Create a Settings object. PowerToysSettings::Settings settings(hinstance, get_name()); settings.set_description(GET_RESOURCE_STRING(IDS_SETTINGS_DESCRIPTION)); - settings.set_icon_key(GET_RESOURCE_STRING(IDS_SETTINGS_ICON)); + settings.set_icon_key(L"pt-power-rename"); // Link to the GitHub PowerRename sub-page settings.set_overview_link(GET_RESOURCE_STRING(IDS_OVERVIEW_LINK)); settings.add_bool_toogle( - GET_RESOURCE_STRING(IDS_BOOL_PERSIST), + L"bool_persist_input", GET_RESOURCE_STRING(IDS_RESTORE_SEARCH), CSettings::GetPersistState()); settings.add_bool_toogle( - GET_RESOURCE_STRING(IDS_MRU_ENABLED), + L"bool_mru_enabled", GET_RESOURCE_STRING(IDS_ENABLE_AUTO), CSettings::GetMRUEnabled()); settings.add_int_spinner( - GET_RESOURCE_STRING(IDS_MAX_MRU_SIZE), + L"int_max_mru_size", GET_RESOURCE_STRING(IDS_MAX_ITEMS), CSettings::GetMaxMRUSize(), 0, @@ -230,12 +230,12 @@ public: 1); settings.add_bool_toogle( - GET_RESOURCE_STRING(IDS_SHOW_ICON), + L"bool_show_icon_on_menu", GET_RESOURCE_STRING(IDS_ICON_CONTEXT_MENU), CSettings::GetShowIconOnMenu()); settings.add_bool_toogle( - GET_RESOURCE_STRING(IDS_EXTENDED_MENU), + L"bool_show_extended_menu", GET_RESOURCE_STRING(IDS_EXTENDED_MENU_INFO), CSettings::GetExtendedContextMenuOnly()); @@ -252,11 +252,11 @@ public: PowerToysSettings::PowerToyValues values = PowerToysSettings::PowerToyValues::from_json_string(config); - CSettings::SetPersistState(values.get_bool_value(GET_RESOURCE_STRING(IDS_BOOL_PERSIST)).value()); - CSettings::SetMRUEnabled(values.get_bool_value(GET_RESOURCE_STRING(IDS_MRU_ENABLED)).value()); - CSettings::SetMaxMRUSize(values.get_int_value(GET_RESOURCE_STRING(IDS_MAX_MRU_SIZE)).value()); - CSettings::SetShowIconOnMenu(values.get_bool_value(GET_RESOURCE_STRING(IDS_SHOW_ICON)).value()); - CSettings::SetExtendedContextMenuOnly(values.get_bool_value(GET_RESOURCE_STRING(IDS_EXTENDED_MENU)).value()); + CSettings::SetPersistState(values.get_bool_value(L"bool_persist_input").value()); + CSettings::SetMRUEnabled(values.get_bool_value(L"bool_mru_enabled").value()); + CSettings::SetMaxMRUSize(values.get_int_value(L"int_max_mru_size").value()); + CSettings::SetShowIconOnMenu(values.get_bool_value(L"bool_show_icon_on_menu").value()); + CSettings::SetExtendedContextMenuOnly(values.get_bool_value(L"bool_show_extended_menu").value()); } catch (std::exception) { diff --git a/src/modules/powerrename/dll/resource.h b/src/modules/powerrename/dll/resource.h index 6d2c78ffb3..cf00d79cce 100644 --- a/src/modules/powerrename/dll/resource.h +++ b/src/modules/powerrename/dll/resource.h @@ -1,18 +1,12 @@ #define IDS_POWERRENAME 801 #define IDI_RENAME 132 #define IDS_SETTINGS_DESCRIPTION 2101 -#define IDS_SETTINGS_ICON 2102 -#define IDS_OVERVIEW_LINK 2103 -#define IDS_BOOL_PERSIST 2104 -#define IDS_RESTORE_SEARCH 2105 -#define IDS_MRU_ENABLED 2106 -#define IDS_ENABLE_AUTO 2107 -#define IDS_MAX_MRU_SIZE 2108 -#define IDS_MAX_ITEMS 2109 -#define IDS_SHOW_ICON 2110 -#define IDS_ICON_CONTEXT_MENU 2111 -#define IDS_EXTENDED_MENU 2112 -#define IDS_EXTENDED_MENU_INFO 2113 +#define IDS_OVERVIEW_LINK 2102 +#define IDS_RESTORE_SEARCH 2103 +#define IDS_ENABLE_AUTO 2104 +#define IDS_MAX_ITEMS 2105 +#define IDS_ICON_CONTEXT_MENU 2106 +#define IDS_EXTENDED_MENU_INFO 2107 // Next default values for new objects