From 5373cd373646ceb069c35715f086481f30cae34b Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Sat, 17 Dec 2022 21:29:25 +0800 Subject: [PATCH 01/53] Disable PATH programs by default --- Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs | 2 +- Plugins/Flow.Launcher.Plugin.Program/Settings.cs | 2 +- .../Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs index e89970fb4..f8c220610 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs @@ -620,7 +620,7 @@ namespace Flow.Launcher.Plugin.Program.Programs autoIndexPrograms = autoIndexPrograms.Concat(startMenu); } - if (settings.EnablePATHSource) + if (settings.EnablePathSource) { var path = PATHPrograms(settings.GetSuffixes(), protocols, commonParents); programs = programs.Concat(path); diff --git a/Plugins/Flow.Launcher.Plugin.Program/Settings.cs b/Plugins/Flow.Launcher.Plugin.Program/Settings.cs index e3e8b99b9..34da42f1f 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Settings.cs @@ -118,7 +118,7 @@ namespace Flow.Launcher.Plugin.Program public bool EnableDescription { get; set; } = false; public bool HideAppsPath { get; set; } = true; public bool EnableRegistrySource { get; set; } = true; - public bool EnablePATHSource { get; set; } = true; + public bool EnablePathSource { get; set; } = false; public string CustomizedExplorer { get; set; } = Explorer; public string CustomizedArgs { get; set; } = ExplorerArgs; diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs index 7da224b69..4abb39225 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs @@ -69,10 +69,10 @@ namespace Flow.Launcher.Plugin.Program.Views public bool EnablePATHSource { - get => _settings.EnablePATHSource; + get => _settings.EnablePathSource; set { - _settings.EnablePATHSource = value; + _settings.EnablePathSource = value; ReIndexing(); } } From 1d77d45fe276e691abe0042080aa039ca2279b21 Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Sat, 17 Dec 2022 22:00:04 +0800 Subject: [PATCH 02/53] Add an option to enable/dsiable UWP indexing --- .../Languages/en.xaml | 2 ++ Plugins/Flow.Launcher.Plugin.Program/Main.cs | 5 +---- .../Programs/UWP.cs | 18 ++++++++++++++---- .../Flow.Launcher.Plugin.Program/Settings.cs | 1 + .../Views/ProgramSetting.xaml | 11 ++++++++++- .../Views/ProgramSetting.xaml.cs | 12 ++++++++++++ 6 files changed, 40 insertions(+), 9 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml index 8d642b600..fb663f1a4 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml +++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml @@ -22,6 +22,8 @@ Indexing Index Sources Options + UWP Apps + When enabled, Flow will load UWP Applications Start Menu When enabled, Flow will load programs from the start menu Registry diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs index c94c1dca2..340d882da 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs @@ -5,7 +5,6 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using System.Windows.Controls; -using Flow.Launcher.Infrastructure; using Flow.Launcher.Infrastructure.Logger; using Flow.Launcher.Infrastructure.Storage; using Flow.Launcher.Plugin.Program.Programs; @@ -115,9 +114,7 @@ namespace Flow.Launcher.Plugin.Program public static void IndexUwpPrograms() { - var windows10 = new Version(10, 0); - var support = Environment.OSVersion.Version.Major >= windows10.Major; - var applications = support ? UWP.All() : Array.Empty(); + var applications = UWP.All(_settings); _uwps = applications; ResetCache(); } diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs index 28641dd00..35f0814a7 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs @@ -199,11 +199,14 @@ namespace Flow.Launcher.Plugin.Program.Programs }, }; - public static Application[] All() + public static Application[] All(Settings settings) { - var windows10 = new Version(10, 0); - var support = Environment.OSVersion.Version.Major >= windows10.Major; - if (support) + var support = SupportUWP(); + if (!support && settings.EnableUWP) + { + settings.EnableUWP = false; + } + if (settings.EnableUWP) { var applications = CurrentUserPackages().AsParallel().SelectMany(p => { @@ -241,6 +244,13 @@ namespace Flow.Launcher.Plugin.Program.Programs } } + public static bool SupportUWP() + { + var windows10 = new Version(10, 0); + var support = Environment.OSVersion.Version.Major >= windows10.Major; + return support; + } + private static IEnumerable CurrentUserPackages() { var u = WindowsIdentity.GetCurrent().User; diff --git a/Plugins/Flow.Launcher.Plugin.Program/Settings.cs b/Plugins/Flow.Launcher.Plugin.Program/Settings.cs index 34da42f1f..f59facaa4 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Settings.cs @@ -119,6 +119,7 @@ namespace Flow.Launcher.Plugin.Program public bool HideAppsPath { get; set; } = true; public bool EnableRegistrySource { get; set; } = true; public bool EnablePathSource { get; set; } = false; + public bool EnableUWP { get; set; } = true; public string CustomizedExplorer { get; set; } = Explorer; public string CustomizedArgs { get; set; } = ExplorerArgs; diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml index 957042de5..fa97de4f2 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml +++ b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml @@ -7,6 +7,9 @@ Height="520" DataContext="{Binding RelativeSource={RelativeSource Self}}" mc:Ignorable="d"> + + + @@ -27,6 +30,13 @@ Margin="0,0,14,0" HorizontalAlignment="Right" DockPanel.Dock="Right"> + - _settings.EnableUWP; + set + { + _settings.EnableUWP = value; + ReIndexing(); + } + } + public string CustomizedExplorerPath { get => _settings.CustomizedExplorer; @@ -89,6 +99,8 @@ namespace Flow.Launcher.Plugin.Program.Views set => _settings.CustomizedArgs = value; } + public bool ShowUWPCheckbox => UWP.SupportUWP(); + public ProgramSetting(PluginInitContext context, Settings settings, Win32[] win32s, UWP.Application[] uwps) { this.context = context; From bf91bd2492c86adc2459cb627cb23d094767ec33 Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Sat, 17 Dec 2022 22:27:36 +0800 Subject: [PATCH 03/53] Fix double click on header --- .../Views/ProgramSetting.xaml.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs index 163178782..4b63d38a5 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs @@ -395,8 +395,11 @@ namespace Flow.Launcher.Plugin.Program.Views private void programSourceView_MouseDoubleClick(object sender, MouseButtonEventArgs e) { - var selectedProgramSource = programSourceView.SelectedItem as ProgramSource; - EditProgramSource(selectedProgramSource); + if (((FrameworkElement)e.OriginalSource).DataContext is ProgramSource) + { + var selectedProgramSource = programSourceView.SelectedItem as ProgramSource; + EditProgramSource(selectedProgramSource); + } } private bool IsAllItemsUserAdded(List items) From 13eba18ac5bc70d5e5efad41373830077beac00b Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Sat, 17 Dec 2022 21:29:25 +0800 Subject: [PATCH 04/53] Disable PATH programs by default --- Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs | 2 +- Plugins/Flow.Launcher.Plugin.Program/Settings.cs | 2 +- .../Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs index e89970fb4..f8c220610 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs @@ -620,7 +620,7 @@ namespace Flow.Launcher.Plugin.Program.Programs autoIndexPrograms = autoIndexPrograms.Concat(startMenu); } - if (settings.EnablePATHSource) + if (settings.EnablePathSource) { var path = PATHPrograms(settings.GetSuffixes(), protocols, commonParents); programs = programs.Concat(path); diff --git a/Plugins/Flow.Launcher.Plugin.Program/Settings.cs b/Plugins/Flow.Launcher.Plugin.Program/Settings.cs index e3e8b99b9..34da42f1f 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Settings.cs @@ -118,7 +118,7 @@ namespace Flow.Launcher.Plugin.Program public bool EnableDescription { get; set; } = false; public bool HideAppsPath { get; set; } = true; public bool EnableRegistrySource { get; set; } = true; - public bool EnablePATHSource { get; set; } = true; + public bool EnablePathSource { get; set; } = false; public string CustomizedExplorer { get; set; } = Explorer; public string CustomizedArgs { get; set; } = ExplorerArgs; diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs index 7da224b69..4abb39225 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs @@ -69,10 +69,10 @@ namespace Flow.Launcher.Plugin.Program.Views public bool EnablePATHSource { - get => _settings.EnablePATHSource; + get => _settings.EnablePathSource; set { - _settings.EnablePATHSource = value; + _settings.EnablePathSource = value; ReIndexing(); } } From d3bae93a47ddce3558acf1f3ac9f6b4942342780 Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Sun, 18 Dec 2022 13:35:38 +0800 Subject: [PATCH 05/53] Revert "Disable PATH by default" --- Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs | 2 +- Plugins/Flow.Launcher.Plugin.Program/Settings.cs | 2 +- .../Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs index f8c220610..e89970fb4 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs @@ -620,7 +620,7 @@ namespace Flow.Launcher.Plugin.Program.Programs autoIndexPrograms = autoIndexPrograms.Concat(startMenu); } - if (settings.EnablePathSource) + if (settings.EnablePATHSource) { var path = PATHPrograms(settings.GetSuffixes(), protocols, commonParents); programs = programs.Concat(path); diff --git a/Plugins/Flow.Launcher.Plugin.Program/Settings.cs b/Plugins/Flow.Launcher.Plugin.Program/Settings.cs index f59facaa4..9fd6d13e7 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Settings.cs @@ -118,7 +118,7 @@ namespace Flow.Launcher.Plugin.Program public bool EnableDescription { get; set; } = false; public bool HideAppsPath { get; set; } = true; public bool EnableRegistrySource { get; set; } = true; - public bool EnablePathSource { get; set; } = false; + public bool EnablePATHSource { get; set; } = true; public bool EnableUWP { get; set; } = true; public string CustomizedExplorer { get; set; } = Explorer; diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs index 4b63d38a5..5b8ae023f 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs @@ -69,10 +69,10 @@ namespace Flow.Launcher.Plugin.Program.Views public bool EnablePATHSource { - get => _settings.EnablePathSource; + get => _settings.EnablePATHSource; set { - _settings.EnablePathSource = value; + _settings.EnablePATHSource = value; ReIndexing(); } } From 4fd5039e66f5a0a58b48a44afbac80fb4a50d682 Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Mon, 19 Dec 2022 00:37:02 +0800 Subject: [PATCH 06/53] Fix item can't be unselected after editing shortcut --- Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index a97a328e6..f160c2e04 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -775,8 +775,11 @@ namespace Flow.Launcher.ViewModel var shortcutSettingWindow = new CustomShortcutSetting(item.Key, item.Value, this); if (shortcutSettingWindow.ShowDialog() == true) { + // https://stackoverflow.com/questions/16789360/wpf-listbox-items-with-changing-hashcode + SelectedCustomShortcut = null; item.Key = shortcutSettingWindow.Key; item.Value = shortcutSettingWindow.Value; + SelectedCustomShortcut = item; return true; } return false; From 56d6433db014bcdae97e304d19f6269b2bca9aba Mon Sep 17 00:00:00 2001 From: Filip Horvat Date: Mon, 19 Dec 2022 21:07:07 +0100 Subject: [PATCH 07/53] Improve folder editor experience --- .../ContextMenu.cs | 9 +++-- .../Languages/da.xaml | 2 + .../Languages/de.xaml | 2 + .../Languages/en.xaml | 2 + .../Languages/es-419.xaml | 2 + .../Languages/es.xaml | 2 + .../Languages/fr.xaml | 2 + .../Languages/it.xaml | 2 + .../Languages/ja.xaml | 2 + .../Languages/ko.xaml | 2 + .../Languages/nb.xaml | 2 + .../Languages/nl.xaml | 2 + .../Languages/pl.xaml | 2 + .../Languages/pt-br.xaml | 2 + .../Languages/pt-pt.xaml | 2 + .../Languages/ru.xaml | 2 + .../Languages/sk.xaml | 2 + .../Languages/sr.xaml | 2 + .../Languages/tr.xaml | 2 + .../Languages/uk-UA.xaml | 2 + .../Languages/zh-cn.xaml | 2 + .../Languages/zh-tw.xaml | 2 + .../Flow.Launcher.Plugin.Explorer/Settings.cs | 4 +- .../ViewModels/SettingsViewModel.cs | 29 ++++++++++++-- .../Views/ExplorerSettings.xaml | 39 ++++++++++++++++--- 25 files changed, 109 insertions(+), 14 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs index 4733e09e9..afcfe89ee 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs @@ -40,7 +40,10 @@ namespace Flow.Launcher.Plugin.Explorer if (selectedResult.ContextData is SearchResult record) { if (record.Type == ResultType.File && !string.IsNullOrEmpty(Settings.EditorPath)) - contextMenus.Add(CreateOpenWithEditorResult(record)); + contextMenus.Add(CreateOpenWithEditorResult(record, Settings.EditorPath)); + + if (record.Type == ResultType.Folder && !string.IsNullOrEmpty(Settings.FolderEditorPath)) + contextMenus.Add(CreateOpenWithEditorResult(record, Settings.FolderEditorPath)); if (record.Type == ResultType.Folder && record.WindowsIndexed) { @@ -309,10 +312,8 @@ namespace Flow.Launcher.Plugin.Explorer - private Result CreateOpenWithEditorResult(SearchResult record) + private Result CreateOpenWithEditorResult(SearchResult record, string editorPath) { - string editorPath = Settings.EditorPath; - var name = $"{Context.API.GetTranslation("plugin_explorer_openwitheditor")} {Path.GetFileNameWithoutExtension(editorPath)}"; return new Result diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/da.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/da.xaml index 4431e811e..331a21742 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/da.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/da.xaml @@ -45,6 +45,8 @@ Everything Windows Index Direct Enumeration + Filredigeringssti + Mapperedigeringssti Content Search Engine Directory Recursive Search Engine diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/de.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/de.xaml index 8ed355b8c..0f345f2ce 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/de.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/de.xaml @@ -45,6 +45,8 @@ Everything Windows Index Direct Enumeration + Datei-Editor-Pfad + Ordner-Editor-Pfad Content Search Engine Directory Recursive Search Engine diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml index d44c67bf0..6d6ae3420 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml @@ -46,6 +46,8 @@ Everything Windows Index Direct Enumeration + File Editor Path + Folder Editor Path Content Search Engine Directory Recursive Search Engine diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/es-419.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/es-419.xaml index 8b8d26f4c..047ecac39 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/es-419.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/es-419.xaml @@ -45,6 +45,8 @@ Everything Windows Index Direct Enumeration + Ruta del editor + Folder Editor Path Content Search Engine Directory Recursive Search Engine diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/es.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/es.xaml index 04647d44d..0b56f8a62 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/es.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/es.xaml @@ -45,6 +45,8 @@ Everything Índice de Windows Enumeración directa + Ruta del editor + Ruta del editor de carpetas Motor de búsqueda de contenido Motor de búsqueda recursiva de directorio diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/fr.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/fr.xaml index dafe01173..d6ed3f049 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/fr.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/fr.xaml @@ -45,6 +45,8 @@ Everything Windows Index Direct Enumeration + Chemin de l'éditeur de fichiers + Chemin de l'éditeur de dossier Content Search Engine Directory Recursive Search Engine diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/it.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/it.xaml index 264fadc09..84cd85a01 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/it.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/it.xaml @@ -45,6 +45,8 @@ Tutto Windows Index Direct Enumeration + Percorso dell'editor di file + Percorso dell'editor delle cartelle Content Search Engine Directory Recursive Search Engine diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/ja.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/ja.xaml index 478df4103..51bdd0259 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/ja.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/ja.xaml @@ -45,6 +45,8 @@ Everything Windows Index Direct Enumeration + ファイル エディターのパス + フォルダー エディターのパス Content Search Engine Directory Recursive Search Engine diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/ko.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/ko.xaml index 30cc5e1c7..63d067606 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/ko.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/ko.xaml @@ -45,6 +45,8 @@ Everything Windows Index Direct Enumeration + 파일 편집기 경로 + 폴더 편집기 경로 Content Search Engine Directory Recursive Search Engine diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/nb.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/nb.xaml index c8fd77ac2..0d0786447 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/nb.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/nb.xaml @@ -45,6 +45,8 @@ Everything Windows Index Direct Enumeration + Filredigeringsbane + Mapperedigeringsbane Content Search Engine Directory Recursive Search Engine diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/nl.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/nl.xaml index eeb64b0da..05c08606c 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/nl.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/nl.xaml @@ -45,6 +45,8 @@ Everything Windows Index Direct Enumeration + Bestandseditor pad + Pad naar mapeditor Content Search Engine Directory Recursive Search Engine diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pl.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pl.xaml index 55713796e..6ba8b2c9d 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pl.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pl.xaml @@ -45,6 +45,8 @@ Everything Windows Index Direct Enumeration + Ścieżka edytora plików + Ścieżka edytora folderów Content Search Engine Directory Recursive Search Engine diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-br.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-br.xaml index 1beae76c3..7f5253104 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-br.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-br.xaml @@ -45,6 +45,8 @@ Everything Windows Index Direct Enumeration + File Editor Path + Folder Editor Path Content Search Engine Directory Recursive Search Engine diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-pt.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-pt.xaml index 560078ab1..564e9850d 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-pt.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-pt.xaml @@ -45,6 +45,8 @@ Everything Índice do Windows Enumeração direta + File Editor Path + Folder Editor Path Mecanismo de pesquisa para conteúdo Mecanismo de pesquisa recursiva de diretórios diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/ru.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/ru.xaml index 45f63fcba..2afd0a8ab 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/ru.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/ru.xaml @@ -45,6 +45,8 @@ Everything Windows Index Direct Enumeration + Путь к редактору файлов + Путь к редактору папки Content Search Engine Directory Recursive Search Engine diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/sk.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/sk.xaml index aa51a07a2..7198bc2f3 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/sk.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/sk.xaml @@ -45,6 +45,8 @@ Everything Index Windowsu Zoznam priečinkov + Cesta editora súborov + Cesta editora priečinkov Vyhľadávač obsahu Priečinkový rekurzívny vyhľadávač diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/sr.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/sr.xaml index 629dbd18c..dc14c9b59 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/sr.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/sr.xaml @@ -45,6 +45,8 @@ Everything Windows Index Direct Enumeration + File Editor Path + Folder Editor Path Content Search Engine Directory Recursive Search Engine diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/tr.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/tr.xaml index 28b7712fa..dd797f68a 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/tr.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/tr.xaml @@ -45,6 +45,8 @@ Everything Windows Index Direct Enumeration + Düzenleyici Konumu + Folder Editor Path Content Search Engine Directory Recursive Search Engine diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/uk-UA.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/uk-UA.xaml index 11a778fab..3f5d97e4b 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/uk-UA.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/uk-UA.xaml @@ -45,6 +45,8 @@ Everything Windows Index Direct Enumeration + Шлях редактора файлів + Шлях редактора папок Content Search Engine Directory Recursive Search Engine diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/zh-cn.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/zh-cn.xaml index 63783d108..1c40ef008 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/zh-cn.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/zh-cn.xaml @@ -45,6 +45,8 @@ Everything Windows 索引 直接枚举 + 文件编辑器路径 + 文件夹编辑器路径 文件内容搜索引擎 目录递归搜索引擎 diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/zh-tw.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/zh-tw.xaml index 499f659f4..c125664f0 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/zh-tw.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/zh-tw.xaml @@ -45,6 +45,8 @@ Everything Windows Index Direct Enumeration + 文件編輯器路徑 + 文件夾編輯器路徑 Content Search Engine Directory Recursive Search Engine diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs index 67c4061d4..97bd67f2e 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs @@ -1,4 +1,4 @@ -using Flow.Launcher.Plugin.Everything.Everything; +using Flow.Launcher.Plugin.Everything.Everything; using Flow.Launcher.Plugin.Explorer.Search; using Flow.Launcher.Plugin.Explorer.Search.Everything; using Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks; @@ -23,6 +23,8 @@ namespace Flow.Launcher.Plugin.Explorer public string EditorPath { get; set; } = ""; + public string FolderEditorPath { get; set; } = ""; + public string ShellPath { get; set; } = "cmd"; diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs index 5975d3f16..bc026d095 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs @@ -315,15 +315,26 @@ namespace Flow.Launcher.Plugin.Explorer.ViewModels Process.Start(psi); } - private ICommand? _openEditorPathCommand; + private ICommand? _openFileEditorPathCommand; - public ICommand OpenEditorPath => _openEditorPathCommand ??= new RelayCommand(_ => + public ICommand OpenFileEditorPath => _openFileEditorPathCommand ??= new RelayCommand(_ => { var path = PromptUserSelectPath(ResultType.File, Settings.EditorPath != null ? Path.GetDirectoryName(Settings.EditorPath) : null); if (path is null) return; - EditorPath = path; + FileEditorPath = path; + }); + + private ICommand? _openFolderEditorPathCommand; + + public ICommand OpenFolderEditorPath => _openFolderEditorPathCommand ??= new RelayCommand(_ => + { + var path = PromptUserSelectPath(ResultType.File, Settings.FolderEditorPath != null ? Path.GetDirectoryName(Settings.FolderEditorPath) : null); + if (path is null) + return; + + FolderEditorPath = path; }); private ICommand? _openShellPathCommand; @@ -338,7 +349,7 @@ namespace Flow.Launcher.Plugin.Explorer.ViewModels }); - public string EditorPath + public string FileEditorPath { get => Settings.EditorPath; set @@ -348,6 +359,16 @@ namespace Flow.Launcher.Plugin.Explorer.ViewModels } } + public string FolderEditorPath + { + get => Settings.FolderEditorPath; + set + { + Settings.FolderEditorPath = value; + OnPropertyChanged(); + } + } + public string ShellPath { get => Settings.ShellPath; diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml index 6b2877bf5..4a7baa566 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml @@ -175,7 +175,8 @@ - + +