mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[Settings]Ensure PTRun plugin icon paths are well formed / add unhandled exception handler (#33374)
* Fixed production crash with bad icon paths in Launcher plugins * Bumped MSBuildCacheCacheUniverse
This commit is contained in:
@@ -76,9 +76,16 @@ namespace Microsoft.PowerToys.Settings.UI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public App()
|
public App()
|
||||||
{
|
{
|
||||||
Logger.InitializeLogger("\\Settings\\Logs");
|
Logger.InitializeLogger(@"\Settings\Logs");
|
||||||
|
|
||||||
this.InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
UnhandledException += App_UnhandledException;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void App_UnhandledException(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e)
|
||||||
|
{
|
||||||
|
Logger.LogError("Unhandled exception", e.Exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void OpenSettingsWindow(Type type = null, bool ensurePageIsSelected = false)
|
public static void OpenSettingsWindow(Type type = null, bool ensurePageIsSelected = false)
|
||||||
|
|||||||
@@ -179,10 +179,9 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
|||||||
return $"{Name}. {Description}";
|
return $"{Name}. {Description}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string IconPath
|
#nullable enable
|
||||||
{
|
public Uri? IconPath => Uri.TryCreate(isDark() ? settings.IconPathDark : settings.IconPathLight, UriKind.Absolute, out var uri) ? uri : null;
|
||||||
get => isDark() ? settings.IconPathDark : settings.IconPathLight;
|
#nullable restore
|
||||||
}
|
|
||||||
|
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user