[Awake] Context menu bug fixes (#16903)

* Fix the path to the icon

* Need the reverse when not working in isolation

* Updating some tray behaviors

* Making sure we have constants separately, and a filter

* Update tray logic

* Remove unnecessary menus

* Cleaning up how exit is done.

* Adding handling for tray commands

* Update with settings for dynamic times

* Proper reaction to timed keep-awake from the tray

* Proper handling for timed keep-awake from the tray

* Making sure that code analysis works correctly

* Making sure that errors are set in native calls

* Making sure the right icon path is used after testing

* Proper disposal of the context menu

* Fix tray designation

* Update with latest information on changes to the builds

* Update with guidance on files

* Update changelog doc

* Fix project file

* Remove `VTABLE`
This commit is contained in:
Den Delimarsky
2022-03-23 07:46:37 -07:00
committed by GitHub
parent ada3a9ad88
commit d7617a47d3
14 changed files with 498 additions and 256 deletions

View File

@@ -2,6 +2,7 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Library
@@ -14,6 +15,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library
Mode = AwakeMode.PASSIVE;
Hours = 0;
Minutes = 0;
TrayTimeShortcuts = new Dictionary<string, int>();
}
[JsonPropertyName("awake_keep_display_on")]
@@ -27,6 +29,9 @@ namespace Microsoft.PowerToys.Settings.UI.Library
[JsonPropertyName("awake_minutes")]
public uint Minutes { get; set; }
[JsonPropertyName("tray_times")]
public Dictionary<string, int> TrayTimeShortcuts { get; set; }
}
public enum AwakeMode