mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-19 15:03:36 +08:00
[Settings] Run Plugin additional options: description (#17108)
* last changes * update ww settings * feedbvack and TimeDate plugin * Add property description
This commit is contained in:
parent
4c067bb728
commit
380add882c
@ -122,9 +122,9 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
||||
},
|
||||
new PluginAdditionalOption
|
||||
{
|
||||
// ToDo: When description property is implemented (#15853), move the note in brackets to description and update to: "The information is only shown, if more than one desktop exists."
|
||||
Key = nameof(SubtitleShowDesktopName),
|
||||
DisplayLabel = Resources.wox_plugin_windowwalker_SettingSubtitleDesktopName,
|
||||
DisplayDescription = Resources.wox_plugin_windowwalker_SettingSubtitleDesktopName_Description,
|
||||
Value = true,
|
||||
},
|
||||
new PluginAdditionalOption
|
||||
@ -135,16 +135,16 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
||||
},
|
||||
new PluginAdditionalOption
|
||||
{
|
||||
// ToDo: When description property is implemented (#15853), add description: "Be careful when activating this."
|
||||
Key = nameof(KillProcessTree),
|
||||
DisplayLabel = Resources.wox_plugin_windowwalker_SettingKillProcessTree,
|
||||
DisplayDescription = Resources.wox_plugin_windowwalker_SettingKillProcessTree_Description,
|
||||
Value = false,
|
||||
},
|
||||
new PluginAdditionalOption
|
||||
{
|
||||
// ToDo: When description property is implemented (#15853), move the note in brackets to description.
|
||||
Key = nameof(OpenAfterKillAndClose),
|
||||
DisplayLabel = Resources.wox_plugin_windowwalker_SettingOpenAfterKillAndClose,
|
||||
DisplayDescription = Resources.wox_plugin_windowwalker_SettingOpenAfterKillAndClose_Description,
|
||||
Value = false,
|
||||
},
|
||||
new PluginAdditionalOption
|
||||
@ -155,9 +155,9 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
||||
},
|
||||
new PluginAdditionalOption
|
||||
{
|
||||
// ToDo: When description property is implemented (#15853), add description: "Message is only shown when searching with direct activation command."
|
||||
Key = nameof(HideExplorerSettingInfo),
|
||||
DisplayLabel = Resources.wox_plugin_windowwalker_SettingExplorerSettingInfo,
|
||||
DisplayDescription = Resources.wox_plugin_windowwalker_SettingExplorerSettingInfo_Description,
|
||||
Value = false,
|
||||
},
|
||||
};
|
||||
|
@ -213,6 +213,15 @@ namespace Microsoft.Plugin.WindowWalker.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This message is only shown when searching with a direct activation command..
|
||||
/// </summary>
|
||||
public static string wox_plugin_windowwalker_SettingExplorerSettingInfo_Description {
|
||||
get {
|
||||
return ResourceManager.GetString("wox_plugin_windowwalker_SettingExplorerSettingInfo_Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Hide "kill process" button if additional permissions required.
|
||||
/// </summary>
|
||||
@ -232,7 +241,16 @@ namespace Microsoft.Plugin.WindowWalker.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stay open after closing windows and killing processes (Not working with kill process confirmation).
|
||||
/// Looks up a localized string similar to Be careful when activating this. Killing the whole process tree can lead to problematic application crashes..
|
||||
/// </summary>
|
||||
public static string wox_plugin_windowwalker_SettingKillProcessTree_Description {
|
||||
get {
|
||||
return ResourceManager.GetString("wox_plugin_windowwalker_SettingKillProcessTree_Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stay open after closing windows and killing processes.
|
||||
/// </summary>
|
||||
public static string wox_plugin_windowwalker_SettingOpenAfterKillAndClose {
|
||||
get {
|
||||
@ -240,6 +258,15 @@ namespace Microsoft.Plugin.WindowWalker.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This feature won't work if the kill process confirmation is enabled..
|
||||
/// </summary>
|
||||
public static string wox_plugin_windowwalker_SettingOpenAfterKillAndClose_Description {
|
||||
get {
|
||||
return ResourceManager.GetString("wox_plugin_windowwalker_SettingOpenAfterKillAndClose_Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Show only results from visible desktop.
|
||||
/// </summary>
|
||||
@ -250,7 +277,7 @@ namespace Microsoft.Plugin.WindowWalker.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Show desktop name in the subtitle (If two or more desktops exist).
|
||||
/// Looks up a localized string similar to Show desktop name in the subtitle.
|
||||
/// </summary>
|
||||
public static string wox_plugin_windowwalker_SettingSubtitleDesktopName {
|
||||
get {
|
||||
@ -258,6 +285,15 @@ namespace Microsoft.Plugin.WindowWalker.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This information is only shown in subtitle and tool tip, if you have at least two desktops..
|
||||
/// </summary>
|
||||
public static string wox_plugin_windowwalker_SettingSubtitleDesktopName_Description {
|
||||
get {
|
||||
return ResourceManager.GetString("wox_plugin_windowwalker_SettingSubtitleDesktopName_Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Show process id in the subtitle.
|
||||
/// </summary>
|
||||
|
@ -140,13 +140,13 @@
|
||||
<value>Show only results from visible desktop</value>
|
||||
</data>
|
||||
<data name="wox_plugin_windowwalker_SettingSubtitleDesktopName" xml:space="preserve">
|
||||
<value>Show desktop name in the subtitle (If two or more desktops exist)</value>
|
||||
<value>Show desktop name in the subtitle</value>
|
||||
</data>
|
||||
<data name="wox_plugin_windowwalker_SettingSubtitlePid" xml:space="preserve">
|
||||
<value>Show process id in the subtitle</value>
|
||||
</data>
|
||||
<data name="wox_plugin_windowwalker_SettingOpenAfterKillAndClose" xml:space="preserve">
|
||||
<value>Stay open after closing windows and killing processes (Not working with kill process confirmation)</value>
|
||||
<value>Stay open after closing windows and killing processes</value>
|
||||
</data>
|
||||
<data name="wox_plugin_windowwalker_Desktop" xml:space="preserve">
|
||||
<value>Desktop</value>
|
||||
@ -190,4 +190,16 @@
|
||||
<data name="wox_plugin_windowwalker_SettingKillProcessTree" xml:space="preserve">
|
||||
<value>Kill process and its child processes</value>
|
||||
</data>
|
||||
<data name="wox_plugin_windowwalker_SettingExplorerSettingInfo_Description" xml:space="preserve">
|
||||
<value>This message is only shown when searching with a direct activation command.</value>
|
||||
</data>
|
||||
<data name="wox_plugin_windowwalker_SettingKillProcessTree_Description" xml:space="preserve">
|
||||
<value>Be careful when activating this. Killing the whole process tree can lead to problematic application crashes.</value>
|
||||
</data>
|
||||
<data name="wox_plugin_windowwalker_SettingOpenAfterKillAndClose_Description" xml:space="preserve">
|
||||
<value>This feature won't work if the kill process confirmation is enabled.</value>
|
||||
</data>
|
||||
<data name="wox_plugin_windowwalker_SettingSubtitleDesktopName_Description" xml:space="preserve">
|
||||
<value>This information is only shown in subtitle and tool tip, if you have at least two desktops.</value>
|
||||
</data>
|
||||
</root>
|
@ -89,23 +89,23 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.Components
|
||||
{
|
||||
new PluginAdditionalOption()
|
||||
{
|
||||
// ToDo: When description property is implemented (#15853), move the note in brackets to description.
|
||||
Key = nameof(OnlyDateTimeNowGlobal),
|
||||
DisplayLabel = Resources.Microsoft_plugin_timedate_SettingOnlyDateTimeNowGlobal,
|
||||
DisplayDescription = Resources.Microsoft_plugin_timedate_SettingOnlyDateTimeNowGlobal_Description,
|
||||
Value = true,
|
||||
},
|
||||
new PluginAdditionalOption()
|
||||
{
|
||||
// ToDo: When description property is implemented (#15853), move the note in brackets to description.
|
||||
Key = nameof(TimeWithSeconds),
|
||||
DisplayLabel = Resources.Microsoft_plugin_timedate_SettingTimeWithSeconds,
|
||||
DisplayDescription = Resources.Microsoft_plugin_timedate_SettingTimeWithSeconds_Description,
|
||||
Value = false,
|
||||
},
|
||||
new PluginAdditionalOption()
|
||||
{
|
||||
// ToDo: When description property is implemented (#15853), move the note in brackets to description.
|
||||
Key = nameof(DateWithWeekday),
|
||||
DisplayLabel = Resources.Microsoft_plugin_timedate_SettingDateWithWeekday,
|
||||
DisplayDescription = Resources.Microsoft_plugin_timedate_SettingDateWithWeekday_Description,
|
||||
Value = false,
|
||||
},
|
||||
new PluginAdditionalOption()
|
||||
|
@ -403,7 +403,7 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Show date with weekday and name of month (Applies to 'Date' and 'Now' result).
|
||||
/// Looks up a localized string similar to Show date with weekday and name of month.
|
||||
/// </summary>
|
||||
internal static string Microsoft_plugin_timedate_SettingDateWithWeekday {
|
||||
get {
|
||||
@ -411,6 +411,15 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This setting applies to the 'Date' and 'Now' result..
|
||||
/// </summary>
|
||||
internal static string Microsoft_plugin_timedate_SettingDateWithWeekday_Description {
|
||||
get {
|
||||
return ResourceManager.GetString("Microsoft_plugin_timedate_SettingDateWithWeekday_Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Hide 'Invalid number input' error message on global queries.
|
||||
/// </summary>
|
||||
@ -421,8 +430,7 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Show only 'Time', 'Date' and 'Now' result on global queries
|
||||
///(Regardless of this setting, on global queries the first search word has to be a full match.).
|
||||
/// Looks up a localized string similar to Show only 'Time', 'Date' and 'Now' result on global queries.
|
||||
/// </summary>
|
||||
internal static string Microsoft_plugin_timedate_SettingOnlyDateTimeNowGlobal {
|
||||
get {
|
||||
@ -431,7 +439,16 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Show time with seconds (Applies to 'Time' and 'Now' result).
|
||||
/// Looks up a localized string similar to Regardless of this setting, for global queries the first word of the query has to be a complete match..
|
||||
/// </summary>
|
||||
internal static string Microsoft_plugin_timedate_SettingOnlyDateTimeNowGlobal_Description {
|
||||
get {
|
||||
return ResourceManager.GetString("Microsoft_plugin_timedate_SettingOnlyDateTimeNowGlobal_Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Show time with seconds.
|
||||
/// </summary>
|
||||
internal static string Microsoft_plugin_timedate_SettingTimeWithSeconds {
|
||||
get {
|
||||
@ -439,6 +456,15 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This setting applies to the 'Time' and 'Now' result..
|
||||
/// </summary>
|
||||
internal static string Microsoft_plugin_timedate_SettingTimeWithSeconds_Description {
|
||||
get {
|
||||
return ResourceManager.GetString("Microsoft_plugin_timedate_SettingTimeWithSeconds_Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Select or press Ctrl+C to copy.
|
||||
/// </summary>
|
||||
|
@ -247,17 +247,25 @@
|
||||
<value>Second</value>
|
||||
</data>
|
||||
<data name="Microsoft_plugin_timedate_SettingDateWithWeekday" xml:space="preserve">
|
||||
<value>Show date with weekday and name of month (Applies to 'Date' and 'Now' result)</value>
|
||||
<value>Show date with weekday and name of month</value>
|
||||
</data>
|
||||
<data name="Microsoft_plugin_timedate_SettingDateWithWeekday_Description" xml:space="preserve">
|
||||
<value>This setting applies to the 'Date' and 'Now' result.</value>
|
||||
</data>
|
||||
<data name="Microsoft_plugin_timedate_SettingHideNumberMessageOnGlobalQuery" xml:space="preserve">
|
||||
<value>Hide 'Invalid number input' error message on global queries</value>
|
||||
</data>
|
||||
<data name="Microsoft_plugin_timedate_SettingOnlyDateTimeNowGlobal" xml:space="preserve">
|
||||
<value>Show only 'Time', 'Date' and 'Now' result on global queries
|
||||
(Regardless of this setting, on global queries the first search word has to be a full match.)</value>
|
||||
<value>Show only 'Time', 'Date' and 'Now' result on global queries</value>
|
||||
</data>
|
||||
<data name="Microsoft_plugin_timedate_SettingOnlyDateTimeNowGlobal_Description" xml:space="preserve">
|
||||
<value>Regardless of this setting, for global queries the first word of the query has to be a complete match.</value>
|
||||
</data>
|
||||
<data name="Microsoft_plugin_timedate_SettingTimeWithSeconds" xml:space="preserve">
|
||||
<value>Show time with seconds (Applies to 'Time' and 'Now' result)</value>
|
||||
<value>Show time with seconds</value>
|
||||
</data>
|
||||
<data name="Microsoft_plugin_timedate_SettingTimeWithSeconds_Description" xml:space="preserve">
|
||||
<value>This setting applies to the 'Time' and 'Now' result.</value>
|
||||
</data>
|
||||
<data name="Microsoft_plugin_timedate_SubTitleNote" xml:space="preserve">
|
||||
<value>Select or press Ctrl+C to copy</value>
|
||||
|
@ -10,6 +10,11 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
|
||||
public string DisplayLabel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value to show a description of this setting in the settings ui. (Optional)
|
||||
/// </summary>
|
||||
public string DisplayDescription { get; set; }
|
||||
|
||||
public bool Value { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -18,6 +18,8 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
|
||||
public string DisplayLabel { get => _additionalOption.DisplayLabel; }
|
||||
|
||||
public string DisplayDescription { get => _additionalOption.DisplayDescription; }
|
||||
|
||||
public bool Value
|
||||
{
|
||||
get => _additionalOption.Value;
|
||||
|
@ -38,8 +38,18 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
|
||||
private void CheckBoxSubTextControl_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
StackPanel panel = new StackPanel() { Orientation = Orientation.Vertical };
|
||||
panel.Children.Add(new TextBlock() { Margin = new Thickness(0, 10, 0, 0), Text = Header });
|
||||
panel.Children.Add(new IsEnabledTextBlock() { Style = (Style)App.Current.Resources["SecondaryIsEnabledTextBlockStyle"], Text = Description });
|
||||
|
||||
// Add text box only if the description is not empty. Required for additional plugin options.
|
||||
if (!string.IsNullOrWhiteSpace(Description))
|
||||
{
|
||||
panel.Children.Add(new TextBlock() { Margin = new Thickness(0, 10, 0, 0), Text = Header });
|
||||
panel.Children.Add(new IsEnabledTextBlock() { Style = (Style)App.Current.Resources["SecondaryIsEnabledTextBlockStyle"], Text = Description });
|
||||
}
|
||||
else
|
||||
{
|
||||
panel.Children.Add(new TextBlock() { Margin = new Thickness(0, 0, 0, 0), Text = Header });
|
||||
}
|
||||
|
||||
_checkBoxSubTextControl.Content = panel;
|
||||
}
|
||||
|
||||
|
@ -253,7 +253,7 @@
|
||||
<DataTemplate x:DataType="ViewModels:PluginAdditionalOptionViewModel">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<Rectangle Style="{StaticResource ExpanderSeparatorStyle}" />
|
||||
<CheckBox Content="{x:Bind Path=DisplayLabel}"
|
||||
<controls:CheckBoxWithDescriptionControl Header="{x:Bind Path=DisplayLabel}" Description="{x:Bind Path=DisplayDescription}"
|
||||
IsChecked="{x:Bind Path=Value, Mode=TwoWay}"
|
||||
Margin="{StaticResource ExpanderSettingMargin}"/>
|
||||
</StackPanel>
|
||||
|
Loading…
Reference in New Issue
Block a user