[gnome-builder/wip/gtk4-port: 1519/1774] libide/terminal: add has exited helper




commit d1497bee863d59660d6e79ab5bca882614f9bade
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jun 15 08:17:59 2022 -0700

    libide/terminal: add has exited helper
    
    This can be used by keybindings to determine if shortcuts can be active.

 src/libide/terminal/ide-terminal-page.c |  8 ++++++++
 src/libide/terminal/ide-terminal-page.h | 18 ++++++++++--------
 2 files changed, 18 insertions(+), 8 deletions(-)
---
diff --git a/src/libide/terminal/ide-terminal-page.c b/src/libide/terminal/ide-terminal-page.c
index 6b77069f5..c7dd26485 100644
--- a/src/libide/terminal/ide-terminal-page.c
+++ b/src/libide/terminal/ide-terminal-page.c
@@ -623,3 +623,11 @@ ide_terminal_page_get_launcher (IdeTerminalPage *self)
 
   return self->launcher;
 }
+
+gboolean
+ide_terminal_page_has_exited (IdeTerminalPage *self)
+{
+  g_return_val_if_fail (IDE_IS_TERMINAL_PAGE (self), FALSE);
+
+  return self->exited;
+}
diff --git a/src/libide/terminal/ide-terminal-page.h b/src/libide/terminal/ide-terminal-page.h
index f125c9cf4..056bb6721 100644
--- a/src/libide/terminal/ide-terminal-page.h
+++ b/src/libide/terminal/ide-terminal-page.h
@@ -38,17 +38,19 @@ IDE_AVAILABLE_IN_ALL
 G_DECLARE_FINAL_TYPE (IdeTerminalPage, ide_terminal_page, IDE, TERMINAL_PAGE, IdePage)
 
 IDE_AVAILABLE_IN_ALL
-void         ide_terminal_page_set_launcher              (IdeTerminalPage     *self,
-                                                          IdeTerminalLauncher *launcher);
+void                 ide_terminal_page_set_launcher              (IdeTerminalPage     *self,
+                                                                  IdeTerminalLauncher *launcher);
 IDE_AVAILABLE_IN_ALL
-IdeTerminalLauncher *ide_terminal_page_get_launcher (IdeTerminalPage *self);
+IdeTerminalLauncher *ide_terminal_page_get_launcher              (IdeTerminalPage     *self);
 IDE_AVAILABLE_IN_ALL
-void         ide_terminal_page_set_pty                   (IdeTerminalPage     *self,
-                                                          VtePty              *pty);
+void                 ide_terminal_page_set_pty                   (IdeTerminalPage     *self,
+                                                                  VtePty              *pty);
 IDE_AVAILABLE_IN_ALL
-void         ide_terminal_page_feed                      (IdeTerminalPage     *self,
-                                                          const gchar         *message);
+void                 ide_terminal_page_feed                      (IdeTerminalPage     *self,
+                                                                  const gchar         *message);
 IDE_AVAILABLE_IN_ALL
-const gchar *ide_terminal_page_get_current_directory_uri (IdeTerminalPage     *self);
+const gchar         *ide_terminal_page_get_current_directory_uri (IdeTerminalPage     *self);
+IDE_AVAILABLE_IN_ALL
+gboolean             ide_terminal_page_has_exited                (IdeTerminalPage     *self);
 
 G_END_DECLS


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]