[Awake]Fix DAISY build issues (#34054)

This PR addresses some post-merge issues caught by @davidegiacometti,
including:

1. Separator in the context menu shown when not running from inside
PowerToys.
2. "Keep display on" setting not persisting across switches between
modes.
3. Awake not launching in standalone mode.

Additionally:

1. Exits are now properly handled in **timed** and **expirable**
keep-awake modes when running standalone. This ensures that Awake exists
after completion and doesn't switch to an in-actionable passive mode.
2. Tray tooltips now cover how much time is left on the timer.
3. Fixes #29354
4. Avoids a nasty memory leak because of re-instantiating of `Icon`
objects for every tray update.
5. Adds DPI awareness to the context menu (#16123)
This commit is contained in:
Den Delimarsky
2024-07-30 08:08:37 -07:00
committed by GitHub
parent 5d77874382
commit e8ad4fa804
8 changed files with 255 additions and 113 deletions

View File

@@ -195,6 +195,42 @@ namespace Awake.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to d.
/// </summary>
internal static string AWAKE_LABEL_DAYS {
get {
return ResourceManager.GetString("AWAKE_LABEL_DAYS", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to h.
/// </summary>
internal static string AWAKE_LABEL_HOURS {
get {
return ResourceManager.GetString("AWAKE_LABEL_HOURS", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to m.
/// </summary>
internal static string AWAKE_LABEL_MINUTES {
get {
return ResourceManager.GetString("AWAKE_LABEL_MINUTES", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to s.
/// </summary>
internal static string AWAKE_LABEL_SECONDS {
get {
return ResourceManager.GetString("AWAKE_LABEL_SECONDS", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} minutes.
/// </summary>
@@ -241,7 +277,7 @@ namespace Awake.Properties {
}
/// <summary>
/// Looks up a localized string similar to Timed.
/// Looks up a localized string similar to Interval.
/// </summary>
internal static string AWAKE_TRAY_TEXT_TIMED {
get {

View File

@@ -187,6 +187,22 @@
<value>Passive</value>
</data>
<data name="AWAKE_TRAY_TEXT_TIMED" xml:space="preserve">
<value>Timed</value>
<value>Interval</value>
</data>
<data name="AWAKE_LABEL_DAYS" xml:space="preserve">
<value>d</value>
<comment>Used to display number of days in the system tray tooltip.</comment>
</data>
<data name="AWAKE_LABEL_HOURS" xml:space="preserve">
<value>h</value>
<comment>Used to display number of hours in the system tray tooltip.</comment>
</data>
<data name="AWAKE_LABEL_MINUTES" xml:space="preserve">
<value>m</value>
<comment>Used to display number of minutes in the system tray tooltip.</comment>
</data>
<data name="AWAKE_LABEL_SECONDS" xml:space="preserve">
<value>s</value>
<comment>Used to display number of seconds in the system tray tooltip.</comment>
</data>
</root>