[evince] shell: Port EvWindow to GtkStyleContext
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] shell: Port EvWindow to GtkStyleContext
- Date: Thu, 23 Dec 2010 18:14:16 +0000 (UTC)
commit 4c3f22a332076fbf6ddc7f2a42bccce9ac673f63
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Wed Dec 22 17:33:01 2010 +0100
shell: Port EvWindow to GtkStyleContext
shell/ev-window.c | 29 +++++++++++++----------------
1 files changed, 13 insertions(+), 16 deletions(-)
---
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 72a7d96..0e6fd92 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]