summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2010-12-15 19:36:22 +0100
committerCosimo Cecchi <cosimoc@gnome.org>2010-12-15 19:36:22 +0100
commit786ba61680bfaee136b4b72a53f220edb96a7db9 (patch)
treea893aac14fca23a72a14f10dbdfae394e052a856
parentdad5d12770817aa739ab9980faa66972144008a7 (diff)
downloadnautilus-786ba61680bfaee136b4b72a53f220edb96a7db9.tar.gz
sidebar: set the NautilusSidebar class on the sidebar treeviews
So they can get the proper background.
-rw-r--r--src/nautilus-places-sidebar.c4
-rw-r--r--src/nautilus-tree-sidebar.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c
index efb95d7d1..30af74094 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 a1d193a09..8d51e7f1c 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);