color: Do not show the profile warning label if there are no profiles

This can happen if gnome-settings-daemon is not running or the device type is a
camera.
This commit is contained in:
Richard Hughes 2013-02-03 23:29:03 +00:00
parent b57f3170d1
commit 4e33954d94

View file

@ -690,6 +690,7 @@ gcm_prefs_add_profiles_suitable_for_devices (CcColorPanel *prefs,
GPtrArray *profile_array = NULL;
GtkTreeIter iter;
GtkListStore *list_store;
GtkWidget *widget;
guint i;
CcColorPanelPrivate *priv = prefs->priv;
@ -704,6 +705,10 @@ gcm_prefs_add_profiles_suitable_for_devices (CcColorPanel *prefs,
gcm_prefs_combo_sort_func_cb,
list_store, NULL);
widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder,
"label_assign_warning"));
gtk_widget_hide (widget);
/* get profiles */
profile_array = cd_client_get_profiles_sync (priv->client,
priv->cancellable,