Adding gtk_tree_view_column_new_with_area().
Creates a treeviewcolumn using a specific GtkCellArea. This patch also makes GtkEntryCompletion use the new api instead of g_object_new().
This commit is contained in:
@ -493,7 +493,7 @@ gtk_entry_completion_constructor (GType type,
|
||||
completion);
|
||||
priv->first_sel_changed = TRUE;
|
||||
|
||||
priv->column = g_object_new (GTK_TYPE_TREE_VIEW_COLUMN, "cell-area", priv->cell_area, NULL);
|
||||
priv->column = gtk_tree_view_column_new_with_area (priv->cell_area);
|
||||
gtk_tree_view_append_column (GTK_TREE_VIEW (priv->tree_view), priv->column);
|
||||
|
||||
priv->scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
|
@ -1529,6 +1529,27 @@ gtk_tree_view_column_new (void)
|
||||
return tree_column;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_tree_view_column_new_with_area:
|
||||
* @area: the #GtkCellArea that the newly created column should use to layout cells.
|
||||
*
|
||||
* Creates a new #GtkTreeViewColumn using @area to render it's cells.
|
||||
*
|
||||
* Return value: A newly created #GtkTreeViewColumn.
|
||||
*
|
||||
* Since: 3.0
|
||||
*/
|
||||
GtkTreeViewColumn *
|
||||
gtk_tree_view_column_new_with_area (GtkCellArea *area)
|
||||
{
|
||||
GtkTreeViewColumn *tree_column;
|
||||
|
||||
tree_column = g_object_new (GTK_TYPE_TREE_VIEW_COLUMN, "cell-area", area, NULL);
|
||||
|
||||
return tree_column;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gtk_tree_view_column_new_with_attributes:
|
||||
* @title: The title to set the header to.
|
||||
|
@ -105,6 +105,7 @@ struct _GtkTreeViewColumnClass
|
||||
|
||||
GType gtk_tree_view_column_get_type (void) G_GNUC_CONST;
|
||||
GtkTreeViewColumn *gtk_tree_view_column_new (void);
|
||||
GtkTreeViewColumn *gtk_tree_view_column_new_with_area (GtkCellArea *area);
|
||||
GtkTreeViewColumn *gtk_tree_view_column_new_with_attributes (const gchar *title,
|
||||
GtkCellRenderer *cell,
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
|
Reference in New Issue
Block a user