[gnome-color-manager/gnome-2-32] Lower VTE dep and #ifdef the deprecated methods
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager/gnome-2-32] Lower VTE dep and #ifdef the deprecated methods
- Date: Tue, 31 Aug 2010 20:00:16 +0000 (UTC)
commit 3616bb9cba415c9b217474e5409460f3d1b10b9e
Author: Richard Hughes <richard hughsie com>
Date: Tue Aug 31 19:16:24 2010 +0100
Lower VTE dep and #ifdef the deprecated methods
configure.ac | 2 +-
src/gcm-calibrate-argyll.c | 17 +++++++++++++++++
2 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 1598d1a..c646daf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -104,7 +104,7 @@ GTK_REQUIRED=2.14.0
GNOMEDESKTOP_REQUIRED=2.14.0
GCONF_REQUIRED=0.22
UNIQUE_REQUIRED=1.0.0
-VTE_REQUIRED=0.25.1
+VTE_REQUIRED=0.22.2
DBUS_GLIB_REQUIRED=0.73
CANBERRA_REQUIRED=0.10
diff --git a/src/gcm-calibrate-argyll.c b/src/gcm-calibrate-argyll.c
index 80f4469..a1d9094 100644
--- a/src/gcm-calibrate-argyll.c
+++ b/src/gcm-calibrate-argyll.c
@@ -355,7 +355,9 @@ static gboolean
gcm_calibrate_argyll_fork_command (GcmCalibrateArgyll *calibrate_argyll, gchar **argv, GError **error)
{
gboolean ret = FALSE;
+#if VTE_CHECK_VERSION(0,25,0)
const gchar *envp[] = { "ARGYLL_NOT_INTERACTIVE", NULL };
+#endif
const gchar *working_directory;
GcmCalibrateArgyllPrivate *priv = calibrate_argyll->priv;
@@ -365,6 +367,8 @@ gcm_calibrate_argyll_fork_command (GcmCalibrateArgyll *calibrate_argyll, gchar *
/* try to run */
working_directory = gcm_calibrate_get_working_path (GCM_CALIBRATE (calibrate_argyll));
+
+#if VTE_CHECK_VERSION(0,25,0)
ret = vte_terminal_fork_command_full (VTE_TERMINAL(priv->terminal),
VTE_PTY_DEFAULT,
working_directory,
@@ -372,6 +376,19 @@ gcm_calibrate_argyll_fork_command (GcmCalibrateArgyll *calibrate_argyll, gchar *
G_SPAWN_FILE_AND_ARGV_ZERO,
NULL, NULL,
&priv->child_pid, error);
+#else
+ priv->child_pid = vte_terminal_fork_command (VTE_TERMINAL(priv->terminal),
+ argv[0], argv, NULL,
+ working_directory,
+ FALSE, FALSE, FALSE);
+ ret = (priv->child_pid > 0);
+ if (!ret) {
+ g_set_error (error,
+ GCM_CALIBRATE_ERROR,
+ GCM_CALIBRATE_ERROR_USER_ABORT,
+ "failed to spawn %s", argv[0]);
+ }
+#endif
if (!ret)
goto out;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]