diff options
-rw-r--r-- | terminal.vala | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/terminal.vala b/terminal.vala index 13409f4..0013abd 100644 --- a/terminal.vala +++ b/terminal.vala @@ -352,16 +352,11 @@ class Terminal : Gtk.Overlay { return path; } - [GtkCallback] - void open_terminal() { - var cwd = get_local_directory_path(); - if (cwd == null) - return; - + void spawn_process(string? cwd, string[] argv) { Pid child; try { - Process.spawn_async(cwd, {PROGRAM_NAME}, Environ.get(), SpawnFlags.SEARCH_PATH, null, out child); + Process.spawn_async(cwd, argv, null, SpawnFlags.SEARCH_PATH, null, out child); } catch (Error e) { warning(e.message); infobar_show(e.message, Gtk.MessageType.ERROR); @@ -371,6 +366,14 @@ class Terminal : Gtk.Overlay { } [GtkCallback] + void open_terminal() { + var cwd = get_local_directory_path(); + if (cwd == null) + return; + spawn_process(cwd, {PROGRAM_NAME}); + } + + [GtkCallback] void open_directory() { var cwd = get_local_directory_path(); if (cwd == null) |