Skip to content

Commit 56d6433

Browse files
committed
Improve folder editor experience
1 parent 9c369c4 commit 56d6433

25 files changed

+109
-14
lines changed

Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ public List<Result> LoadContextMenus(Result selectedResult)
4040
if (selectedResult.ContextData is SearchResult record)
4141
{
4242
if (record.Type == ResultType.File && !string.IsNullOrEmpty(Settings.EditorPath))
43-
contextMenus.Add(CreateOpenWithEditorResult(record));
43+
contextMenus.Add(CreateOpenWithEditorResult(record, Settings.EditorPath));
44+
45+
if (record.Type == ResultType.Folder && !string.IsNullOrEmpty(Settings.FolderEditorPath))
46+
contextMenus.Add(CreateOpenWithEditorResult(record, Settings.FolderEditorPath));
4447

4548
if (record.Type == ResultType.Folder && record.WindowsIndexed)
4649
{
@@ -309,10 +312,8 @@ private Result CreateOpenContainingFolderResult(SearchResult record)
309312

310313

311314

312-
private Result CreateOpenWithEditorResult(SearchResult record)
315+
private Result CreateOpenWithEditorResult(SearchResult record, string editorPath)
313316
{
314-
string editorPath = Settings.EditorPath;
315-
316317
var name = $"{Context.API.GetTranslation("plugin_explorer_openwitheditor")} {Path.GetFileNameWithoutExtension(editorPath)}";
317318

318319
return new Result

Plugins/Flow.Launcher.Plugin.Explorer/Languages/da.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
<system:String x:Key="plugin_explorer_engine_everything">Everything</system:String>
4646
<system:String x:Key="plugin_explorer_engine_windows_index">Windows Index</system:String>
4747
<system:String x:Key="plugin_explorer_path_enumeration_engine_none">Direct Enumeration</system:String>
48+
<system:String x:Key="plugin_explorer_file_editor_path">Filredigeringssti</system:String>
49+
<system:String x:Key="plugin_explorer_folder_editor_path">Mapperedigeringssti</system:String>
4850

4951
<system:String x:Key="plugin_explorer_Content_Search_Engine">Content Search Engine</system:String>
5052
<system:String x:Key="plugin_explorer_Directory_Recursive_Search_Engine">Directory Recursive Search Engine</system:String>

Plugins/Flow.Launcher.Plugin.Explorer/Languages/de.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
<system:String x:Key="plugin_explorer_engine_everything">Everything</system:String>
4646
<system:String x:Key="plugin_explorer_engine_windows_index">Windows Index</system:String>
4747
<system:String x:Key="plugin_explorer_path_enumeration_engine_none">Direct Enumeration</system:String>
48+
<system:String x:Key="plugin_explorer_file_editor_path">Datei-Editor-Pfad</system:String>
49+
<system:String x:Key="plugin_explorer_folder_editor_path">Ordner-Editor-Pfad</system:String>
4850

4951
<system:String x:Key="plugin_explorer_Content_Search_Engine">Content Search Engine</system:String>
5052
<system:String x:Key="plugin_explorer_Directory_Recursive_Search_Engine">Directory Recursive Search Engine</system:String>

Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
<system:String x:Key="plugin_explorer_engine_everything">Everything</system:String>
4747
<system:String x:Key="plugin_explorer_engine_windows_index">Windows Index</system:String>
4848
<system:String x:Key="plugin_explorer_path_enumeration_engine_none">Direct Enumeration</system:String>
49+
<system:String x:Key="plugin_explorer_file_editor_path">File Editor Path</system:String>
50+
<system:String x:Key="plugin_explorer_folder_editor_path">Folder Editor Path</system:String>
4951

5052
<system:String x:Key="plugin_explorer_Content_Search_Engine">Content Search Engine</system:String>
5153
<system:String x:Key="plugin_explorer_Directory_Recursive_Search_Engine">Directory Recursive Search Engine</system:String>

Plugins/Flow.Launcher.Plugin.Explorer/Languages/es-419.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
<system:String x:Key="plugin_explorer_engine_everything">Everything</system:String>
4646
<system:String x:Key="plugin_explorer_engine_windows_index">Windows Index</system:String>
4747
<system:String x:Key="plugin_explorer_path_enumeration_engine_none">Direct Enumeration</system:String>
48+
<system:String x:Key="plugin_explorer_file_editor_path">Ruta del editor</system:String>
49+
<system:String x:Key="plugin_explorer_folder_editor_path">Folder Editor Path</system:String>
4850

4951
<system:String x:Key="plugin_explorer_Content_Search_Engine">Content Search Engine</system:String>
5052
<system:String x:Key="plugin_explorer_Directory_Recursive_Search_Engine">Directory Recursive Search Engine</system:String>

Plugins/Flow.Launcher.Plugin.Explorer/Languages/es.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
<system:String x:Key="plugin_explorer_engine_everything">Everything</system:String>
4646
<system:String x:Key="plugin_explorer_engine_windows_index">Índice de Windows</system:String>
4747
<system:String x:Key="plugin_explorer_path_enumeration_engine_none">Enumeración directa</system:String>
48+
<system:String x:Key="plugin_explorer_file_editor_path">Ruta del editor</system:String>
49+
<system:String x:Key="plugin_explorer_folder_editor_path">Ruta del editor de carpetas</system:String>
4850

4951
<system:String x:Key="plugin_explorer_Content_Search_Engine">Motor de búsqueda de contenido</system:String>
5052
<system:String x:Key="plugin_explorer_Directory_Recursive_Search_Engine">Motor de búsqueda recursiva de directorio</system:String>

Plugins/Flow.Launcher.Plugin.Explorer/Languages/fr.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
<system:String x:Key="plugin_explorer_engine_everything">Everything</system:String>
4646
<system:String x:Key="plugin_explorer_engine_windows_index">Windows Index</system:String>
4747
<system:String x:Key="plugin_explorer_path_enumeration_engine_none">Direct Enumeration</system:String>
48+
<system:String x:Key="plugin_explorer_file_editor_path">Chemin de l'éditeur de fichiers</system:String>
49+
<system:String x:Key="plugin_explorer_folder_editor_path">Chemin de l'éditeur de dossier</system:String>
4850

4951
<system:String x:Key="plugin_explorer_Content_Search_Engine">Content Search Engine</system:String>
5052
<system:String x:Key="plugin_explorer_Directory_Recursive_Search_Engine">Directory Recursive Search Engine</system:String>

Plugins/Flow.Launcher.Plugin.Explorer/Languages/it.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
<system:String x:Key="plugin_explorer_engine_everything">Tutto</system:String>
4646
<system:String x:Key="plugin_explorer_engine_windows_index">Windows Index</system:String>
4747
<system:String x:Key="plugin_explorer_path_enumeration_engine_none">Direct Enumeration</system:String>
48+
<system:String x:Key="plugin_explorer_file_editor_path">Percorso dell'editor di file</system:String>
49+
<system:String x:Key="plugin_explorer_folder_editor_path">Percorso dell'editor delle cartelle</system:String>
4850

4951
<system:String x:Key="plugin_explorer_Content_Search_Engine">Content Search Engine</system:String>
5052
<system:String x:Key="plugin_explorer_Directory_Recursive_Search_Engine">Directory Recursive Search Engine</system:String>

Plugins/Flow.Launcher.Plugin.Explorer/Languages/ja.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
<system:String x:Key="plugin_explorer_engine_everything">Everything</system:String>
4646
<system:String x:Key="plugin_explorer_engine_windows_index">Windows Index</system:String>
4747
<system:String x:Key="plugin_explorer_path_enumeration_engine_none">Direct Enumeration</system:String>
48+
<system:String x:Key="plugin_explorer_file_editor_path">ファイル エディターのパス</system:String>
49+
<system:String x:Key="plugin_explorer_folder_editor_path">フォルダー エディターのパス</system:String>
4850

4951
<system:String x:Key="plugin_explorer_Content_Search_Engine">Content Search Engine</system:String>
5052
<system:String x:Key="plugin_explorer_Directory_Recursive_Search_Engine">Directory Recursive Search Engine</system:String>

Plugins/Flow.Launcher.Plugin.Explorer/Languages/ko.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
<system:String x:Key="plugin_explorer_engine_everything">Everything</system:String>
4646
<system:String x:Key="plugin_explorer_engine_windows_index">Windows Index</system:String>
4747
<system:String x:Key="plugin_explorer_path_enumeration_engine_none">Direct Enumeration</system:String>
48+
<system:String x:Key="plugin_explorer_file_editor_path">파일 편집기 경로</system:String>
49+
<system:String x:Key="plugin_explorer_folder_editor_path">폴더 편집기 경로</system:String>
4850

4951
<system:String x:Key="plugin_explorer_Content_Search_Engine">Content Search Engine</system:String>
5052
<system:String x:Key="plugin_explorer_Directory_Recursive_Search_Engine">Directory Recursive Search Engine</system:String>

0 commit comments

Comments
 (0)