[NewUtility]Advanced Paste (#23)

Advanced Paste V1 implementation

---------

Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
Co-authored-by: Niels Laute <niels.laute@live.nl>
Co-authored-by: Jordi Adoumie <98557455+joadoumie@users.noreply.github.com>
Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
This commit is contained in:
Craig Loewen
2024-05-09 10:32:03 -04:00
committed by Jaime Bernardo
parent c601a3e3e2
commit 483f7aa464
143 changed files with 5557 additions and 755 deletions

View File

@@ -30,6 +30,7 @@ namespace Common.UI
CropAndLock,
EnvironmentVariables,
Dashboard,
AdvancedPaste,
}
private static string SettingsWindowNameToString(SettingsWindow value)
@@ -74,6 +75,8 @@ namespace Common.UI
return "EnvironmentVariables";
case SettingsWindow.Dashboard:
return "Dashboard";
case SettingsWindow.AdvancedPaste:
return "AdvancedPaste";
default:
{
return string.Empty;

View File

@@ -124,9 +124,9 @@ namespace winrt::PowerToys::GPOWrapper::implementation
{
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredTextExtractorEnabledValue());
}
GpoRuleConfigured GPOWrapper::GetConfiguredPastePlainEnabledValue()
GpoRuleConfigured GPOWrapper::GetConfiguredAdvancedPasteEnabledValue()
{
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredPastePlainEnabledValue());
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredAdvancedPasteEnabledValue());
}
GpoRuleConfigured GPOWrapper::GetConfiguredVideoConferenceMuteEnabledValue()
{

View File

@@ -38,7 +38,7 @@ namespace winrt::PowerToys::GPOWrapper::implementation
static GpoRuleConfigured GetConfiguredScreenRulerEnabledValue();
static GpoRuleConfigured GetConfiguredShortcutGuideEnabledValue();
static GpoRuleConfigured GetConfiguredTextExtractorEnabledValue();
static GpoRuleConfigured GetConfiguredPastePlainEnabledValue();
static GpoRuleConfigured GetConfiguredAdvancedPasteEnabledValue();
static GpoRuleConfigured GetConfiguredVideoConferenceMuteEnabledValue();
static GpoRuleConfigured GetConfiguredPeekEnabledValue();
static GpoRuleConfigured GetDisableNewUpdateToastValue();

View File

@@ -42,7 +42,7 @@ namespace PowerToys
static GpoRuleConfigured GetConfiguredScreenRulerEnabledValue();
static GpoRuleConfigured GetConfiguredShortcutGuideEnabledValue();
static GpoRuleConfigured GetConfiguredTextExtractorEnabledValue();
static GpoRuleConfigured GetConfiguredPastePlainEnabledValue();
static GpoRuleConfigured GetConfiguredAdvancedPasteEnabledValue();
static GpoRuleConfigured GetConfiguredVideoConferenceMuteEnabledValue();
static GpoRuleConfigured GetConfiguredPeekEnabledValue();
static GpoRuleConfigured GetDisableNewUpdateToastValue();

View File

@@ -47,9 +47,9 @@ namespace PowerToys.GPOWrapperProjection
return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredTextExtractorEnabledValue();
}
public static GpoRuleConfigured GetConfiguredPastePlainEnabledValue()
public static GpoRuleConfigured GetConfiguredAdvancedPasteEnabledValue()
{
return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredPastePlainEnabledValue();
return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredAdvancedPasteEnabledValue();
}
public static GpoRuleConfigured GetConfiguredPeekEnabledValue()

View File

@@ -6,6 +6,7 @@ namespace ManagedCommon
{
public enum ModuleType
{
AdvancedPaste,
AlwaysOnTop,
Awake,
ColorPicker,
@@ -21,7 +22,6 @@ namespace ManagedCommon
MouseJump,
MousePointerCrosshairs,
MouseWithoutBorders,
PastePlain,
Peek,
PowerRename,
PowerLauncher,

View File

@@ -204,6 +204,18 @@ public
return gcnew String(CommonSharedConstants::SHOW_COLOR_PICKER_SHARED_EVENT);
}
static String ^ ShowAdvancedPasteSharedEvent() {
return gcnew String(CommonSharedConstants::SHOW_ADVANCED_PASTE_SHARED_EVENT);
}
static String ^ AdvancedPasteMarkdownEvent() {
return gcnew String(CommonSharedConstants::ADVANCED_PASTE_MARKDOWN_EVENT);
}
static String ^ AdvancedPasteJsonEvent() {
return gcnew String(CommonSharedConstants::ADVANCED_PASTE_JSON_EVENT);
}
static String ^ ShowPowerOCRSharedEvent() {
return gcnew String(CommonSharedConstants::SHOW_POWEROCR_SHARED_EVENT);
}

View File

@@ -25,6 +25,13 @@ namespace CommonSharedConstants
const wchar_t COLOR_PICKER_SEND_SETTINGS_TELEMETRY_EVENT[] = L"Local\\ColorPickerSettingsTelemetryEvent-6c7071d8-4014-46ec-b687-913bd8a422f1";
// Path to the event used to show Advanced Paste UI
const wchar_t SHOW_ADVANCED_PASTE_SHARED_EVENT[] = L"Local\\ShowAdvancedPasteEvent-9a46be2a-3e05-4186-b56b-4ae986ef2526";
const wchar_t ADVANCED_PASTE_MARKDOWN_EVENT[] = L"Local\\AdvancedPasteJsonEvent-a18c0798-3ee6-4fc5-bb9f-114c57ac0d47";
const wchar_t ADVANCED_PASTE_JSON_EVENT[] = L"Local\\AdvancedPasteJsonEvent-9ed021ab-b711-4cf3-9f33-135a698a9d21";
// Path to the event used to show Color Picker
const wchar_t SHOW_COLOR_PICKER_SHARED_EVENT[] = L"Local\\ShowColorPickerEvent-8c46be2a-3e05-4186-b56b-4ae986ef2525";

View File

@@ -51,7 +51,7 @@ namespace powertoys_gpo {
const std::wstring POLICY_CONFIGURE_ENABLED_SCREEN_RULER = L"ConfigureEnabledUtilityScreenRuler";
const std::wstring POLICY_CONFIGURE_ENABLED_SHORTCUT_GUIDE = L"ConfigureEnabledUtilityShortcutGuide";
const std::wstring POLICY_CONFIGURE_ENABLED_TEXT_EXTRACTOR = L"ConfigureEnabledUtilityTextExtractor";
const std::wstring POLICY_CONFIGURE_ENABLED_PASTE_PLAIN = L"ConfigureEnabledUtilityPastePlain";
const std::wstring POLICY_CONFIGURE_ENABLED_ADVANCED_PASTE = L"ConfigureEnabledUtilityAdvancedPaste";
const std::wstring POLICY_CONFIGURE_ENABLED_VIDEO_CONFERENCE_MUTE = L"ConfigureEnabledUtilityVideoConferenceMute";
const std::wstring POLICY_CONFIGURE_ENABLED_REGISTRY_PREVIEW = L"ConfigureEnabledUtilityRegistryPreview";
const std::wstring POLICY_CONFIGURE_ENABLED_MOUSE_WITHOUT_BORDERS = L"ConfigureEnabledUtilityMouseWithoutBorders";
@@ -361,9 +361,9 @@ namespace powertoys_gpo {
return getUtilityEnabledValue(POLICY_CONFIGURE_ENABLED_TEXT_EXTRACTOR);
}
inline gpo_rule_configured_t getConfiguredPastePlainEnabledValue()
inline gpo_rule_configured_t getConfiguredAdvancedPasteEnabledValue()
{
return getUtilityEnabledValue(POLICY_CONFIGURE_ENABLED_PASTE_PLAIN);
return getUtilityEnabledValue(POLICY_CONFIGURE_ENABLED_ADVANCED_PASTE);
}
inline gpo_rule_configured_t getConfiguredVideoConferenceMuteEnabledValue()