aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/terminal.vala
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--terminal.vala13
1 files changed, 11 insertions, 2 deletions
diff --git a/terminal.vala b/terminal.vala
index fcd5ee0..86f086f 100644
--- a/terminal.vala
+++ b/terminal.vala
@@ -374,7 +374,16 @@ class Terminal : Gtk.Overlay {
[GtkCallback]
void open_directory() {
- uri_open(vte.get_current_directory_uri());
+ var cwd = get_local_directory_path();
+ if (cwd == null)
+ return;
+
+ try {
+ uri_open(Filename.to_uri(cwd));
+ } catch (Error e) {
+ warning(e.message);
+ infobar_show(e.message, Gtk.MessageType.ERROR);
+ }
}
void vte_copy(bool html = false) {
@@ -402,7 +411,7 @@ class Terminal : Gtk.Overlay {
copy_item_text.set_sensitive(vte.get_has_selection());
copy_item_html.set_sensitive(vte.get_has_selection());
open_terminal_item.set_sensitive(get_local_directory_path() != null);
- open_directory_item.set_sensitive(vte.get_current_directory_uri() != null);
+ open_directory_item.set_sensitive(get_local_directory_path() != null);
standard_context_menu.popup_at_pointer(event);
}
return true;