gridview: Add concept of inertness
authorBenjamin Otte <otte@redhat.com>
Mon, 27 Mar 2023 05:03:38 +0000 (07:03 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 27 Mar 2023 05:08:44 +0000 (07:08 +0200)
commitaba1be6faf8c3431f31580a551a3a2a625f4759f
tree7830b8da80fa19b6cb61660194768c919cb5e6f4
parent62e9d1e470b0819bdcb4d2a3ba05e083306fc0da
gridview: Add concept of inertness

An inert gridview is a gridview that does not use the factory. This
allows faster updates because no calls into user code need to happen.

A gridview is inert when either:
 - It is not rooted.
 - It is not visible.
 - No factory is set (that one is obvious)

The gridview does not need to be inert without a model, as that case is
handled by the item manager.

This should allow Nautilus to keep both the gridview and the columnview
around, and just gtk_widget_hide() the unused widget.

The code for now does not disable the item manager, as some
functionality of the item manager is required to allow setting scroll
positions and such.
But that is a place where more gains could be found if profiling showed
that was useful to do.
gtk/gtkgridview.c