[gnome-builder] terminal: add helper to get current directory URI
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] terminal: add helper to get current directory URI
- Date: Tue, 30 Apr 2019 21:13:41 +0000 (UTC)
commit 9b97dfde7f44b5a3bd204a300bc2601816a6ad7c
Author: Christian Hergert <chergert redhat com>
Date: Tue Apr 30 14:12:28 2019 -0700
terminal: add helper to get current directory URI
src/libide/terminal/ide-terminal-page.c | 8 ++++++++
src/libide/terminal/ide-terminal-page.h | 14 ++++++++------
2 files changed, 16 insertions(+), 6 deletions(-)
---
diff --git a/src/libide/terminal/ide-terminal-page.c b/src/libide/terminal/ide-terminal-page.c
index 68d4e9fa2..09de8d3af 100644
--- a/src/libide/terminal/ide-terminal-page.c
+++ b/src/libide/terminal/ide-terminal-page.c
@@ -559,3 +559,11 @@ ide_terminal_page_set_launcher (IdeTerminalPage *self,
}
}
}
+
+const gchar *
+ide_terminal_page_get_current_directory_uri (IdeTerminalPage *self)
+{
+ g_return_val_if_fail (IDE_IS_TERMINAL_PAGE (self), NULL);
+
+ return vte_terminal_get_current_directory_uri (VTE_TERMINAL (self->terminal_top));
+}
diff --git a/src/libide/terminal/ide-terminal-page.h b/src/libide/terminal/ide-terminal-page.h
index 0ad530e10..5e2211a4d 100644
--- a/src/libide/terminal/ide-terminal-page.h
+++ b/src/libide/terminal/ide-terminal-page.h
@@ -38,13 +38,15 @@ IDE_AVAILABLE_IN_3_32
G_DECLARE_FINAL_TYPE (IdeTerminalPage, ide_terminal_page, IDE, TERMINAL_PAGE, IdePage)
IDE_AVAILABLE_IN_3_34
-void ide_terminal_page_set_launcher (IdeTerminalPage *self,
- IdeTerminalLauncher *launcher);
+void ide_terminal_page_set_launcher (IdeTerminalPage *self,
+ IdeTerminalLauncher *launcher);
IDE_AVAILABLE_IN_3_32
-void ide_terminal_page_set_pty (IdeTerminalPage *self,
- VtePty *pty);
+void ide_terminal_page_set_pty (IdeTerminalPage *self,
+ VtePty *pty);
IDE_AVAILABLE_IN_3_32
-void ide_terminal_page_feed (IdeTerminalPage *self,
- const gchar *message);
+void ide_terminal_page_feed (IdeTerminalPage *self,
+ const gchar *message);
+IDE_AVAILABLE_IN_3_34
+const gchar *ide_terminal_page_get_current_directory_uri (IdeTerminalPage *self);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]