summaryrefslogtreecommitdiff
path: root/gtk/gtktreeviewcolumn.c
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2002-06-07 22:02:23 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2002-06-07 22:02:23 +0000
commita68df0b2e4caada907eca339c11eb19e31b411c1 (patch)
treea9991753f7b0c457e165a65beb34884610a3a066 /gtk/gtktreeviewcolumn.c
parent4c547ec4e3ee005d0a2df9c395505ca47864bf1c (diff)
downloadgtk+-a68df0b2e4caada907eca339c11eb19e31b411c1.tar.gz
New function, split off from gtk_tree_view_column_clear_attributes.
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clear_attributes_by_info): New function, split off from gtk_tree_view_column_clear_attributes. (gtk_tree_view_column_clear_attributes): (gtk_tree_view_column_finalize): Call the new function, avoid recalculating the info from the renderer. (#84413) * gtk/gtktextview.c (text_view_child_new_anchored): Initialize vc->type in order to avoid a later UMR. (#84415)
Diffstat (limited to 'gtk/gtktreeviewcolumn.c')
-rw-r--r--gtk/gtktreeviewcolumn.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c
index 7f76fc6cf7..74cd5d794f 100644
--- a/gtk/gtktreeviewcolumn.c
+++ b/gtk/gtktreeviewcolumn.c
@@ -121,7 +121,8 @@ static GList *gtk_tree_view_column_cell_next (GtkTreeViewColum
GList *current);
static GList *gtk_tree_view_column_cell_prev (GtkTreeViewColumn *tree_column,
GList *current);
-
+static void gtk_tree_view_column_clear_attributes_by_info (GtkTreeViewColumn *tree_column,
+ GtkTreeViewColumnCellInfo *info);
static GtkObjectClass *parent_class = NULL;
static guint tree_column_signals[LAST_SIGNAL] = { 0 };
@@ -346,7 +347,7 @@ gtk_tree_view_column_finalize (GObject *object)
info->destroy = NULL;
d (info->func_data);
}
- gtk_tree_view_column_clear_attributes (tree_column, info->cell);
+ gtk_tree_view_column_clear_attributes_by_info (tree_column, info);
g_object_unref (G_OBJECT (info->cell));
g_free (info);
}
@@ -1452,12 +1453,21 @@ gtk_tree_view_column_clear_attributes (GtkTreeViewColumn *tree_column,
GtkCellRenderer *cell_renderer)
{
GtkTreeViewColumnCellInfo *info;
- GSList *list;
g_return_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column));
g_return_if_fail (GTK_IS_CELL_RENDERER (cell_renderer));
+
info = gtk_tree_view_column_get_cell_info (tree_column, cell_renderer);
+ gtk_tree_view_column_clear_attributes_by_info (tree_column, info);
+}
+
+static void
+gtk_tree_view_column_clear_attributes_by_info (GtkTreeViewColumn *tree_column,
+ GtkTreeViewColumnCellInfo *info)
+{
+ GSList *list;
+
list = info->attributes;
while (list && list->next)
@@ -2285,9 +2295,9 @@ gtk_tree_view_column_cell_set_cell_data (GtkTreeViewColumn *tree_column,
/**
* gtk_tree_view_column_cell_get_size:
* @tree_column: A #GtkTreeViewColumn.
- * @cell_area: The area a the column will be allocated, or %NULL
- * @x_offset: location to return x offset of cell relative to @cell_area, or %NULL
- * @y_offset: location to return y offset of cell relative to @cell_area, or %NULL
+ * @cell_area: The area a cell in the column will be allocated, or %NULL
+ * @x_offset: location to return x offset of a cell relative to @cell_area, or %NULL
+ * @y_offset: location to return y offset of a cell relative to @cell_area, or %NULL
* @width: location to return width needed to render a cell, or %NULL
* @height: location to return height needed to render a cell, or %NULL
*