[nautilus] sidebar: set the NautilusSidebar class on the sidebar treeviews



commit 786ba61680bfaee136b4b72a53f220edb96a7db9
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Dec 15 19:36:22 2010 +0100

    sidebar: set the NautilusSidebar class on the sidebar treeviews
    
    So they can get the proper background.

 src/nautilus-places-sidebar.c |    4 ++++
 src/nautilus-tree-sidebar.c   |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c
index efb95d7..30af740 100644
--- a/src/nautilus-places-sidebar.c
+++ b/src/nautilus-places-sidebar.c
@@ -2927,6 +2927,7 @@ nautilus_places_sidebar_init (NautilusPlacesSidebar *sidebar)
 	GtkTreeViewColumn *col;
 	GtkCellRenderer   *cell;
 	GtkTreeSelection  *selection;
+	GtkStyleContext   *style;
 
 	sidebar->volume_monitor = g_volume_monitor_get ();
 	
@@ -2941,6 +2942,9 @@ nautilus_places_sidebar_init (NautilusPlacesSidebar *sidebar)
 	tree_view = GTK_TREE_VIEW (gtk_tree_view_new ());
 	gtk_tree_view_set_headers_visible (tree_view, FALSE);
 
+	style = gtk_widget_get_style_context (GTK_WIDGET (tree_view));
+	gtk_style_context_add_class (style, "NautilusSidebar");
+
 	col = GTK_TREE_VIEW_COLUMN (gtk_tree_view_column_new ());
 
 	/* initial padding */
diff --git a/src/nautilus-tree-sidebar.c b/src/nautilus-tree-sidebar.c
index a1d193a..8d51e7f 100644
--- a/src/nautilus-tree-sidebar.c
+++ b/src/nautilus-tree-sidebar.c
@@ -1301,6 +1301,9 @@ create_tree (FMTreeView *view)
 		(gtk_tree_view_new_with_model (GTK_TREE_MODEL (view->details->sort_model)));
 	g_object_unref (view->details->sort_model);
 
+	gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (view->details->tree_widget)),
+				     "NautilusSidebar");
+
 	gtk_tree_sortable_set_default_sort_func (GTK_TREE_SORTABLE (view->details->sort_model),
 						 compare_rows, view, NULL);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]