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 @@ - + +