Browse Source

finally silence that good ol appmenu error in linux

pull/6610/head
Jumar Macato 5 years ago
parent
commit
fa6a12c5ef
  1. 5
      src/Avalonia.Base/Logging/LogArea.cs
  2. 4
      src/Avalonia.FreeDesktop/DBusMenuExporter.cs

5
src/Avalonia.Base/Logging/LogArea.cs

@ -39,5 +39,10 @@ namespace Avalonia.Logging
/// The log event comes from Win32Platform.
/// </summary>
public const string Win32Platform = nameof(Win32Platform);
/// <summary>
/// The log event comes from Win32Platform.
/// </summary>
public const string X11Platform = nameof(X11Platform);
}
}

4
src/Avalonia.FreeDesktop/DBusMenuExporter.cs

@ -85,7 +85,9 @@ namespace Avalonia.FreeDesktop
}
catch (Exception e)
{
Console.Error.WriteLine(e);
Logging.Logger.TryGet(Logging.LogEventLevel.Error, Logging.LogArea.X11Platform)
?.Log(this, e.Message);
// It's not really important if this code succeeds,
// and it's not important to know if it succeeds
// since even if we register the window it's not guaranteed that

Loading…
Cancel
Save