diff --git a/Flow.Launcher/CustomQueryHotkeySetting.xaml b/Flow.Launcher/CustomQueryHotkeySetting.xaml index 9575f8121..db99b704a 100644 --- a/Flow.Launcher/CustomQueryHotkeySetting.xaml +++ b/Flow.Launcher/CustomQueryHotkeySetting.xaml @@ -153,13 +153,13 @@ Style="{StaticResource AccentButtonStyle}"> Your selected {0} executable is invalid. {2}{2} - Click yes if you would like select the {0} executable agian. Click no if you would like to download {1} + Click yes if you would like select the {0} executable again. Click no if you would like to download {1} Unable to set {0} executable path, please try from Flow's settings (scroll down to the bottom). Fail to Init Plugins @@ -413,7 +413,7 @@ Select File Manager Learn more Please specify the file location of the file manager you using and add arguments as required. The "%d" represents the directory path to open for, used by the Arg for Folder field and for commands opening specific directories. The "%f" represents the file path to open for, used by the Arg for File field and for commands opening specific files. - For example, if the file manager uses a command such as "totalcmd.exe /A c:\windows" to open the c:\windows directory, the File Manager Path will be totalcmd.exe, and the Arg For Folder will be /A "%d". Certain file managers like QTTabBar may just require a path to be supplied, in this instance use "%d" as the File Manager Path and leave the rest of the fileds blank. + For example, if the file manager uses a command such as "totalcmd.exe /A c:\windows" to open the c:\windows directory, the File Manager Path will be totalcmd.exe, and the Arg For Folder will be /A "%d". Certain file managers like QTTabBar may just require a path to be supplied, in this instance use "%d" as the File Manager Path and leave the rest of the fields blank. File Manager Profile Name File Manager Path diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index aa5040dac..8474ba50e 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -284,6 +284,10 @@ namespace Flow.Launcher break; case nameof(Settings.Language): UpdateNotifyIconText(); + if (_settings.ShowHomePage && _viewModel.QueryResultsSelected() && string.IsNullOrEmpty(_viewModel.QueryText)) + { + _viewModel.QueryResults(); + } break; case nameof(Settings.Hotkey): UpdateNotifyIconText(); diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs index 136de3c5e..1b5a31519 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs @@ -100,7 +100,7 @@ namespace Flow.Launcher.Plugin.Explorer return Context.API.GetTranslation("plugin_explorer_plugin_description"); } - private void FillQuickAccessLinkNames() + private static void FillQuickAccessLinkNames() { // Legacy version does not have names for quick access links, so we fill them with the path name. foreach (var link in Settings.QuickAccessLinks) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/QuickAccessLinkSettings.xaml.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Views/QuickAccessLinkSettings.xaml.cs index eb66e1efc..e6294b98b 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/QuickAccessLinkSettings.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/QuickAccessLinkSettings.xaml.cs @@ -1,6 +1,7 @@ using System; using System.Collections.ObjectModel; using System.ComponentModel; +using System.IO; using System.Linq; using System.Windows; using System.Windows.Forms; @@ -14,6 +15,8 @@ namespace Flow.Launcher.Plugin.Explorer.Views; [INotifyPropertyChanged] public partial class QuickAccessLinkSettings { + private static readonly string ClassName = nameof(QuickAccessLinkSettings); + private string _selectedPath; public string SelectedPath { @@ -27,6 +30,9 @@ public partial class QuickAccessLinkSettings if (string.IsNullOrEmpty(_selectedName)) { SelectedName = _selectedPath.GetPathName(); + } + if (!string.IsNullOrEmpty(_selectedPath)) + { _accessLinkType = GetResultType(_selectedPath); } } @@ -187,13 +193,13 @@ public partial class QuickAccessLinkSettings private static ResultType GetResultType(string path) { // Check if the path is a file or folder - if (System.IO.File.Exists(path)) + if (File.Exists(path)) { return ResultType.File; } - else if (System.IO.Directory.Exists(path)) + else if (Directory.Exists(path)) { - if (string.Equals(System.IO.Path.GetPathRoot(path), path, StringComparison.OrdinalIgnoreCase)) + if (string.Equals(Path.GetPathRoot(path), path, StringComparison.OrdinalIgnoreCase)) { return ResultType.Volume; } @@ -205,6 +211,7 @@ public partial class QuickAccessLinkSettings else { // This should not happen, but just in case, we assume it's a folder + Main.Context.API.LogError(ClassName, $"The path '{path}' does not exist or is invalid. Defaulting to Folder type."); return ResultType.Folder; } }