treeview: don't call gtk_style_context_set_background()

This commit is contained in:
Cosimo Cecchi 2015-06-27 12:48:57 -07:00
parent 18be2d697c
commit 15908cfdf9
2 changed files with 0 additions and 31 deletions

View File

@ -9482,7 +9482,6 @@ static void
text_window_realize (GtkTextWindow *win,
GtkWidget *widget)
{
GtkStyleContext *context;
GdkWindow *window;
GdkWindowAttr attributes;
gint attributes_mask;
@ -9533,8 +9532,6 @@ text_window_realize (GtkTextWindow *win,
gdk_window_show (win->bin_window);
context = gtk_widget_get_style_context (widget);
switch (win->type)
{
case GTK_TEXT_WINDOW_TEXT:

View File

@ -597,8 +597,6 @@ static gint gtk_tree_view_focus (GtkWidget *widget,
GtkDirectionType direction);
static void gtk_tree_view_grab_focus (GtkWidget *widget);
static void gtk_tree_view_style_updated (GtkWidget *widget);
static void gtk_tree_view_state_flags_changed (GtkWidget *widget,
GtkStateFlags previous_state);
/* container signals */
static void gtk_tree_view_remove (GtkContainer *container,
@ -981,7 +979,6 @@ gtk_tree_view_class_init (GtkTreeViewClass *class)
widget_class->focus = gtk_tree_view_focus;
widget_class->grab_focus = gtk_tree_view_grab_focus;
widget_class->style_updated = gtk_tree_view_style_updated;
widget_class->state_flags_changed = gtk_tree_view_state_flags_changed;
widget_class->queue_draw_region = gtk_tree_view_queue_draw_region;
/* GtkContainer signals */
@ -2344,17 +2341,6 @@ gtk_tree_view_unmap (GtkWidget *widget)
_gtk_pixel_cache_unmap (tree_view->priv->pixel_cache);
}
static void
gtk_tree_view_ensure_background (GtkTreeView *tree_view)
{
GtkStyleContext *context;
context = gtk_widget_get_style_context (GTK_WIDGET (tree_view));
gtk_style_context_set_background (context, gtk_widget_get_window (GTK_WIDGET (tree_view)));
gtk_style_context_set_background (context, tree_view->priv->header_window);
}
static void
gtk_tree_view_bin_window_invalidate_handler (GdkWindow *window,
cairo_region_t *region)
@ -2471,8 +2457,6 @@ gtk_tree_view_realize (GtkWidget *widget)
&attributes, attributes_mask);
gtk_widget_register_window (widget, tree_view->priv->header_window);
gtk_tree_view_ensure_background (tree_view);
tmp_list = tree_view->priv->children;
while (tmp_list)
{
@ -8720,8 +8704,6 @@ gtk_tree_view_style_updated (GtkWidget *widget)
if (gtk_widget_get_realized (widget))
{
gtk_tree_view_ensure_background (tree_view);
gtk_tree_view_set_grid_lines (tree_view, tree_view->priv->grid_lines);
gtk_tree_view_set_enable_tree_lines (tree_view, tree_view->priv->tree_lines_enabled);
}
@ -15973,16 +15955,6 @@ gtk_tree_view_set_row_separator_func (GtkTreeView *tree_view,
gtk_widget_queue_resize (GTK_WIDGET (tree_view));
}
static void
gtk_tree_view_state_flags_changed (GtkWidget *widget,
GtkStateFlags previous_state)
{
if (gtk_widget_get_realized (widget))
gtk_tree_view_ensure_background (GTK_TREE_VIEW (widget));
gtk_widget_queue_draw (widget);
}
/**
* gtk_tree_view_get_grid_lines:
* @tree_view: a #GtkTreeView