From d91fc93ff2a5ea6d14ae64d39ad432a1cdb46491 Mon Sep 17 00:00:00 2001 From: Diogo Trindade Date: Fri, 29 Jul 2022 17:04:13 +0100 Subject: [PATCH] Linux - Fixed invalid culture when picking layout --- src/Artemis.UI.Linux/App.axaml.cs | 9 ++++++++- src/Artemis.UI.Shared/packages.lock.json | 5 ++++- .../Device/Tabs/DeviceLogicalLayoutDialogViewModel.cs | 5 ++++- src/Artemis.UI/packages.lock.json | 5 ++++- src/Artemis.VisualScripting/packages.lock.json | 5 ++++- 5 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/Artemis.UI.Linux/App.axaml.cs b/src/Artemis.UI.Linux/App.axaml.cs index 143078616..04f8572be 100644 --- a/src/Artemis.UI.Linux/App.axaml.cs +++ b/src/Artemis.UI.Linux/App.axaml.cs @@ -38,7 +38,14 @@ namespace Artemis.UI.Linux private void RegisterProviders() { IInputService inputService = _kernel.Get(); - // inputService.AddInputProvider(_kernel.Get()); + try + { + inputService.AddInputProvider(_kernel.Get()); + } + catch + { + //TODO: handle not having permissions for the input file. + } } } } \ No newline at end of file diff --git a/src/Artemis.UI.Shared/packages.lock.json b/src/Artemis.UI.Shared/packages.lock.json index 35d097aec..6c15f8f6b 100644 --- a/src/Artemis.UI.Shared/packages.lock.json +++ b/src/Artemis.UI.Shared/packages.lock.json @@ -1621,7 +1621,10 @@ "Unosquare.Swan.Lite": { "type": "Transitive", "resolved": "3.0.0", - "contentHash": "noPwJJl1Q9uparXy1ogtkmyAPGNfSGb0BLT1292nFH1jdMKje6o2kvvrQUvF9Xklj+IoiAI0UzF6Aqxlvo10lw==" + "contentHash": "noPwJJl1Q9uparXy1ogtkmyAPGNfSGb0BLT1292nFH1jdMKje6o2kvvrQUvF9Xklj+IoiAI0UzF6Aqxlvo10lw==", + "dependencies": { + "System.ValueTuple": "4.5.0" + } }, "artemis.core": { "type": "Project", diff --git a/src/Artemis.UI/Screens/Device/Tabs/DeviceLogicalLayoutDialogViewModel.cs b/src/Artemis.UI/Screens/Device/Tabs/DeviceLogicalLayoutDialogViewModel.cs index 936b3968c..c455d6034 100644 --- a/src/Artemis.UI/Screens/Device/Tabs/DeviceLogicalLayoutDialogViewModel.cs +++ b/src/Artemis.UI/Screens/Device/Tabs/DeviceLogicalLayoutDialogViewModel.cs @@ -25,7 +25,10 @@ public class DeviceLogicalLayoutDialogViewModel : ContentDialogViewModelBase Device = device; ApplyLogicalLayout = ReactiveCommand.Create(ExecuteApplyLogicalLayout, this.WhenAnyValue(vm => vm.SelectedRegion).Select(r => r != null)); Regions = new ObservableCollection(CultureInfo.GetCultures(CultureTypes.SpecificCultures) - .Where(c => c.LCID != LOCALE_INVARIANT && c.LCID != LOCALE_NEUTRAL && c.LCID != LOCALE_CUSTOM_DEFAULT) + .Where(c => c.LCID != LOCALE_INVARIANT && + c.LCID != LOCALE_NEUTRAL && + c.LCID != LOCALE_CUSTOM_DEFAULT && + !c.CultureTypes.HasFlag(CultureTypes.UserCustomCulture)) .Select(c => new RegionInfo(c.LCID)) .GroupBy(r => r.EnglishName) .Select(g => g.First()) diff --git a/src/Artemis.UI/packages.lock.json b/src/Artemis.UI/packages.lock.json index 11811f43e..ae29f6df0 100644 --- a/src/Artemis.UI/packages.lock.json +++ b/src/Artemis.UI/packages.lock.json @@ -1680,7 +1680,10 @@ "Unosquare.Swan.Lite": { "type": "Transitive", "resolved": "3.0.0", - "contentHash": "noPwJJl1Q9uparXy1ogtkmyAPGNfSGb0BLT1292nFH1jdMKje6o2kvvrQUvF9Xklj+IoiAI0UzF6Aqxlvo10lw==" + "contentHash": "noPwJJl1Q9uparXy1ogtkmyAPGNfSGb0BLT1292nFH1jdMKje6o2kvvrQUvF9Xklj+IoiAI0UzF6Aqxlvo10lw==", + "dependencies": { + "System.ValueTuple": "4.5.0" + } }, "artemis.core": { "type": "Project", diff --git a/src/Artemis.VisualScripting/packages.lock.json b/src/Artemis.VisualScripting/packages.lock.json index c604a4f44..3827d4212 100644 --- a/src/Artemis.VisualScripting/packages.lock.json +++ b/src/Artemis.VisualScripting/packages.lock.json @@ -1631,7 +1631,10 @@ "Unosquare.Swan.Lite": { "type": "Transitive", "resolved": "3.0.0", - "contentHash": "noPwJJl1Q9uparXy1ogtkmyAPGNfSGb0BLT1292nFH1jdMKje6o2kvvrQUvF9Xklj+IoiAI0UzF6Aqxlvo10lw==" + "contentHash": "noPwJJl1Q9uparXy1ogtkmyAPGNfSGb0BLT1292nFH1jdMKje6o2kvvrQUvF9Xklj+IoiAI0UzF6Aqxlvo10lw==", + "dependencies": { + "System.ValueTuple": "4.5.0" + } }, "artemis.core": { "type": "Project",