color: Allow the user to remove automatically added profiles

You need to be running colord from git master for this feature to work.
This commit is contained in:
Richard Hughes 2013-01-24 16:47:54 +00:00
parent 2a72a7b955
commit 98fde07657

View file

@ -1219,7 +1219,6 @@ static void
gcm_prefs_profile_clicked (CcColorPanel *prefs, CdProfile *profile, CdDevice *device)
{
GtkWidget *widget;
CdDeviceRelation relation;
gchar *s;
CcColorPanelPrivate *priv = prefs->priv;
@ -1227,27 +1226,6 @@ gcm_prefs_profile_clicked (CcColorPanel *prefs, CdProfile *profile, CdDevice *de
g_debug ("selected profile = %s",
cd_profile_get_filename (profile));
/* find the profile relationship */
relation = cd_device_get_profile_relation_sync (device,
profile,
NULL, NULL);
/* we can only remove hard relationships */
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder,
"toolbutton_profile_remove"));
if (relation == CD_DEVICE_RELATION_HARD)
{
gtk_widget_set_tooltip_text (widget, "");
gtk_widget_set_sensitive (widget, TRUE);
}
else
{
/* TRANSLATORS: this is when an auto-added profile cannot be removed */
gtk_widget_set_tooltip_text (widget, _("Cannot remove automatically added profile"));
gtk_widget_set_sensitive (widget, FALSE);
}
/* allow getting profile info */
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder,
"toolbutton_profile_view"));