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:
parent
2a72a7b955
commit
98fde07657
1 changed files with 0 additions and 22 deletions
|
@ -1219,7 +1219,6 @@ static void
|
||||||
gcm_prefs_profile_clicked (CcColorPanel *prefs, CdProfile *profile, CdDevice *device)
|
gcm_prefs_profile_clicked (CcColorPanel *prefs, CdProfile *profile, CdDevice *device)
|
||||||
{
|
{
|
||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
CdDeviceRelation relation;
|
|
||||||
gchar *s;
|
gchar *s;
|
||||||
CcColorPanelPrivate *priv = prefs->priv;
|
CcColorPanelPrivate *priv = prefs->priv;
|
||||||
|
|
||||||
|
@ -1227,27 +1226,6 @@ gcm_prefs_profile_clicked (CcColorPanel *prefs, CdProfile *profile, CdDevice *de
|
||||||
g_debug ("selected profile = %s",
|
g_debug ("selected profile = %s",
|
||||||
cd_profile_get_filename (profile));
|
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 */
|
/* allow getting profile info */
|
||||||
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder,
|
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder,
|
||||||
"toolbutton_profile_view"));
|
"toolbutton_profile_view"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue