[gnome-color-manager] Remove a lot of CD_CHECK_VERSION as we hard depend on a new version



commit 0ecbead47daaad74b2e03f6f48eb519ad8011d3f
Author: Richard Hughes <richard hughsie com>
Date:   Tue Jan 15 23:33:46 2013 +0000

    Remove a lot of CD_CHECK_VERSION as we hard depend on a new version

 src/gcm-calibrate-main.c             |    4 ----
 src/gcm-cell-renderer-profile-text.c |    2 --
 src/gcm-import.c                     |   29 +----------------------------
 src/gcm-picker.c                     |    2 --
 src/gcm-viewer.c                     |   12 ------------
 5 files changed, 1 insertions(+), 48 deletions(-)
---
diff --git a/src/gcm-calibrate-main.c b/src/gcm-calibrate-main.c
index 0d90644..0b051a4 100644
--- a/src/gcm-calibrate-main.c
+++ b/src/gcm-calibrate-main.c
@@ -356,7 +356,6 @@ out:
 	return ret;
 }
 
-#if CD_CHECK_VERSION(0,1,20)
 /**
  * gcm_calib_set_sensor_options_cb:
  **/
@@ -377,13 +376,11 @@ gcm_calib_set_sensor_options_cb (GObject *object,
 		g_error_free (error);
 	}
 }
-#endif
 
 static void
 gcm_calib_set_sensor_options (GcmCalibratePriv *calib,
 			      const gchar *filename)
 {
-#if CD_CHECK_VERSION(0,1,20)
 	CdSensor *sensor;
 	gboolean ret;
 	gchar *data = NULL;
@@ -423,7 +420,6 @@ out:
 	g_free (sha1);
 	if (hash != NULL)
 		g_hash_table_unref (hash);
-#endif
 }
 
 static gboolean
diff --git a/src/gcm-cell-renderer-profile-text.c b/src/gcm-cell-renderer-profile-text.c
index 96742c5..ce664c8 100644
--- a/src/gcm-cell-renderer-profile-text.c
+++ b/src/gcm-cell-renderer-profile-text.c
@@ -102,7 +102,6 @@ out:
 		 * profile has been auto-generated for this hardware */
 		g_string_prepend (string, _("Default: "));
 	}
-#if CD_CHECK_VERSION(0,1,14)
 	if (g_strcmp0 (id, CD_PROFILE_METADATA_DATA_SOURCE_STANDARD) == 0) {
 		/* TRANSLATORS: this is a profile prefix to signify the
 		 * profile his a standard space like AdobeRGB */
@@ -113,7 +112,6 @@ out:
 		 * profile is a test profile */
 		g_string_prepend (string, _("Test profile: "));
 	}
-#endif
 
 	g_free (markup);
 	return string;
diff --git a/src/gcm-import.c b/src/gcm-import.c
index 0114be5..c9bf56e 100644
--- a/src/gcm-import.c
+++ b/src/gcm-import.c
@@ -181,26 +181,6 @@ main (int argc, char **argv)
 		g_string_append_printf (string, "\n%s %s", _("Profile copyright:"), copyright);
 	}
 
-#if !CD_CHECK_VERSION(0,1,24)
-	/* check file does't already exist as a file */
-	destination = gcm_utils_get_profile_destination (file);
-	ret = g_file_query_exists (destination, NULL);
-	if (ret) {
-		/* TRANSLATORS: color profile already been installed */
-		dialog = gtk_message_dialog_new (NULL,
-						 0,
-						 GTK_MESSAGE_INFO,
-						 GTK_BUTTONS_OK,
-						 _("Color profile is already imported"));
-		gtk_window_set_icon_name (GTK_WINDOW (dialog), GCM_STOCK_ICON);
-		gtk_message_dialog_set_image (GTK_MESSAGE_DIALOG (dialog), image);
-		gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s", string->str);
-		gtk_dialog_run (GTK_DIALOG (dialog));
-		gtk_widget_destroy (dialog);
-		goto out;
-	}
-#endif
-
 	/* check file does't already exist as system-wide */
 	client = cd_client_new ();
 	ret = cd_client_connect_sync (client,
@@ -212,19 +192,12 @@ main (int argc, char **argv)
 		g_error_free (error);
 		goto out;
 	}
-#if CD_CHECK_VERSION(0,1,24)
+
 	profile_tmp = cd_client_find_profile_by_property_sync (client,
 							      CD_PROFILE_METADATA_FILE_CHECKSUM,
 							      gcm_profile_get_checksum (profile),
 							      NULL,
 							      NULL);
-#else
-	/* FIXME: this isn't supported by the daemon */
-	profile_tmp = cd_client_find_profile_sync (client,
-						   gcm_profile_get_checksum (profile),
-						   NULL,
-						   NULL);
-#endif
 	if (profile_tmp != NULL) {
 		ret = cd_profile_connect_sync (profile_tmp,
 					       NULL,
diff --git a/src/gcm-picker.c b/src/gcm-picker.c
index 5828942..29bf3bd 100644
--- a/src/gcm-picker.c
+++ b/src/gcm-picker.c
@@ -577,11 +577,9 @@ gcm_prefs_setup_space_combobox (GtkWidget *widget)
 			goto out;
 		}
 
-#if CD_CHECK_VERSION(0,1,13)
 		/* ignore profiles from other user accounts */
 		if (!cd_profile_has_access (profile))
 			continue;
-#endif
 
 		/* is a printer profile */
 		filename = cd_profile_get_filename (profile);
diff --git a/src/gcm-viewer.c b/src/gcm-viewer.c
index ba90a69..49b4f9d 100644
--- a/src/gcm-viewer.c
+++ b/src/gcm-viewer.c
@@ -208,12 +208,10 @@ gcm_viewer_profile_get_sort_string (CdProfile *profile)
 		sort[1] = '1';
 	else if (g_strcmp0 (id, CD_PROFILE_METADATA_DATA_SOURCE_EDID) == 0)
 		sort[1] = '2';
-#if CD_CHECK_VERSION(0,1,14)
 	else if (g_strcmp0 (id, CD_PROFILE_METADATA_DATA_SOURCE_STANDARD) == 0)
 		sort[1] = '3';
 	else if (g_strcmp0 (id, CD_PROFILE_METADATA_DATA_SOURCE_TEST) == 0)
 		sort[1] = '4';
-#endif
 	else
 		sort[1] = '0';
 
@@ -253,11 +251,9 @@ gcm_viewer_update_profile_connect_cb (GObject *source_object,
 		goto out;
 	}
 
-#if CD_CHECK_VERSION(0,1,13)
 	/* ignore profiles from other user accounts */
 	if (!cd_profile_has_access (profile))
 		goto out;
-#endif
 
 	profile_kind = cd_profile_get_kind (profile);
 	icon_name = gcm_viewer_profile_kind_to_icon_name (profile_kind);
@@ -903,7 +899,6 @@ out:
 	return ret;
 }
 
-#if CD_CHECK_VERSION(0,1,25)
 /**
  * gcm_profile_warning_to_string:
  **/
@@ -959,7 +954,6 @@ gcm_profile_warning_to_string (CdProfileWarning kind_enum)
 	}
 	return kind;
 }
-#endif
 
 /**
  * gcm_viewer_set_profile:
@@ -993,12 +987,10 @@ gcm_viewer_set_profile (GcmViewerPrivate *viewer, CdProfile *profile)
 	guint filesize;
 	gboolean show_section = FALSE;
 	GError *error = NULL;
-#if CD_CHECK_VERSION(0,1,25)
 	gchar **warnings;
 	guint i;
 	CdProfileWarning warning;
 	GString *str;
-#endif
 
 	/* connect to the profile */
 	ret = cd_profile_connect_sync (profile, NULL, &error);
@@ -1142,7 +1134,6 @@ gcm_viewer_set_profile (GcmViewerPrivate *viewer, CdProfile *profile)
 
 	/* set warnings */
 	widget = GTK_WIDGET (gtk_builder_get_object (viewer->builder, "hbox_warnings"));
-#if CD_CHECK_VERSION(0,1,25)
 	warnings = cd_profile_get_warnings (profile);
 	size = g_strv_length (warnings);
 	if (size == 0) {
@@ -1165,9 +1156,6 @@ gcm_viewer_set_profile (GcmViewerPrivate *viewer, CdProfile *profile)
 		gtk_label_set_label (GTK_LABEL (widget), str->str);
 		g_string_free (str, TRUE);
 	}
-#else
-	gtk_widget_set_visible (widget, FALSE);
-#endif
 
 	/* set profile version */
 	filename = gcm_profile_get_version (gcm_profile);



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