[gnome-color-manager] Ensure we add new profiles to the combobox when finished calibrating



commit 60f25f4bb94571d83dd73ff28fff93ca8f6bf245
Author: Richard Hughes <richard hughsie com>
Date:   Thu Nov 26 21:18:07 2009 +0000

    Ensure we add new profiles to the combobox when finished calibrating

 src/gcm-prefs.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index 3aa4bae..f441ddb 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -438,6 +438,7 @@ gcm_prefs_calibrate_cb (GtkWidget *widget, gpointer data)
 	gchar *filename = NULL;
 	guint i;
 	gchar *name;
+	gchar *displayname = NULL;
 	gchar *destination = NULL;
 	GcmProfile *profile;
 
@@ -519,6 +520,12 @@ gcm_prefs_calibrate_cb (GtkWidget *widget, gpointer data)
 			goto out;
 		}
 
+		/* add an entry to the combobox */
+		g_object_get (profile,
+			      "description", &displayname,
+			      NULL);
+		gtk_combo_box_append_text (GTK_COMBO_BOX (widget), displayname);
+
 		/* add to arrays */
 		g_ptr_array_add (profiles_array, g_object_ref (profile));
 		g_ptr_array_add (profiles_array_in_combo, g_object_ref (profile));
@@ -535,6 +542,7 @@ gcm_prefs_calibrate_cb (GtkWidget *widget, gpointer data)
 out:
 	g_free (filename);
 	g_free (destination);
+	g_free (displayname);
 	if (calib != NULL)
 		g_object_unref (calib);
 }



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