summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorFelipe Borges <felipeborges@gnome.org>2023-01-03 12:27:42 +0100
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2023-01-05 18:55:51 +0000
commit294156c0f9ff690d934d093183c6b3ad7d0b9f01 (patch)
treeae357e2078b4dfd721b909475fd666513b05cb21 /shell
parent2a33969a3b4f39b6b3612345f6ef554c184967ef (diff)
downloadgnome-control-center-294156c0f9ff690d934d093183c6b3ad7d0b9f01.tar.gz
Drop most uses of deprecated gtk_style_context_add/remove_class
GtkStyleContext will be deprecated in gtk 4.10. https://docs.gtk.org/gtk4/class.StyleContext.html This preserves code blocks where additional GtkStyleContext operations were used, such as gtk_style_context_save/restore.
Diffstat (limited to 'shell')
-rw-r--r--shell/cc-panel-list.c2
-rw-r--r--shell/cc-window.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/shell/cc-panel-list.c b/shell/cc-panel-list.c
index d8823b8b5..e122d94c3 100644
--- a/shell/cc-panel-list.c
+++ b/shell/cc-panel-list.c
@@ -326,7 +326,7 @@ row_data_new (CcPanelCategory category,
gtk_grid_attach (GTK_GRID (grid), image, 2, 0, 1, 1);
}
- gtk_style_context_add_class (gtk_widget_get_style_context (label), "dim-label");
+ gtk_widget_add_css_class (label, "dim-label");
gtk_grid_attach (GTK_GRID (grid), label, 1, 1, 1, 1);
data->description_label = label;
diff --git a/shell/cc-window.c b/shell/cc-window.c
index 4ffdc8a70..d84fc7968 100644
--- a/shell/cc-window.c
+++ b/shell/cc-window.c
@@ -865,7 +865,7 @@ cc_window_init (CcWindow *self)
/* Add a custom CSS class on development builds */
if (in_flatpak_sandbox ())
- gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (self)), "devel");
+ gtk_widget_add_css_class (GTK_WIDGET (self), "devel");
}
CcWindow *