]> www.fi.muni.cz Git - evince.git/commitdiff
shell: Port EvWindow to GtkStyleContext
authorCarlos Garcia Campos <carlosgc@gnome.org>
Wed, 22 Dec 2010 16:33:01 +0000 (17:33 +0100)
committerCarlos Garcia Campos <carlosgc@gnome.org>
Thu, 23 Dec 2010 18:13:26 +0000 (19:13 +0100)
shell/ev-window.c

index 72a7d960cfa35096ed78531ff1f43e442ed1068c..0e6fd92a4fe1ddf26e0b5188d1ff218f3d5e68aa 100644 (file)
@@ -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