+static void
+gtk_cell_view_extended_layout_get_desired_size (GtkExtendedLayout *layout,
+ GtkRequisition *minimal_size,
+ GtkRequisition *desired_size)
+{
+ GList *i;
+ gint min_width, nat_width;
+
+ min_width = 0;
+ nat_width = 0;
+
+ for (i = GTK_CELL_VIEW (layout)->priv->cell_list; i; i = i->next)
+ {
+ GtkCellViewCellInfo *info = (GtkCellViewCellInfo *)i->data;
+
+ if (info->cell->visible)
+ {
+ min_width += info->requested_width;
+ nat_width += info->natural_width;
+ }
+ }
+
+ if (minimal_size)
+ {
+ minimal_size->width = min_width;
+ minimal_size->height = GTK_WIDGET (layout)->requisition.height;
+ }
+ if (desired_size)
+ {
+ desired_size->width = nat_width;
+ desired_size->height = GTK_WIDGET (layout)->requisition.height;
+ }
+}
+
+static void
+gtk_cell_view_extended_layout_init (GtkExtendedLayoutIface *iface)
+{
+ iface->get_desired_size = gtk_cell_view_extended_layout_get_desired_size;
+}
+