forked from AuroraMiddleware/gtk
label: Use widget API to add style class
This commit is contained in:
parent
c588d8f858
commit
7a98e79d90
@ -2343,7 +2343,7 @@ gtk_label_set_markup_internal (GtkLabel *label,
|
|||||||
priv->select_info->n_links = n_links;
|
priv->select_info->n_links = n_links;
|
||||||
_gtk_label_accessible_update_links (label);
|
_gtk_label_accessible_update_links (label);
|
||||||
gtk_label_ensure_has_tooltip (label);
|
gtk_label_ensure_has_tooltip (label);
|
||||||
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (label)), "link");
|
gtk_widget_add_css_class (GTK_WIDGET (label), "link");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (with_uline)
|
if (with_uline)
|
||||||
@ -5823,13 +5823,13 @@ gtk_label_clear_links (GtkLabel *label)
|
|||||||
if (!priv->select_info)
|
if (!priv->select_info)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0; i < priv->select_info->n_links; i++)
|
for (i = 0; i < self->select_info->n_links; i++)
|
||||||
link_free (&priv->select_info->links[i]);
|
link_free (&self->select_info->links[i]);
|
||||||
g_free (priv->select_info->links);
|
g_free (self->select_info->links);
|
||||||
priv->select_info->links = NULL;
|
self->select_info->links = NULL;
|
||||||
priv->select_info->n_links = 0;
|
self->select_info->n_links = 0;
|
||||||
priv->select_info->active_link = NULL;
|
self->select_info->active_link = NULL;
|
||||||
gtk_style_context_remove_class (gtk_widget_get_style_context (GTK_WIDGET (label)), "link");
|
gtk_widget_remove_css_class (GTK_WIDGET (label), "link");
|
||||||
|
|
||||||
_gtk_label_accessible_update_links (label);
|
_gtk_label_accessible_update_links (label);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user