[gnome-color-manager] When checking whether to make the new profile default or not, use the list of profiles from the devi
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] When checking whether to make the new profile default or not, use the list of profiles from the devi
- Date: Fri, 4 Jun 2010 23:20:16 +0000 (UTC)
commit e7fc4dbd13c7ca3027f3b733fbb869304b40df5c
Author: Richard Hughes <richard hughsie com>
Date: Sat Jun 5 00:19:55 2010 +0100
When checking whether to make the new profile default or not, use the list of profiles from the device, not the store
src/gcm-prefs.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index 8accf18..3fb9546 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -922,8 +922,10 @@ gcm_prefs_calibrate_cb (GtkWidget *widget, gpointer data)
}
/* we failed to calibrate */
- if (!ret)
+ if (!ret) {
+ egg_warning ("failed to calibrate");
goto out;
+ }
/* failed to get profile */
filename = gcm_calibrate_get_filename_result (calibrate);
@@ -942,10 +944,8 @@ gcm_prefs_calibrate_cb (GtkWidget *widget, gpointer data)
goto out;
}
- /* get new list */
- profile_array = gcm_profile_store_get_array (profile_store);
-
/* find an existing profile of this name */
+ profile_array = gcm_device_get_profiles (current_device);
destination = g_file_get_path (dest);
for (i=0; i<profile_array->len; i++) {
profile = g_ptr_array_index (profile_array, i);
@@ -982,8 +982,6 @@ gcm_prefs_calibrate_cb (GtkWidget *widget, gpointer data)
CA_PROP_EVENT_DESCRIPTION, _("Profiling completed"), NULL);
out:
g_free (destination);
- if (profile_array != NULL)
- g_ptr_array_unref (profile_array);
if (calibrate != NULL)
g_object_unref (calibrate);
if (file != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]