mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 14:00:09 +00:00
listitemwidget: Avoid more paramspec lookups
We can use the same helper function in all places where we notify all three listitem properties.
This commit is contained in:
parent
3307b8ce88
commit
fadeda61e5
@ -522,12 +522,10 @@ gtk_list_item_widget_default_setup (GtkListItemWidget *self,
|
|||||||
|
|
||||||
gtk_list_item_widget_set_activatable (self, list_item->activatable);
|
gtk_list_item_widget_set_activatable (self, list_item->activatable);
|
||||||
|
|
||||||
if (priv->item)
|
gtk_list_item_do_notify (list_item,
|
||||||
g_object_notify (G_OBJECT (list_item), "item");
|
priv->item != NULL,
|
||||||
if (priv->position != GTK_INVALID_LIST_POSITION)
|
priv->position != GTK_INVALID_LIST_POSITION,
|
||||||
g_object_notify (G_OBJECT (list_item), "position");
|
priv->selected);
|
||||||
if (priv->selected)
|
|
||||||
g_object_notify (G_OBJECT (list_item), "selected");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -546,12 +544,10 @@ gtk_list_item_widget_default_teardown (GtkListItemWidget *self,
|
|||||||
|
|
||||||
gtk_list_item_widget_set_activatable (self, FALSE);
|
gtk_list_item_widget_set_activatable (self, FALSE);
|
||||||
|
|
||||||
if (priv->item)
|
gtk_list_item_do_notify (list_item,
|
||||||
g_object_notify (G_OBJECT (list_item), "item");
|
priv->item != NULL,
|
||||||
if (priv->position != GTK_INVALID_LIST_POSITION)
|
priv->position != GTK_INVALID_LIST_POSITION,
|
||||||
g_object_notify (G_OBJECT (list_item), "position");
|
priv->selected);
|
||||||
if (priv->selected)
|
|
||||||
g_object_notify (G_OBJECT (list_item), "selected");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user