[Xfce4-commits] [apps/xfce4-terminal] 01/01: Fix utempter when async terminal spawn is used
noreply at xfce.org
noreply at xfce.org
Mon Oct 15 21:34:28 CEST 2018
This is an automated email from the git hooks/post-receive script.
f 2 4 0 4 p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-terminal.
commit b39702b807bae35bff18e7402f90ba0f5ac25346
Author: Igor <f2404 at yandex.ru>
Date: Mon Oct 15 15:34:20 2018 -0400
Fix utempter when async terminal spawn is used
---
terminal/terminal-screen.c | 31 +++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c
index 77ea337..555c799 100644
--- a/terminal/terminal-screen.c
+++ b/terminal/terminal-screen.c
@@ -1740,8 +1740,19 @@ terminal_screen_spawn_async_cb (VteTerminal *terminal,
screen->pid = pid;
if (error)
- xfce_dialog_show_error (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (screen))),
- error, _("Failed to execute child"));
+ {
+ xfce_dialog_show_error (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (screen))),
+ error, _("Failed to execute child"));
+ }
+#ifdef HAVE_LIBUTEMPTER
+ else
+ {
+ gboolean update_records;
+ g_object_get (G_OBJECT (screen->preferences), "command-update-records", &update_records, NULL);
+ if (update_records)
+ utempter_add_record (vte_pty_get_fd (vte_terminal_get_pty (VTE_TERMINAL (screen->terminal))), NULL);
+ }
+#endif // HAVE_LIBUTEMPTER
}
#endif
@@ -1803,9 +1814,6 @@ terminal_screen_launch_child (TerminalScreen *screen)
guint i;
VtePtyFlags pty_flags = VTE_PTY_DEFAULT;
GSpawnFlags spawn_flags = G_SPAWN_CHILD_INHERITS_STDIN | G_SPAWN_SEARCH_PATH;
-#ifdef HAVE_LIBUTEMPTER
- gboolean update_records;
-#endif
terminal_return_if_fail (TERMINAL_IS_SCREEN (screen));
@@ -1858,12 +1866,15 @@ terminal_screen_launch_child (TerminalScreen *screen)
error, _("Failed to execute child"));
g_error_free (error);
}
-#endif
-
#ifdef HAVE_LIBUTEMPTER
- g_object_get (G_OBJECT (screen->preferences), "command-update-records", &update_records, NULL);
- if (update_records)
- utempter_add_record (vte_pty_get_fd (vte_terminal_get_pty (VTE_TERMINAL (screen->terminal))), NULL);
+ else
+ {
+ gboolean update_records;
+ g_object_get (G_OBJECT (screen->preferences), "command-update-records", &update_records, NULL);
+ if (update_records)
+ utempter_add_record (vte_pty_get_fd (vte_terminal_get_pty (VTE_TERMINAL (screen->terminal))), NULL);
+ }
+#endif // HAVE_LIBUTEMPTER
#endif
g_free (argv2);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list