diff --git a/Files/ViewModels/SettingsViewModel.cs b/Files/ViewModels/SettingsViewModel.cs index 49bc38c591a7..e16568da262a 100644 --- a/Files/ViewModels/SettingsViewModel.cs +++ b/Files/ViewModels/SettingsViewModel.cs @@ -101,7 +101,7 @@ public async void DetectQuickLook() catch (Exception ex) { NLog.LogManager.GetCurrentClassLogger().Warn(ex, ex.Message); - } + } } private void DetectRecycleBinPreference() @@ -229,23 +229,7 @@ public TimeStyle DisplayedTimeStyle } } - public string OneDriveCommercialPath { get; set; } = Environment.GetEnvironmentVariable("OneDriveCommercial"); - public string OneDrivePath { get; set; } = Environment.GetEnvironmentVariable("OneDriveConsumer"); - - public bool ShowFileOwner - { - get => Get(false); - set => Set(value); - } - - /// - /// Gets or sets a value indicating whether or not to cache files and folders. - /// - public bool UseFileListCache - { - get => Get(false); - set => Set(value); - } + #region DetailsView Column Settings /// /// Gets or sets a value indicating whether or not the date column should be visible. @@ -274,10 +258,12 @@ public bool ShowSizeColumn set => Set(value); } - #region CommonPaths + #endregion - // Any distinguishable path here is fine + #region CommonPaths + public string OneDriveCommercialPath { get; set; } = Environment.GetEnvironmentVariable("OneDriveCommercial"); + public string OneDrivePath { get; set; } = Environment.GetEnvironmentVariable("OneDriveConsumer"); public string DesktopPath { get; set; } = UserDataPaths.GetDefault().Desktop; public string DocumentsPath { get; set; } = UserDataPaths.GetDefault().Documents; public string DownloadsPath { get; set; } = UserDataPaths.GetDefault().Downloads; @@ -601,30 +587,30 @@ public bool ShowOpenInNewTabMenuItem #endregion Appearance + #region Experimental + /// - /// Gets or sets a value indicating whether or not WSL is supported. + /// Gets or sets a value indicating whether or not to show the item owner in the properties window. /// - public bool AreLinuxFilesSupported + public bool ShowFileOwner { get => Get(false); set => Set(value); } - public bool OpenNewTabPageOnStartup - { - get => Get(true); - set => Set(value); - } - /// - /// Gets or sets a value indicating whether or not to show a teaching tip informing the user about the status center. + /// Gets or sets a value indicating whether or not to cache files and folders. /// - public bool ShowStatusCenterTeachingTip + public bool UseFileListCache { get => Get(true); set => Set(value); } + #endregion Experimental + + #region Startup + /// /// Gets or sets a value indicating whether or not to navigate to a specific location when launching the app. /// @@ -635,29 +621,29 @@ public bool OpenASpecificPageOnStartup } /// - /// Gets or sets a value indicating whether or not continue the last session whenever the app is launched. + /// Gets or sets a value indicating the default startup location. /// - public bool ContinueLastSessionOnStartUp + public string OpenASpecificPageOnStartupPath { - get => Get(false); + get => Get(""); set => Set(value); } /// - /// Gets or sets a value indicating whether or not to restore tabs after restarting the app. + /// Gets or sets a value indicating whether or not continue the last session whenever the app is launched. /// - public bool ResumeAfterRestart + public bool ContinueLastSessionOnStartUp { get => Get(false); set => Set(value); } /// - /// Gets or sets a value indicating the default startup location. + /// Gets or sets a value indicating whether or not to open a page when the app is launched. /// - public string OpenASpecificPageOnStartupPath + public bool OpenNewTabPageOnStartup { - get => Get(""); + get => Get(true); set => Set(value); } @@ -669,7 +655,7 @@ public bool AlwaysOpenANewInstance get => Get(false); set => Set(value); } - + public string[] PagesOnStartupList { get => Get(null); @@ -682,6 +668,35 @@ public string[] LastSessionPages set => Set(value); } + #endregion Startup + + /// + /// Gets or sets a value indicating whether or not WSL is supported. + /// + public bool AreLinuxFilesSupported + { + get => Get(false); + set => Set(value); + } + + /// + /// Gets or sets a value indicating whether or not to show a teaching tip informing the user about the status center. + /// + public bool ShowStatusCenterTeachingTip + { + get => Get(true); + set => Set(value); + } + + /// + /// Gets or sets a value indicating whether or not to restore tabs after restarting the app. + /// + public bool ResumeAfterRestart + { + get => Get(false); + set => Set(value); + } + public event EventHandler ThemeModeChanged; public RelayCommand UpdateThemeElements => new RelayCommand(() => @@ -801,4 +816,4 @@ public void Dispose() DrivesManager?.Dispose(); } } -} +} \ No newline at end of file