diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-12-12 16:43:07 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-12-12 16:43:07 +0900 |
commit | 46c49ee260b45da13282df6711c56b74a74d0d3d (patch) | |
tree | 0452674c51d28c0d9350fe4736456bdca2228fbe /gtk/gtktreeviewcolumn.c | |
parent | fa71b24e9a30f85a5ab6153ca2f4aff7792329c7 (diff) | |
download | gtk+-46c49ee260b45da13282df6711c56b74a74d0d3d.tar.gz |
Removed the resetting_context flag from GtkTreeViewColumn private data
No longer need to detect if we're currently resetting the context since
the context properly now avoids re-triggering the reset by properly
avoiding to notify properties that dont change as a result of the reset.
Diffstat (limited to 'gtk/gtktreeviewcolumn.c')
-rw-r--r-- | gtk/gtktreeviewcolumn.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c index c054a6ba26..fe6e5f58cc 100644 --- a/gtk/gtktreeviewcolumn.c +++ b/gtk/gtktreeviewcolumn.c @@ -172,7 +172,6 @@ struct _GtkTreeViewColumnPrivate guint reorderable : 1; guint use_resized_width : 1; guint expand : 1; - guint resetting_context : 1; }; enum @@ -1261,11 +1260,7 @@ gtk_tree_view_column_context_changed (GtkCellAreaContext *context, !strcmp (pspec->name, "natural-width") || !strcmp (pspec->name, "minimum-height") || !strcmp (pspec->name, "natural-height")) - { - tree_column->priv->resetting_context = TRUE; - _gtk_tree_view_column_cell_set_dirty (tree_column, TRUE); - tree_column->priv->resetting_context = FALSE; - } + _gtk_tree_view_column_cell_set_dirty (tree_column, TRUE); } static void @@ -2924,18 +2919,12 @@ _gtk_tree_view_column_cell_set_dirty (GtkTreeViewColumn *tree_column, /* Issue a manual reset on the context to have all * sizes re-requested for the context. - * - * This annoying 'resetting_context' flag is unfortunately - * necessary to prevent some infinite recursion */ - if (!tree_column->priv->resetting_context) - { - g_signal_handler_block (priv->cell_area_context, - priv->context_changed_signal); - gtk_cell_area_context_reset (priv->cell_area_context); - g_signal_handler_unblock (priv->cell_area_context, - priv->context_changed_signal); - } + g_signal_handler_block (priv->cell_area_context, + priv->context_changed_signal); + gtk_cell_area_context_reset (priv->cell_area_context); + g_signal_handler_unblock (priv->cell_area_context, + priv->context_changed_signal); if (priv->tree_view && gtk_widget_get_realized (priv->tree_view)) |