Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 407319 | Differences between
and this patch

Collapse All | Expand All

(-)a/src/gcm-calibrate-argyll.c (-3 / +8 lines)
Lines 122-131 gcm_calibrate_argyll_get_display (const gchar *output_name, GError **error) Link Here
122
	gint exit_status;
122
	gint exit_status;
123
	guint display = G_MAXUINT;
123
	guint display = G_MAXUINT;
124
	guint i;
124
	guint i;
125
	gchar *name;
125
	gchar *command, *name;
126
127
	command = gcm_calibrate_argyll_get_tool_filename ("dispcal", error);
128
	if (!command == NULL)
129
		goto out;
126
130
127
	/* execute it and capture stderr */
131
	/* execute it and capture stderr */
128
	ret = g_spawn_command_line_sync ("dispcal", NULL, &data, &exit_status, error);
132
	ret = g_spawn_command_line_sync (command, NULL, &data, &exit_status, error);
129
	if (!ret)
133
	if (!ret)
130
		goto out;
134
		goto out;
131
135
Lines 157-162 gcm_calibrate_argyll_get_display (const gchar *output_name, GError **error) Link Here
157
		goto out;
161
		goto out;
158
	}
162
	}
159
out:
163
out:
164
	g_free (command);
160
	g_free (data);
165
	g_free (data);
161
	g_strfreev (split);
166
	g_strfreev (split);
162
	return display;
167
	return display;
Lines 198-204 gcm_calibrate_argyll_debug_argv (const gchar *program, gchar **argv) Link Here
198
/**
203
/**
199
 * gcm_calibrate_argyll_get_tool_filename:
204
 * gcm_calibrate_argyll_get_tool_filename:
200
 **/
205
 **/
201
static gchar *
206
gchar *
202
gcm_calibrate_argyll_get_tool_filename (const gchar *command, GError **error)
207
gcm_calibrate_argyll_get_tool_filename (const gchar *command, GError **error)
203
{
208
{
204
	gboolean ret;
209
	gboolean ret;
(-)a/src/gcm-calibrate-argyll.h (-2 / +4 lines)
Lines 48-55 struct _GcmCalibrateArgyllClass Link Here
48
	GcmCalibrateClass	parent_class;
48
	GcmCalibrateClass	parent_class;
49
};
49
};
50
50
51
GType		 	 gcm_calibrate_argyll_get_type			(void);
51
GType		 gcm_calibrate_argyll_get_type		(void);
52
GcmCalibrate		*gcm_calibrate_argyll_new			(void);
52
GcmCalibrate	*gcm_calibrate_argyll_new		(void);
53
gchar		*gcm_calibrate_argyll_get_tool_filename	(const gchar	*command,
54
							 GError		**error);
53
55
54
G_END_DECLS
56
G_END_DECLS
55
57
(-)a/src/gcm-calibrate-main.c (-3 / +5 lines)
Lines 1774-1779 gcm_calib_add_pages (GcmCalibratePriv *calib) Link Here
1774
{
1774
{
1775
	gboolean ret;
1775
	gboolean ret;
1776
	const gchar *xrandr_name;
1776
	const gchar *xrandr_name;
1777
	gchar *command;
1777
1778
1778
	/* device not found */
1779
	/* device not found */
1779
	if (calib->device_kind == CD_DEVICE_KIND_UNKNOWN) {
1780
	if (calib->device_kind == CD_DEVICE_KIND_UNKNOWN) {
Lines 1789-1797 gcm_calib_add_pages (GcmCalibratePriv *calib) Link Here
1789
		gcm_calib_setup_page_sensor (calib);
1790
		gcm_calib_setup_page_sensor (calib);
1790
1791
1791
	/* find whether argyllcms is installed using a tool which should exist */
1792
	/* find whether argyllcms is installed using a tool which should exist */
1792
	ret = g_file_test ("/usr/bin/dispcal", G_FILE_TEST_EXISTS);
1793
	command = gcm_calibrate_argyll_get_tool_filename ("dispcal", NULL);
1793
	if (!ret)
1794
	if (command == NULL)
1794
		gcm_calib_setup_page_install_argyllcms (calib);
1795
		gcm_calib_setup_page_install_argyllcms (calib);
1796
	else
1797
		g_free (command);
1795
1798
1796
	xrandr_name = cd_device_get_metadata_item (calib->device,
1799
	xrandr_name = cd_device_get_metadata_item (calib->device,
1797
						   CD_DEVICE_METADATA_XRANDR_NAME);
1800
						   CD_DEVICE_METADATA_XRANDR_NAME);
1798
- 

Return to bug 407319