Browse Source

grayed out update stream

Krzysztof Krysiński 2 years ago
parent
commit
91b4562527

+ 1 - 1
src/PixiEditor/ViewModels/SubViewModels/Main/UpdateViewModel.cs

@@ -222,7 +222,7 @@ internal class UpdateViewModel : SubViewModel<ViewModelMain>
     #else
         string platformName = "Unknown";
     #endif
-        UpdateChannels.Add(new UpdateChannel($"Handled by {platformName}", "", ""));        
+        UpdateChannels.Add(new UpdateChannel(platformName, "", ""));
 #endif
 
         string updateChannel = IPreferences.Current.GetPreference<string>("UpdateChannel");

+ 3 - 4
src/PixiEditor/ViewModels/SubViewModels/UserPreferences/Settings/UpdateSettings.cs

@@ -15,13 +15,12 @@ internal class UpdateSettings : SettingsGroup
         }
     }
 
-    private string updateChannelName = GetPreference("UpdateChannel",
+    private string updateChannelName =
 #if UPDATE
-        "Release"
+        GetPreference("UpdateChannel", "Release");
 #else
-                    ViewModelMain.Current?.UpdateSubViewModel?.UpdateChannels?.FirstOrDefault()?.Name ?? "Release"
+        ViewModelMain.Current?.UpdateSubViewModel?.UpdateChannels?.FirstOrDefault()?.Name ?? "Unknown";
 #endif
-        );
 
     public string UpdateChannelName
     {

+ 8 - 2
src/PixiEditor/Views/Dialogs/SettingsWindow.xaml

@@ -129,10 +129,16 @@
                     IsChecked="{Binding SettingsSubViewModel.Update.CheckUpdatesOnStartup}">Check updates on startup</CheckBox>
 
                 <Label Grid.Row="11" Grid.Column="1" Style="{StaticResource SettingsText}">Update stream</Label>
-                <ComboBox Grid.Row="11" Grid.Column="2" VerticalAlignment="Center"
-                    Width="110" Height="21.96" HorizontalAlignment="Left"
+                <StackPanel Orientation="Horizontal" Grid.Row="11" Grid.Column="2" VerticalAlignment="Center"
+                            Height="21.96" HorizontalAlignment="Left">
+                <ComboBox Width="110" IsEnabled="{Binding Path=ShowUpdateTab}"
                     ItemsSource="{Binding SettingsSubViewModel.Update.UpdateChannels}"
                     SelectedValue="{Binding SettingsSubViewModel.Update.UpdateChannelName}"/>
+                <Image Cursor="Help" Margin="10 0 0 0" Source="/Images/Commands/PixiEditor/Links/OpenDocumentation.png"
+                       ToolTipService.InitialShowDelay="0"
+                       Visibility="{Binding Path=ShowUpdateTab, Converter={converters:InverseBoolToVisibilityConverter}}"
+                       ToolTip="Update channels can only be changed in standalone version (downloaded from https://pixieditor.net).&#x0a;Steam and Microsoft Store versions handle updates separately."/>
+                </StackPanel>
 
                 <Label Grid.Row="12" Grid.ColumnSpan="2" Style="{StaticResource SettingsHeader}">Debug</Label>
                 <CheckBox Grid.Row="13" Grid.Column="1" VerticalAlignment="Center"