diff --git a/src/file_item.vala b/src/file_item.vala index 4138a82..dd8e1ef 100644 --- a/src/file_item.vala +++ b/src/file_item.vala @@ -235,23 +235,26 @@ public class FileItem : DesktopItem { // terminator supports --new-tab and -e, --working-directory (no -w) WITH equal // xfce4-terminal supports -e, --tab, --window, and --working-directory (no -w) WITH equal - switch (preferred_terminal) { - // Terminals that use --tab - case "gnome-terminal": - case "mate-terminal": - case "xfce4-terminal": - args += "--tab"; - break; - - // Terminals that use --new-tab - case "konsole": - case "terminator": - args += "--new-tab"; - break; - - // Terminals that don't support tabs - default: - break; + if ((preferred_terminal == "gnome-terminal") && (_type == "file")) { + args += "--tab"; + } else { + switch (preferred_terminal) { + // Terminals that use --tab + case "mate-terminal": + case "xfce4-terminal": + args += "--tab"; + break; + + // Terminals that use --new-tab + case "konsole": + case "terminator": + args += "--new-tab"; + break; + + // Terminals that don't support tabs + default: + break; + } } string path = file.get_path();