[gnome-builder] terminal: add start time to application output panel
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] terminal: add start time to application output panel
- Date: Wed, 20 Jun 2018 00:56:40 +0000 (UTC)
commit 6ea7a6a1345f9e38083252037aa8d43689af043c
Author: Willis Monroe <willismonroe gmail com>
Date: Mon Jun 18 13:54:11 2018 -0700
terminal: add start time to application output panel
src/plugins/terminal/gb-terminal-workbench-addin.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/terminal/gb-terminal-workbench-addin.c
b/src/plugins/terminal/gb-terminal-workbench-addin.c
index 470a663d0..500c32c7f 100644
--- a/src/plugins/terminal/gb-terminal-workbench-addin.c
+++ b/src/plugins/terminal/gb-terminal-workbench-addin.c
@@ -162,6 +162,9 @@ on_run_manager_run (GbTerminalWorkbenchAddin *self,
IdeEnvironment *env;
VtePty *pty = NULL;
int tty_fd;
+ g_autoptr(GDateTime) now = NULL;
+ g_autofree gchar *formatted = NULL;
+ g_autofree gchar *tmp = NULL;
IDE_ENTRY;
@@ -228,7 +231,13 @@ on_run_manager_run (GbTerminalWorkbenchAddin *self,
ide_environment_setenv (env, "TERM", "xterm-256color");
ide_environment_setenv (env, "INSIDE_GNOME_BUILDER", PACKAGE_VERSION);
- gb_terminal_view_feed (self->run_terminal, _("Application starting...\r\n"));
+ now = g_date_time_new_now_local ();
+ tmp = g_date_time_format (now, "%X");
+
+ /* translators: %s is replaced with the current local time of day */
+ formatted = g_strdup_printf (_("Application started at %s\r\n"), tmp);
+
+ gb_terminal_view_feed (self->run_terminal, formatted);
dzl_dock_item_present (DZL_DOCK_ITEM (self->run_panel));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]