From 4c3f22a332076fbf6ddc7f2a42bccce9ac673f63 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Wed, 22 Dec 2010 17:33:01 +0100 Subject: [PATCH] shell: Port EvWindow to GtkStyleContext --- shell/ev-window.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/shell/ev-window.c b/shell/ev-window.c index 72a7d960..0e6fd92a 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -3844,22 +3844,19 @@ fullscreen_toolbar_setup_item_properties (GtkUIManager *ui_manager) static void fullscreen_toolbar_remove_shadow (GtkWidget *toolbar) { - static gboolean done = FALSE; - - if (!done) { - gtk_rc_parse_string ( - "\n" - " style \"fullscreen-toolbar-style\"\n" - " {\n" - " GtkToolbar::shadow-type=GTK_SHADOW_NONE\n" - " }\n" - "\n" - " widget \"*.fullscreen-toolbar\" style \"fullscreen-toolbar-style\"\n" - "\n"); - done = TRUE; - } - - gtk_widget_set_name (toolbar, "fullscreen-toolbar"); + GtkCssProvider *provider; + + gtk_widget_set_name (toolbar, "ev-fullscreen-toolbar"); + + provider = gtk_css_provider_new (); + gtk_css_provider_load_from_data (provider, + "#ev-fullscreen-toolbar {\n" + " -GtkToolbar-shadow-type: none; }", + -1, NULL); + gtk_style_context_add_provider (gtk_widget_get_style_context (toolbar), + GTK_STYLE_PROVIDER (provider), + GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + g_object_unref (provider); } static void -- 2.43.5