[giggle] Do not use deprecated VTE symbol
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [giggle] Do not use deprecated VTE symbol
- Date: Tue, 23 Nov 2010 05:31:34 +0000 (UTC)
commit 050b501dec816a2ab05887c91e115ede82f1b8c1
Author: Javier Jardón <jjardon gnome org>
Date: Tue Nov 23 05:51:32 2010 +0100
Do not use deprecated VTE symbol
plugins/giggle-view-terminal.c | 26 +++++++++++++++++++-------
1 files changed, 19 insertions(+), 7 deletions(-)
---
diff --git a/plugins/giggle-view-terminal.c b/plugins/giggle-view-terminal.c
index 3f23ff4..ae4ca2d 100644
--- a/plugins/giggle-view-terminal.c
+++ b/plugins/giggle-view-terminal.c
@@ -170,9 +170,12 @@ giggle_view_terminal_append_tab (GiggleViewTerminal *view,
const char *directory)
{
GiggleViewTerminalPriv *priv = GET_PRIV (view);
+ VtePtyFlags pty_flags;
GtkWidget *terminal, *label;
- const char *shell;
+ GError *error = NULL;
+ GSpawnFlags spawn_flags;
char *title;
+ gboolean succes;
int i;
g_return_if_fail (GIGGLE_IS_VIEW_TERMINAL (view));
@@ -188,12 +191,21 @@ giggle_view_terminal_append_tab (GiggleViewTerminal *view,
g_signal_connect_swapped (terminal, "selection-changed",
G_CALLBACK (giggle_clipboard_changed), view);
- shell = g_getenv ("SHELL");
-
- vte_terminal_fork_command (VTE_TERMINAL (terminal),
- shell ? shell : "/bin/sh",
- NULL, NULL, directory,
- FALSE, FALSE, FALSE);
+ pty_flags = VTE_PTY_NO_LASTLOG | VTE_PTY_NO_UTMP | VTE_PTY_NO_WTMP;
+ spawn_flags = G_SPAWN_CHILD_INHERITS_STDIN | G_SPAWN_SEARCH_PATH;
+
+ succes = vte_terminal_fork_command_full (VTE_TERMINAL (terminal),
+ pty_flags,
+ directory, NULL, NULL,
+ spawn_flags,
+ NULL, NULL,
+ NULL,
+ &error);
+ if (succes == FALSE) {
+ g_warning ("%s: %s: vte_terminal_fork_command_full failed %s",
+ G_STRLOC, G_STRFUNC, error->message);
+ g_error_free (error);
+ }
title = g_filename_display_name (directory);
label = view_terminal_create_label (view, terminal, title);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]