[gtk+] treeview: don't call gtk_style_context_set_background()
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] treeview: don't call gtk_style_context_set_background()
- Date: Wed, 1 Jul 2015 23:10:44 +0000 (UTC)
commit 15908cfdf9c6f0924cf104b761f1a729c21f8f26
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sat Jun 27 12:48:57 2015 -0700
treeview: don't call gtk_style_context_set_background()
gtk/gtktextview.c | 3 ---
gtk/gtktreeview.c | 28 ----------------------------
2 files changed, 0 insertions(+), 31 deletions(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 997a633..3567609 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -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:
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 5eaed63..eb77cd1 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -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 */
@@ -2345,17 +2342,6 @@ gtk_tree_view_unmap (GtkWidget *widget)
}
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]