Skip to content

Commit 2d00e98

Browse files
authored
Merge pull request #1691 from fihorvat/folder-editor
Improve folder editor experience
2 parents cc0c198 + 277b8e9 commit 2d00e98

25 files changed

+109
-15
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 || record.Type == ResultType.Volume) && !string.IsNullOrEmpty(Settings.FolderEditorPath))
46+
contextMenus.Add(CreateOpenWithEditorResult(record, Settings.FolderEditorPath));
4447

4548
if (record.Type == ResultType.Folder)
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
@@ -48,6 +48,8 @@
4848
<system:String x:Key="plugin_explorer_engine_everything">Everything</system:String>
4949
<system:String x:Key="plugin_explorer_engine_windows_index">Windows Index</system:String>
5050
<system:String x:Key="plugin_explorer_path_enumeration_engine_none">Direct Enumeration</system:String>
51+
<system:String x:Key="plugin_explorer_file_editor_path">File Editor Path</system:String>
52+
<system:String x:Key="plugin_explorer_folder_editor_path">Folder Editor Path</system:String>
5153

5254
<system:String x:Key="plugin_explorer_Content_Search_Engine">Content Search Engine</system:String>
5355
<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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
<system:String x:Key="plugin_explorer_engine_everything">Everything</system:String>
4949
<system:String x:Key="plugin_explorer_engine_windows_index">윈도우 색인</system:String>
5050
<system:String x:Key="plugin_explorer_path_enumeration_engine_none">Flow Launcher</system:String>
51-
51+
<system:String x:Key="plugin_explorer_file_editor_path">파일 편집기 경로</system:String>
52+
<system:String x:Key="plugin_explorer_folder_editor_path">폴더 편집기 경로</system:String>
5253
<system:String x:Key="plugin_explorer_Content_Search_Engine">내용 검색 엔진</system:String>
5354
<system:String x:Key="plugin_explorer_Directory_Recursive_Search_Engine">경로 재귀 검색 엔진</system:String>
5455
<system:String x:Key="plugin_explorer_Index_Search_Engine">색인 검색 엔진</system:String>

0 commit comments

Comments
 (0)