From: Matthias Clasen Date: Sat, 7 May 2022 02:28:14 +0000 (-0400) Subject: listitemwidget: Avoid more paramspec lookups X-Git-Tag: archive/raspbian/4.8.3+ds-2+rpi1~3^2~20^2~4^2~213^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=fadeda61e576b6b91b07b0a56514693b1cc2cc82;p=gtk4.git listitemwidget: Avoid more paramspec lookups We can use the same helper function in all places where we notify all three listitem properties. --- diff --git a/gtk/gtklistitemwidget.c b/gtk/gtklistitemwidget.c index 959d56fb4d..5a866d291c 100644 --- a/gtk/gtklistitemwidget.c +++ b/gtk/gtklistitemwidget.c @@ -522,12 +522,10 @@ gtk_list_item_widget_default_setup (GtkListItemWidget *self, gtk_list_item_widget_set_activatable (self, list_item->activatable); - if (priv->item) - g_object_notify (G_OBJECT (list_item), "item"); - if (priv->position != GTK_INVALID_LIST_POSITION) - g_object_notify (G_OBJECT (list_item), "position"); - if (priv->selected) - g_object_notify (G_OBJECT (list_item), "selected"); + gtk_list_item_do_notify (list_item, + priv->item != NULL, + priv->position != GTK_INVALID_LIST_POSITION, + priv->selected); } void @@ -546,12 +544,10 @@ gtk_list_item_widget_default_teardown (GtkListItemWidget *self, gtk_list_item_widget_set_activatable (self, FALSE); - if (priv->item) - g_object_notify (G_OBJECT (list_item), "item"); - if (priv->position != GTK_INVALID_LIST_POSITION) - g_object_notify (G_OBJECT (list_item), "position"); - if (priv->selected) - g_object_notify (G_OBJECT (list_item), "selected"); + gtk_list_item_do_notify (list_item, + priv->item != NULL, + priv->position != GTK_INVALID_LIST_POSITION, + priv->selected); } void