[gtk/wip/baedert/for-master: 8/39] label: Use widget API to add style class
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 8/39] label: Use widget API to add style class
- Date: Fri, 17 Apr 2020 13:22:14 +0000 (UTC)
commit 7a98e79d90df7d32bd6a7ccd67b3cb545f77a62d
Author: Timm Bäder <mail baedert org>
Date: Fri Apr 10 16:16:02 2020 +0200
label: Use widget API to add style class
gtk/gtklabel.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 6331b3fa4d..62d297285c 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -2343,7 +2343,7 @@ gtk_label_set_markup_internal (GtkLabel *label,
priv->select_info->n_links = n_links;
_gtk_label_accessible_update_links (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)
@@ -5823,13 +5823,13 @@ gtk_label_clear_links (GtkLabel *label)
if (!priv->select_info)
return;
- for (i = 0; i < priv->select_info->n_links; i++)
- link_free (&priv->select_info->links[i]);
- g_free (priv->select_info->links);
- priv->select_info->links = NULL;
- priv->select_info->n_links = 0;
- priv->select_info->active_link = NULL;
- gtk_style_context_remove_class (gtk_widget_get_style_context (GTK_WIDGET (label)), "link");
+ for (i = 0; i < self->select_info->n_links; i++)
+ link_free (&self->select_info->links[i]);
+ g_free (self->select_info->links);
+ self->select_info->links = NULL;
+ self->select_info->n_links = 0;
+ self->select_info->active_link = NULL;
+ gtk_widget_remove_css_class (GTK_WIDGET (label), "link");
_gtk_label_accessible_update_links (label);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]