@@ -88,16 +88,7 @@ namespace Scratch.FolderManager {
8888 }
8989
9090 public override Gtk .Menu ? get_context_menu () {
91- var open_in_terminal_pane_item = new GLib .MenuItem (
92- (_(" Open in Terminal Pane" )),
93- GLib . Action . print_detailed_name (
94- MainWindow . ACTION_PREFIX + MainWindow . ACTION_OPEN_IN_TERMINAL ,
95- new Variant .string (file. path)
96- )
97- );
98-
9991 GLib . FileInfo info = null ;
100-
10192 try {
10293 info = file. file. query_info (GLib . FileAttribute . STANDARD_CONTENT_TYPE , GLib . FileQueryInfoFlags . NONE );
10394 } catch (Error e) {
@@ -133,7 +124,6 @@ namespace Scratch.FolderManager {
133124 );
134125
135126 var external_actions_section = new GLib .Menu ();
136- external_actions_section. append_item (open_in_terminal_pane_item);
137127 external_actions_section. append_item (create_submenu_for_open_in (file_type));
138128 if (contractor_items. get_n_items () > 0 ) {
139129 external_actions_section. append_submenu (_(" Other Actions" ), contractor_items);
@@ -158,6 +148,15 @@ namespace Scratch.FolderManager {
158148 }
159149
160150 protected GLib .MenuItem create_submenu_for_open_in (string ? file_type ) {
151+ var open_in_terminal_pane_item = new GLib .MenuItem (
152+ (_(" Terminal Pane" )),
153+ GLib . Action . print_detailed_name (
154+ MainWindow . ACTION_PREFIX + MainWindow . ACTION_OPEN_IN_TERMINAL ,
155+ new Variant .string (file. path)
156+ )
157+ );
158+ open_in_terminal_pane_item. set_icon (new ThemedIcon (" panel-bottom-symbolic" ));
159+
161160 var other_menu_item = new GLib .MenuItem (
162161 _(" Other Application…" ),
163162 GLib . Action . print_detailed_name (
@@ -169,9 +168,13 @@ namespace Scratch.FolderManager {
169168 var extra_section = new GLib .Menu ();
170169 extra_section. append_item (other_menu_item);
171170
171+ var terminal_pane_section = new Menu ();
172+ terminal_pane_section. append_item (open_in_terminal_pane_item);
173+
172174 file_type = file_type ?? " inode/directory" ;
173175
174176 var open_in_menu = new GLib .Menu ();
177+ open_in_menu. append_section (null , terminal_pane_section);
175178 open_in_menu. append_section (null , Utils . create_executable_app_items_for_file (file. file, file_type));
176179 open_in_menu. append_section (null , extra_section);
177180
0 commit comments