singleselection: Be more careful about notifies
authorBenjamin Otte <otte@redhat.com>
Mon, 17 Oct 2022 17:54:40 +0000 (19:54 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 17 Oct 2022 18:11:27 +0000 (20:11 +0200)
commit5e8b294faf38f9a5e3323c1c983877caee9d6421
tree3bcfd073274032952c03f21f6ba0a864933d763e
parent6f5d18a9f5c5ce28ed3bed98365967565dfa8b94
singleselection: Be more careful about notifies

We don't want to notify::selected or notify::selected-item if they
didn't change.
This will bring performance benefits on frequently changing lists.

In particular, if lists get filtered or reordered, but the selected item
stays in the list, not doing a notify::selected-item will avoid updates
in connected handlers like GtkDropdown (and its handlers), thereby
avoiding lots of unnecessary updates.
gtk/gtksingleselection.c