From b717d132ae9c16389f8dc81062e9fa08e6a94234 Mon Sep 17 00:00:00 2001 From: Wolfgang Ulbrich Date: Tue, 2 Feb 2016 04:01:11 +0100 Subject: GTK3: add 'caja-notebook' style class + fix deprecated theme warnings with gtk+-3.20 --- src/caja-notebook.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/caja-notebook.c b/src/caja-notebook.c index c2c22cd6..c281b7d0 100644 --- a/src/caja-notebook.c +++ b/src/caja-notebook.c @@ -253,28 +253,10 @@ static void caja_notebook_init (CajaNotebook *notebook) { #if GTK_CHECK_VERSION (3, 0, 0) - static const gchar css_custom[] = - "#caja-tab-close-button {" - " -GtkWidget-focus-padding : 0;" - " -GtkWidget-focus-line-width: 0;" - " xthickness: 0;" - " ythickness: 0;" - "}"; - - GError *error = NULL; - GtkCssProvider *provider = gtk_css_provider_new (); - gtk_css_provider_load_from_data (provider, css_custom, -1, &error); - - if (error != NULL) { - g_warning ("Can't parse CajaNotebook's CSS custom description: %s\n", error->message); - g_error_free (error); - } else { - gtk_style_context_add_provider (gtk_widget_get_style_context (GTK_WIDGET (notebook)), - GTK_STYLE_PROVIDER (provider), - GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); - } + GtkStyleContext *context; - g_object_unref (provider); + context = gtk_widget_get_style_context (GTK_WIDGET (notebook)); + gtk_style_context_add_class (context, "caja-notebook"); #endif gtk_notebook_set_scrollable (GTK_NOTEBOOK (notebook), TRUE); -- cgit v1.2.1