mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 03:10:09 +00:00
columnviewcolumn: Add private api to set the position
This is needed to make columns reorder their cells when their position in the column views list of columns changes.
This commit is contained in:
parent
15c6ad88c0
commit
6df489d5a9
@ -625,6 +625,25 @@ gtk_column_view_column_set_column_view (GtkColumnViewColumn *self,
|
|||||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_COLUMN_VIEW]);
|
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_COLUMN_VIEW]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gtk_column_view_column_set_position (GtkColumnViewColumn *self,
|
||||||
|
guint position)
|
||||||
|
{
|
||||||
|
GtkColumnViewCell *cell;
|
||||||
|
|
||||||
|
gtk_list_item_widget_reorder_child (gtk_column_view_get_header_widget (self->view),
|
||||||
|
self->header,
|
||||||
|
position);
|
||||||
|
|
||||||
|
for (cell = self->first_cell; cell; cell = gtk_column_view_cell_get_next (cell))
|
||||||
|
{
|
||||||
|
GtkListItemWidget *list_item;
|
||||||
|
|
||||||
|
list_item = GTK_LIST_ITEM_WIDGET (gtk_widget_get_parent (GTK_WIDGET (cell)));
|
||||||
|
gtk_list_item_widget_reorder_child (list_item, GTK_WIDGET (cell), position);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_column_view_column_get_factory:
|
* gtk_column_view_column_get_factory:
|
||||||
* @self: a #GtkColumnViewColumn
|
* @self: a #GtkColumnViewColumn
|
||||||
|
@ -28,6 +28,9 @@
|
|||||||
void gtk_column_view_column_set_column_view (GtkColumnViewColumn *self,
|
void gtk_column_view_column_set_column_view (GtkColumnViewColumn *self,
|
||||||
GtkColumnView *view);
|
GtkColumnView *view);
|
||||||
|
|
||||||
|
void gtk_column_view_column_set_position (GtkColumnViewColumn *self,
|
||||||
|
guint position);
|
||||||
|
|
||||||
void gtk_column_view_column_add_cell (GtkColumnViewColumn *self,
|
void gtk_column_view_column_add_cell (GtkColumnViewColumn *self,
|
||||||
GtkColumnViewCell *cell);
|
GtkColumnViewCell *cell);
|
||||||
void gtk_column_view_column_remove_cell (GtkColumnViewColumn *self,
|
void gtk_column_view_column_remove_cell (GtkColumnViewColumn *self,
|
||||||
|
Loading…
Reference in New Issue
Block a user