[gnome-color-manager] trivial: use cd_client_import_profile_sync in gcm-import



commit 42e68b9741cacc0e930c8ab2f7076629857392d1
Author: Richard Hughes <richard hughsie com>
Date:   Tue Aug 23 20:28:14 2011 +0100

    trivial: use cd_client_import_profile_sync in gcm-import

 src/gcm-import.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/gcm-import.c b/src/gcm-import.c
index a64606e..fe61ee9 100644
--- a/src/gcm-import.c
+++ b/src/gcm-import.c
@@ -218,10 +218,10 @@ main (int argc, char **argv)
 		goto out;
 
 	/* copy icc file to users profile path */
-	ret = gcm_utils_mkdir_and_copy (file, destination, &error);
-	if (!ret) {
+	profile_tmp = cd_client_import_profile_sync (client, file, NULL, &error);
+	if (profile_tmp == NULL) {
 		/* TRANSLATORS: could not read file */
-		dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("Failed to copy file"));
+		dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("Failed to import file"));
 		gtk_window_set_icon_name (GTK_WINDOW (dialog), GCM_STOCK_ICON);
 		gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s", error->message);
 		gtk_dialog_run (GTK_DIALOG (dialog));



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