[gnome-color-manager/gnome-2-32] Use vte_terminal_fork_command_full() as vte_terminal_fork_command() is deprecated



commit f068f4bd2103f1a0c7bf1ecd47e0196d97b15f65
Author: Richard Hughes <richard hughsie com>
Date:   Fri Aug 6 11:28:11 2010 +0100

    Use vte_terminal_fork_command_full() as vte_terminal_fork_command() is deprecated

 configure.ac               |    2 +-
 src/gcm-calibrate-argyll.c |  171 ++++++++++++++++++--------------------------
 src/gcm-calibrate.c        |    9 +++
 src/gcm-calibrate.h        |    2 +
 4 files changed, 83 insertions(+), 101 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 1809385..bed98b0 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.22.2
+VTE_REQUIRED=0.25.1
 DBUS_GLIB_REQUIRED=0.73
 CANBERRA_REQUIRED=0.10
 
diff --git a/src/gcm-calibrate-argyll.c b/src/gcm-calibrate-argyll.c
index bbf47db..80f4469 100644
--- a/src/gcm-calibrate-argyll.c
+++ b/src/gcm-calibrate-argyll.c
@@ -349,6 +349,39 @@ out:
 }
 
 /**
+ * gcm_calibrate_argyll_fork_command:
+ **/
+static gboolean
+gcm_calibrate_argyll_fork_command (GcmCalibrateArgyll *calibrate_argyll, gchar **argv, GError **error)
+{
+	gboolean ret = FALSE;
+	const gchar *envp[] = { "ARGYLL_NOT_INTERACTIVE", NULL };
+	const gchar *working_directory;
+	GcmCalibrateArgyllPrivate *priv = calibrate_argyll->priv;
+
+	/* clear */
+	priv->state = GCM_CALIBRATE_ARGYLL_STATE_IDLE;
+	vte_terminal_reset (VTE_TERMINAL(priv->terminal), TRUE, FALSE);
+
+	/* try to run */
+	working_directory = gcm_calibrate_get_working_path (GCM_CALIBRATE (calibrate_argyll));
+	ret = vte_terminal_fork_command_full (VTE_TERMINAL(priv->terminal),
+					      VTE_PTY_DEFAULT,
+					      working_directory,
+					      argv, (gchar**)envp,
+					      G_SPAWN_FILE_AND_ARGV_ZERO,
+					      NULL, NULL,
+					      &priv->child_pid, error);
+	if (!ret)
+		goto out;
+
+	/* we're running */
+	priv->state = GCM_CALIBRATE_ARGYLL_STATE_RUNNING;
+out:
+	return ret;
+}
+
+/**
  * gcm_calibrate_argyll_display_neutralise:
  **/
 static gboolean
@@ -362,7 +395,6 @@ gcm_calibrate_argyll_display_neutralise (GcmCalibrateArgyll *calibrate_argyll, G
 	GnomeRROutput *output;
 	GPtrArray *array = NULL;
 	gchar *basename = NULL;
-	gchar *working_path = NULL;
 	gchar *output_name = NULL;
 	const gchar *title;
 	const gchar *message;
@@ -370,7 +402,6 @@ gcm_calibrate_argyll_display_neutralise (GcmCalibrateArgyll *calibrate_argyll, G
 	/* get shared data */
 	g_object_get (calibrate_argyll,
 		      "basename", &basename,
-		      "working-path", &working_path,
 		      "output-name", &output_name,
 		      NULL);
 
@@ -424,9 +455,9 @@ gcm_calibrate_argyll_display_neutralise (GcmCalibrateArgyll *calibrate_argyll, G
 	gcm_calibrate_argyll_debug_argv (command, argv);
 
 	/* start up the command */
-	priv->state = GCM_CALIBRATE_ARGYLL_STATE_RUNNING;
-	vte_terminal_reset (VTE_TERMINAL(priv->terminal), TRUE, FALSE);
-	priv->child_pid = vte_terminal_fork_command (VTE_TERMINAL(priv->terminal), command, argv, NULL, working_path, FALSE, FALSE, FALSE);
+	ret = gcm_calibrate_argyll_fork_command (calibrate_argyll, argv, error);
+	if (!ret)
+		goto out;
 
 	/* wait until finished */
 	g_main_loop_run (priv->loop);
@@ -454,7 +485,6 @@ gcm_calibrate_argyll_display_neutralise (GcmCalibrateArgyll *calibrate_argyll, G
 out:
 	if (array != NULL)
 		g_ptr_array_unref (array);
-	g_free (working_path);
 	g_free (basename);
 	g_free (output_name);
 	g_free (command);
@@ -475,14 +505,12 @@ gcm_calibrate_argyll_display_read_chart (GcmCalibrateArgyll *calibrate_argyll, G
 	gchar **argv = NULL;
 	GPtrArray *array = NULL;
 	gchar *basename = NULL;
-	gchar *working_path = NULL;
 	const gchar *title;
 	const gchar *message;
 
 	/* get shared data */
 	g_object_get (calibrate_argyll,
 		      "basename", &basename,
-		      "working-path", &working_path,
 		      NULL);
 
 	/* get correct name of the command */
@@ -512,9 +540,9 @@ gcm_calibrate_argyll_display_read_chart (GcmCalibrateArgyll *calibrate_argyll, G
 	gcm_calibrate_argyll_debug_argv (command, argv);
 
 	/* start up the command */
-	priv->state = GCM_CALIBRATE_ARGYLL_STATE_RUNNING;
-	vte_terminal_reset (VTE_TERMINAL(priv->terminal), TRUE, FALSE);
-	priv->child_pid = vte_terminal_fork_command (VTE_TERMINAL(priv->terminal), command, argv, NULL, working_path, FALSE, FALSE, FALSE);
+	ret = gcm_calibrate_argyll_fork_command (calibrate_argyll, argv, error);
+	if (!ret)
+		goto out;
 
 	/* wait until finished */
 	g_main_loop_run (priv->loop);
@@ -542,7 +570,6 @@ gcm_calibrate_argyll_display_read_chart (GcmCalibrateArgyll *calibrate_argyll, G
 out:
 	if (array != NULL)
 		g_ptr_array_unref (array);
-	g_free (working_path);
 	g_free (basename);
 	g_free (command);
 	g_strfreev (argv);
@@ -561,7 +588,6 @@ gcm_calibrate_argyll_display_generate_patches (GcmCalibrateArgyll *calibrate_arg
 	gchar **argv = NULL;
 	GPtrArray *array = NULL;
 	gchar *basename = NULL;
-	gchar *working_path = NULL;
 	const gchar *title;
 	const gchar *message;
 	GcmDeviceKind device_kind;
@@ -569,7 +595,6 @@ gcm_calibrate_argyll_display_generate_patches (GcmCalibrateArgyll *calibrate_arg
 	/* get shared data */
 	g_object_get (calibrate_argyll,
 		      "basename", &basename,
-		      "working-path", &working_path,
 		      "device-kind", &device_kind,
 		      NULL);
 
@@ -617,9 +642,9 @@ gcm_calibrate_argyll_display_generate_patches (GcmCalibrateArgyll *calibrate_arg
 	gcm_calibrate_argyll_debug_argv (command, argv);
 
 	/* start up the command */
-	priv->state = GCM_CALIBRATE_ARGYLL_STATE_RUNNING;
-	vte_terminal_reset (VTE_TERMINAL(priv->terminal), TRUE, FALSE);
-	priv->child_pid = vte_terminal_fork_command (VTE_TERMINAL(priv->terminal), command, argv, NULL, working_path, FALSE, FALSE, FALSE);
+	ret = gcm_calibrate_argyll_fork_command (calibrate_argyll, argv, error);
+	if (!ret)
+		goto out;
 
 	/* wait until finished */
 	g_main_loop_run (priv->loop);
@@ -647,7 +672,6 @@ gcm_calibrate_argyll_display_generate_patches (GcmCalibrateArgyll *calibrate_arg
 out:
 	if (array != NULL)
 		g_ptr_array_unref (array);
-	g_free (working_path);
 	g_free (basename);
 	g_free (command);
 	g_strfreev (argv);
@@ -667,13 +691,11 @@ gcm_calibrate_argyll_display_draw_and_measure (GcmCalibrateArgyll *calibrate_arg
 	gchar **argv = NULL;
 	GPtrArray *array = NULL;
 	gchar *basename = NULL;
-	gchar *working_path = NULL;
 	const gchar *title;
 	const gchar *message;
 
 	/* get shared data */
 	g_object_get (calibrate_argyll,
-		      "working-path", &working_path,
 		      "basename", &basename,
 		      NULL);
 
@@ -711,9 +733,9 @@ gcm_calibrate_argyll_display_draw_and_measure (GcmCalibrateArgyll *calibrate_arg
 	gcm_calibrate_argyll_debug_argv (command, argv);
 
 	/* start up the command */
-	priv->state = GCM_CALIBRATE_ARGYLL_STATE_RUNNING;
-	vte_terminal_reset (VTE_TERMINAL(priv->terminal), TRUE, FALSE);
-	priv->child_pid = vte_terminal_fork_command (VTE_TERMINAL(priv->terminal), command, argv, NULL, working_path, FALSE, FALSE, FALSE);
+	ret = gcm_calibrate_argyll_fork_command (calibrate_argyll, argv, error);
+	if (!ret)
+		goto out;
 
 	/* wait until finished */
 	g_main_loop_run (priv->loop);
@@ -741,7 +763,6 @@ gcm_calibrate_argyll_display_draw_and_measure (GcmCalibrateArgyll *calibrate_arg
 out:
 	if (array != NULL)
 		g_ptr_array_unref (array);
-	g_free (working_path);
 	g_free (basename);
 	g_free (command);
 	g_strfreev (argv);
@@ -762,7 +783,6 @@ gcm_calibrate_argyll_display_generate_profile (GcmCalibrateArgyll *calibrate_arg
 	gchar *description_new = NULL;
 	gchar *command = NULL;
 	gchar *basename = NULL;
-	gchar *working_path = NULL;
 	const gchar *description = NULL;
 	const gchar *manufacturer = NULL;
 	const gchar *model = NULL;
@@ -774,7 +794,6 @@ gcm_calibrate_argyll_display_generate_profile (GcmCalibrateArgyll *calibrate_arg
 	/* get shared data */
 	g_object_get (calibrate_argyll,
 		      "basename", &basename,
-		      "working-path", &working_path,
 		      "device", &device,
 		      NULL);
 
@@ -826,9 +845,9 @@ gcm_calibrate_argyll_display_generate_profile (GcmCalibrateArgyll *calibrate_arg
 	gcm_calibrate_argyll_debug_argv (command, argv);
 
 	/* start up the command */
-	priv->state = GCM_CALIBRATE_ARGYLL_STATE_RUNNING;
-	vte_terminal_reset (VTE_TERMINAL(priv->terminal), TRUE, FALSE);
-	priv->child_pid = vte_terminal_fork_command (VTE_TERMINAL(priv->terminal), command, argv, NULL, working_path, FALSE, FALSE, FALSE);
+	ret = gcm_calibrate_argyll_fork_command (calibrate_argyll, argv, error);
+	if (!ret)
+		goto out;
 
 	/* wait until finished */
 	g_main_loop_run (priv->loop);
@@ -859,7 +878,6 @@ out:
 		g_ptr_array_unref (array);
 	if (date != NULL)
 		g_date_free (date);
-	g_free (working_path);
 	g_free (basename);
 	g_free (command);
 	g_free (description_new);
@@ -920,7 +938,7 @@ gcm_calibrate_argyll_device_copy (GcmCalibrateArgyll *calibrate_argyll, GError *
 	GFile *dest_cht = NULL;
 	GFile *dest_source = NULL;
 	GFile *dest_reference = NULL;
-	gchar *working_path = NULL;
+	const gchar *working_path;
 	const gchar *title;
 	const gchar *message;
 	const gchar *filename_tmp;
@@ -930,11 +948,11 @@ gcm_calibrate_argyll_device_copy (GcmCalibrateArgyll *calibrate_argyll, GError *
 	/* get shared data */
 	g_object_get (calibrate_argyll,
 		      "basename", &basename,
-		      "working-path", &working_path,
 		      "reference-kind", &reference_kind,
 		      "filename-source", &filename_source,
 		      "filename-reference", &filename_reference,
 		      NULL);
+	working_path = gcm_calibrate_get_working_path (GCM_CALIBRATE (calibrate_argyll));
 
 	/* TRANSLATORS: title, a profile is a ICC file */
 	title = _("Copying files");
@@ -975,7 +993,6 @@ gcm_calibrate_argyll_device_copy (GcmCalibrateArgyll *calibrate_argyll, GError *
 	if (!ret)
 		goto out;
 out:
-	g_free (working_path);
 	g_free (basename);
 	g_free (filename);
 	g_free (filename_cht);
@@ -1006,14 +1023,12 @@ gcm_calibrate_argyll_device_measure (GcmCalibrateArgyll *calibrate_argyll, GErro
 	gchar *filename = NULL;
 	gchar *command = NULL;
 	gchar *basename = NULL;
-	gchar *working_path = NULL;
 	const gchar *title;
 	const gchar *message;
 
 	/* get shared data */
 	g_object_get (calibrate_argyll,
 		      "basename", &basename,
-		      "working-path", &working_path,
 		      NULL);
 
 	/* TRANSLATORS: title, drawing means painting to the screen */
@@ -1048,9 +1063,9 @@ gcm_calibrate_argyll_device_measure (GcmCalibrateArgyll *calibrate_argyll, GErro
 	gcm_calibrate_argyll_debug_argv (command, argv);
 
 	/* start up the command */
-	priv->state = GCM_CALIBRATE_ARGYLL_STATE_RUNNING;
-	vte_terminal_reset (VTE_TERMINAL(priv->terminal), TRUE, FALSE);
-	priv->child_pid = vte_terminal_fork_command (VTE_TERMINAL(priv->terminal), command, argv, NULL, working_path, FALSE, FALSE, FALSE);
+	ret = gcm_calibrate_argyll_fork_command (calibrate_argyll, argv, error);
+	if (!ret)
+		goto out;
 
 	/* wait until finished */
 	g_main_loop_run (priv->loop);
@@ -1076,7 +1091,6 @@ gcm_calibrate_argyll_device_measure (GcmCalibrateArgyll *calibrate_argyll, GErro
 		goto out;
 	}
 out:
-	g_free (working_path);
 	g_free (filename);
 	g_free (command);
 	g_free (basename);
@@ -1105,7 +1119,6 @@ gcm_calibrate_argyll_device_generate_profile (GcmCalibrateArgyll *calibrate_argy
 	const gchar *manufacturer;
 	const gchar *model;
 	const gchar *device;
-	gchar *working_path = NULL;
 	const gchar *title;
 	const gchar *message;
 	GcmCalibrateReferenceKind reference_kind;
@@ -1113,7 +1126,6 @@ gcm_calibrate_argyll_device_generate_profile (GcmCalibrateArgyll *calibrate_argy
 	/* get shared data */
 	g_object_get (calibrate_argyll,
 		      "basename", &basename,
-		      "working-path", &working_path,
 		      "reference-kind", &reference_kind,
 		      NULL);
 
@@ -1171,9 +1183,9 @@ gcm_calibrate_argyll_device_generate_profile (GcmCalibrateArgyll *calibrate_argy
 	gcm_calibrate_argyll_debug_argv (command, argv);
 
 	/* start up the command */
-	priv->state = GCM_CALIBRATE_ARGYLL_STATE_RUNNING;
-	vte_terminal_reset (VTE_TERMINAL(priv->terminal), TRUE, FALSE);
-	priv->child_pid = vte_terminal_fork_command (VTE_TERMINAL(priv->terminal), command, argv, NULL, working_path, FALSE, FALSE, FALSE);
+	ret = gcm_calibrate_argyll_fork_command (calibrate_argyll, argv, error);
+	if (!ret)
+		goto out;
 
 	/* wait until finished */
 	g_main_loop_run (priv->loop);
@@ -1203,7 +1215,6 @@ out:
 		g_ptr_array_unref (array);
 	if (date != NULL)
 		g_date_free (date);
-	g_free (working_path);
 	g_free (description_tmp);
 	g_free (copyright);
 	g_free (basename);
@@ -1221,13 +1232,13 @@ gcm_calibrate_argyll_set_filename_result (GcmCalibrateArgyll *calibrate_argyll,
 	gchar *filename = NULL;
 	gboolean ret = TRUE;
 	gchar *basename = NULL;
-	gchar *working_path = NULL;
+	const gchar *working_path;
 
 	/* get shared data */
 	g_object_get (calibrate_argyll,
 		      "basename", &basename,
-		      "working-path", &working_path,
 		      NULL);
+	working_path = gcm_calibrate_get_working_path (GCM_CALIBRATE (calibrate_argyll));
 
 	/* we can't have finished with success */
 	if (basename == NULL) {
@@ -1257,7 +1268,6 @@ gcm_calibrate_argyll_set_filename_result (GcmCalibrateArgyll *calibrate_argyll,
 		      "filename-result", filename,
 		      NULL);
 out:
-	g_free (working_path);
 	g_free (basename);
 	g_free (filename);
 	return ret;
@@ -1275,13 +1285,13 @@ gcm_calibrate_argyll_remove_temp_files (GcmCalibrateArgyll *calibrate_argyll, GE
 	const gchar *exts[] = {"cal", "ti1", "ti3", "tif", NULL};
 	const gchar *filenames[] = {"scanin.cht", "scanin-ref.txt", NULL};
 	gchar *basename = NULL;
-	gchar *working_path = NULL;
+	const gchar *working_path;
 
 	/* get shared data */
 	g_object_get (calibrate_argyll,
 		      "basename", &basename,
-		      "working-path", &working_path,
 		      NULL);
+	working_path = gcm_calibrate_get_working_path (GCM_CALIBRATE (calibrate_argyll));
 
 	/* remove all the temp files */
 	if (basename != NULL) {
@@ -1310,7 +1320,6 @@ gcm_calibrate_argyll_remove_temp_files (GcmCalibrateArgyll *calibrate_argyll, GE
 	/* success */
 	ret = TRUE;
 
-	g_free (working_path);
 	g_free (basename);
 	return ret;
 }
@@ -1416,7 +1425,6 @@ gcm_calibrate_argyll_display_generate_targets (GcmCalibrateArgyll *calibrate_arg
 	gchar **argv = NULL;
 	GPtrArray *array = NULL;
 	gchar *basename = NULL;
-	gchar *working_path = NULL;
 	const gchar *title;
 	const gchar *message;
 	GcmColorimeterKind colorimeter_kind;
@@ -1424,7 +1432,6 @@ gcm_calibrate_argyll_display_generate_targets (GcmCalibrateArgyll *calibrate_arg
 	/* get shared data */
 	g_object_get (calibrate_argyll,
 		      "basename", &basename,
-		      "working-path", &working_path,
 		      "colorimeter-kind", &colorimeter_kind,
 		      NULL);
 
@@ -1472,9 +1479,9 @@ gcm_calibrate_argyll_display_generate_targets (GcmCalibrateArgyll *calibrate_arg
 	gcm_calibrate_argyll_debug_argv (command, argv);
 
 	/* start up the command */
-	priv->state = GCM_CALIBRATE_ARGYLL_STATE_RUNNING;
-	vte_terminal_reset (VTE_TERMINAL(priv->terminal), TRUE, FALSE);
-	priv->child_pid = vte_terminal_fork_command (VTE_TERMINAL(priv->terminal), command, argv, NULL, working_path, FALSE, FALSE, FALSE);
+	ret = gcm_calibrate_argyll_fork_command (calibrate_argyll, argv, error);
+	if (!ret)
+		goto out;
 
 	/* wait until finished */
 	g_main_loop_run (priv->loop);
@@ -1502,7 +1509,6 @@ gcm_calibrate_argyll_display_generate_targets (GcmCalibrateArgyll *calibrate_arg
 out:
 	if (array != NULL)
 		g_ptr_array_unref (array);
-	g_free (working_path);
 	g_free (basename);
 	g_free (command);
 	g_strfreev (argv);
@@ -1523,13 +1529,13 @@ gcm_calibrate_argyll_render_cb (GcmPrint *print, GtkPageSetup *page_setup, GcmCa
 	const gchar *filename;
 	gchar *basename = NULL;
 	gchar *filename_tmp;
-	gchar *working_path = NULL;
+	const gchar *working_path;
 
 	/* get shared data */
 	g_object_get (calibrate,
 		      "basename", &basename,
-		      "working-path", &working_path,
 		      NULL);
+	working_path = gcm_calibrate_get_working_path (calibrate);
 
 	paper_size = gtk_page_setup_get_paper_size (page_setup);
 	width = gtk_paper_size_get_width (paper_size, GTK_UNIT_MM);
@@ -1558,7 +1564,6 @@ gcm_calibrate_argyll_render_cb (GcmPrint *print, GtkPageSetup *page_setup, GcmCa
 		filename = g_dir_read_name (dir);
 	}
 out:
-	g_free (working_path);
 	g_free (basename);
 	if (dir != NULL)
 		g_dir_close (dir);
@@ -1655,14 +1660,11 @@ gcm_calibrate_argyll_printer_convert_jpeg (GcmCalibrateArgyll *calibrate_argyll,
 	gchar *filename_jpg;
 	guint len;
 	gboolean ret = TRUE;
-	gchar *working_path = NULL;
+	const gchar *working_path;
 	GdkPixbuf *pixbuf;
 
 	/* need to ask if we are printing now, or using old data */
-	g_object_get (calibrate_argyll,
-		      "working-path", &working_path,
-		      NULL);
-
+	working_path = gcm_calibrate_get_working_path (GCM_CALIBRATE (calibrate_argyll));
 	dir = g_dir_open (working_path, 0, error);
 	if (dir == NULL) {
 		ret = FALSE;
@@ -1702,7 +1704,6 @@ gcm_calibrate_argyll_printer_convert_jpeg (GcmCalibrateArgyll *calibrate_argyll,
 out:
 	if (dir != NULL)
 		g_dir_close (dir);
-	g_free (working_path);
 	return ret;
 }
 
@@ -1715,7 +1716,7 @@ gcm_calibrate_argyll_printer (GcmCalibrate *calibrate, GtkWindow *window, GError
 	gboolean ret;
 	gchar *cmdline = NULL;
 	gchar *filename = NULL;
-	gchar *working_path = NULL;
+	const gchar *working_path;
 	gchar *basename = NULL;
 	GtkPaperSize *paper_size;
 	const gchar *title;
@@ -1730,8 +1731,8 @@ gcm_calibrate_argyll_printer (GcmCalibrate *calibrate, GtkWindow *window, GError
 	g_object_get (calibrate,
 		      "basename", &basename,
 		      "print-kind", &print_kind,
-		      "working-path", &working_path,
 		      NULL);
+	working_path = gcm_calibrate_get_working_path (GCM_CALIBRATE (calibrate_argyll));
 
 	/* set modal windows up correctly */
 	gcm_calibrate_dialog_set_move_window (priv->calibrate_dialog, FALSE);
@@ -1845,7 +1846,6 @@ out:
 	g_free (filename);
 	g_free (basename);
 	g_free (cmdline);
-	g_free (working_path);
 	return ret;
 }
 
@@ -1897,7 +1897,7 @@ gcm_calibrate_argyll_check_and_remove_alpha (GcmCalibrateArgyll *calibrate_argyl
 	GdkPixbuf *pixbuf_new = NULL;
 	gchar *reference_image = NULL;
 	gchar *basename = NULL;
-	gchar *working_path = NULL;
+	const gchar *working_path;
 	gchar *filename = NULL;
 	const gchar *title;
 	GString *string = NULL;
@@ -1907,8 +1907,8 @@ gcm_calibrate_argyll_check_and_remove_alpha (GcmCalibrateArgyll *calibrate_argyl
 	/* get shared data */
 	g_object_get (calibrate_argyll,
 		      "basename", &basename,
-		      "working-path", &working_path,
 		      NULL);
+	working_path = gcm_calibrate_get_working_path (GCM_CALIBRATE (calibrate_argyll));
 
 	/* get copied filename */
 	filename = g_strdup_printf ("%s.tif", basename);
@@ -1969,7 +1969,6 @@ gcm_calibrate_argyll_check_and_remove_alpha (GcmCalibrateArgyll *calibrate_argyl
 		goto out;
 
 out:
-	g_free (working_path);
 	g_free (filename);
 	g_free (basename);
 	g_free (reference_image);
@@ -2649,32 +2648,6 @@ gcm_calibrate_argyll_status_changed_cb (GcmPrint *print, GtkPrintStatus status,
 }
 
 /**
- * gcm_calibrate_argyll_get_property:
- **/
-static void
-gcm_calibrate_argyll_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
-{
-	switch (prop_id) {
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
-	}
-}
-
-/**
- * gcm_calibrate_argyll_set_property:
- **/
-static void
-gcm_calibrate_argyll_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
-{
-	switch (prop_id) {
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
-	}
-}
-
-/**
  * gcm_calibrate_argyll_class_init:
  **/
 static void
@@ -2683,8 +2656,6 @@ gcm_calibrate_argyll_class_init (GcmCalibrateArgyllClass *klass)
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
 	GcmCalibrateClass *parent_class = GCM_CALIBRATE_CLASS (klass);
 	object_class->finalize = gcm_calibrate_argyll_finalize;
-	object_class->get_property = gcm_calibrate_argyll_get_property;
-	object_class->set_property = gcm_calibrate_argyll_set_property;
 
 	/* setup klass links */
 	parent_class->calibrate_display = gcm_calibrate_argyll_display;
diff --git a/src/gcm-calibrate.c b/src/gcm-calibrate.c
index 02fdf09..36f01fd 100644
--- a/src/gcm-calibrate.c
+++ b/src/gcm-calibrate.c
@@ -204,6 +204,15 @@ gcm_calibrate_get_filename_result (GcmCalibrate *calibrate)
 }
 
 /**
+ * gcm_calibrate_get_working_path:
+ **/
+const gchar *
+gcm_calibrate_get_working_path (GcmCalibrate *calibrate)
+{
+	return calibrate->priv->working_path;
+}
+
+/**
  * gcm_calibrate_set_basename:
  **/
 static void
diff --git a/src/gcm-calibrate.h b/src/gcm-calibrate.h
index 7bf8bca..672e687 100644
--- a/src/gcm-calibrate.h
+++ b/src/gcm-calibrate.h
@@ -23,6 +23,7 @@
 #define __GCM_CALIBRATE_H
 
 #include <glib-object.h>
+#include <gtk/gtk.h>
 
 #include "gcm-device.h"
 
@@ -134,6 +135,7 @@ const gchar	*gcm_calibrate_get_description_fallback	(GcmCalibrate	*calibrate);
 const gchar	*gcm_calibrate_get_manufacturer_fallback (GcmCalibrate	*calibrate);
 const gchar	*gcm_calibrate_get_device_fallback	(GcmCalibrate	*calibrate);
 const gchar	*gcm_calibrate_get_filename_result	(GcmCalibrate	*calibrate);
+const gchar	*gcm_calibrate_get_working_path		(GcmCalibrate	*calibrate);
 
 G_END_DECLS
 



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