[gnome-color-manager] trivial: move 'None' to be the first entry, not the last entry



commit d50cfb2a7566eb48a9e7bcfbf764d5d2978e35aa
Author: Richard Hughes <richard hughsie com>
Date:   Tue Jan 19 16:04:25 2010 +0000

    trivial: move 'None' to be the first entry, not the last entry

 src/gcm-prefs.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index 61d0f5b..99c976c 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -1352,7 +1352,7 @@ gcm_prefs_add_profiles_suitable_for_devices (GtkWidget *widget, GcmDeviceTypeEnu
 {
 	GtkTreeModel *model;
 	guint i;
-	guint added_count = 0;
+	guint added_count = 1;
 	gchar *filename;
 	gboolean ret;
 	gboolean set_active = FALSE;
@@ -1363,6 +1363,9 @@ gcm_prefs_add_profiles_suitable_for_devices (GtkWidget *widget, GcmDeviceTypeEnu
 	model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
 	gtk_list_store_clear (GTK_LIST_STORE (model));
 
+	/* add a 'None' entry */
+	gcm_prefs_combobox_add_profile (widget, NULL);
+
 	/* get new list */
 	profile_array = gcm_profile_store_get_array (profile_store);
 
@@ -1391,13 +1394,10 @@ gcm_prefs_add_profiles_suitable_for_devices (GtkWidget *widget, GcmDeviceTypeEnu
 		}
 	}
 
-	/* add a clear entry */
-	gcm_prefs_combobox_add_profile (widget, NULL);
-
 	/* select 'None' if there was no match */
 	if (!set_active) {
 		egg_warning ("no match for %s", profile_filename);
-		gtk_combo_box_set_active (GTK_COMBO_BOX (widget), added_count);
+		gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
 	}
 	if (profile_array != NULL)
 		g_ptr_array_unref (profile_array);



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