[gtk+/treeview-refactor] Removed the resetting_context flag from GtkTreeViewColumn private data
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/treeview-refactor] Removed the resetting_context flag from GtkTreeViewColumn private data
- Date: Sun, 12 Dec 2010 07:38:58 +0000 (UTC)
commit 46c49ee260b45da13282df6711c56b74a74d0d3d
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Sun Dec 12 16:43:07 2010 +0900
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.
gtk/gtktreeviewcolumn.c | 23 ++++++-----------------
1 files changed, 6 insertions(+), 17 deletions(-)
---
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c
index c054a6b..fe6e5f5 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))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]