diff options
author | Wolfgang Ulbrich <[email protected]> | 2016-02-02 04:01:11 +0100 |
---|---|---|
committer | Wolfgang Ulbrich <[email protected]> | 2016-02-02 04:01:11 +0100 |
commit | b717d132ae9c16389f8dc81062e9fa08e6a94234 (patch) | |
tree | 1dca0902b178d94a82b533cb84cc622a9e6abfe3 | |
parent | 32589e59a4456ac11ac63c9aff473ec99617684a (diff) | |
download | caja-b717d132ae9c16389f8dc81062e9fa08e6a94234.tar.bz2 caja-b717d132ae9c16389f8dc81062e9fa08e6a94234.tar.xz |
GTK3: add 'caja-notebook' style class + fix deprecated theme warnings with gtk+-3.20
-rw-r--r-- | src/caja-notebook.c | 24 |
1 files changed, 3 insertions, 21 deletions
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); |