[gtk/columnview-separators: 29/30] listview: Use gtk_widget_add_css_class



commit 658e4c535783134966d1bde898fc5cc17255a778
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jun 3 17:36:52 2020 -0400

    listview: Use gtk_widget_add_css_class
    
    No need to use the style context api for this anymore.

 gtk/gtklistview.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtklistview.c b/gtk/gtklistview.c
index 35a3df9339..90b594da30 100644
--- a/gtk/gtklistview.c
+++ b/gtk/gtklistview.c
@@ -994,9 +994,9 @@ gtk_list_view_set_show_separators (GtkListView *self,
   self->show_separators = show_separators;
 
   if (show_separators)
-    gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (self)), "separators");
+    gtk_widget_add_css_class (GTK_WIDGET (self), "separators");
   else
-    gtk_style_context_remove_class (gtk_widget_get_style_context (GTK_WIDGET (self)), "separators");
+    gtk_widget_remove_css_class (GTK_WIDGET (self), "separators");
 
   g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SHOW_SEPARATORS]);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]