color: Connect to the profile before doing cd_profile_equal -- we use the ID not the path

This commit is contained in:
Richard Hughes 2011-05-31 10:43:31 +01:00
parent 203046ccfb
commit a44d36f993

View file

@ -347,10 +347,6 @@ gcm_prefs_add_profiles_suitable_for_devices (CcColorPanel *prefs,
{ {
profile_tmp = g_ptr_array_index (profile_array, i); profile_tmp = g_ptr_array_index (profile_array, i);
/* don't add the current profile */
if (profile != NULL && cd_profile_equal (profile, profile_tmp))
continue;
/* get properties */ /* get properties */
ret = cd_profile_connect_sync (profile_tmp, ret = cd_profile_connect_sync (profile_tmp,
priv->cancellable, priv->cancellable,
@ -362,6 +358,10 @@ gcm_prefs_add_profiles_suitable_for_devices (CcColorPanel *prefs,
goto out; goto out;
} }
/* don't add the current profile */
if (profile != NULL && cd_profile_equal (profile, profile_tmp))
continue;
/* only add correct types */ /* only add correct types */
ret = gcm_prefs_is_profile_suitable_for_device (profile_tmp, ret = gcm_prefs_is_profile_suitable_for_device (profile_tmp,
priv->current_device); priv->current_device);